Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit.
Choose a target
For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section.
For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target.
When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path.
Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide&path=%2F reads that scope’s landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated.
Interpret the result
Branch on the required kind field:
kind
Result
documentation
Page identity, reusable docs_read_target, and exact crawled or repository source details.
code
Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit.
Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group.
Selector catalogue
Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules.
Selector
Documentation result
Code result
Default
metadata
Title, format, breadcrumbs, update and source context, and package ownership when known.
Detected language and total line count.
Yes
content
Body, total lines, returned range, and resolved section anchor.
Body and returned range; values are null for binary files.
Yes
Wait for code indexing
wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing.
For failures, branch on the problem response’s stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.
GET
/
v1
/
read
GET /v1/read?target=https%3A%2F%2Fdocs.example.org%2Fguide%23install HTTP/1.1
Host: api.githits.dev
Authorization: Bearer <token>
Optional caller-defined session ID: one to 64 ASCII letters, digits, underscores or hyphens, preserved exactly. Supply the header at most once. Invalid supplied IDs return 400 INVALID_SESSION_ID; no session is created.
Required nonblank read target. Pass an emitted read action target unchanged: a documentation page ID or URL, a scoped site: target, a package in :[@] form, or a supported public repository locator. Repository refs use @. Encode literal + as %2B and literal # as %23.
Exact path from a read action, preserved after query decoding. Omit null or blank paths. For a scoped site, / reads its landing page; trailing slashes, query bytes, and literal percent bytes can identify distinct pages. Encode path as a query value without normalizing it. NUL and control characters are rejected. Source-file paths must be relative to the addressed target; absolute paths, dot segments, and trailing slashes are invalid.
Milliseconds to wait for code indexing, from 0 to 60000; defaults to 20000. Zero returns 503 PACKAGE_INDEXING immediately when code is not ready. Documentation reads do not use this budget for indexing. The overall request deadline includes the selected budget.
Comma-separated metadata and content response groups; both are selected by default. Supplying fields replaces the defaults. Explicit line bounds require content; kind and branch identity remain present.
Use the case-sensitive selectors in the catalogue. Order and duplicate selectors do not affect the result. ASCII whitespace around selectors is ignored. The decoded value is limited to 2048 UTF-8 bytes. Empty or unknown selectors and repeated fields query parameters return 400 VALIDATION_ERROR. A group does not include nested groups unless the catalogue says so; only listed wildcard bundles are supported.
Response
Documentation page or source file
Option 1
Option 2
A documentation page or source file, selected by kind.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"GitHits","colors":{"primary":"#c03b83","light":"#e15b9f","dark":"#e15b9f"},"logo":{"light":"https://mintcdn.com/githits/nEuGn8_ZROo1DncD/images/githits-wordmark.svg?fit=max\u0026auto=format\u0026n=nEuGn8_ZROo1DncD\u0026q=85\u0026s=33b1a4083b1476ad8520731d35d55987","dark":"https://mintcdn.com/githits/nEuGn8_ZROo1DncD/images/githits-wordmark.svg?fit=max\u0026auto=format\u0026n=nEuGn8_ZROo1DncD\u0026q=85\u0026s=33b1a4083b1476ad8520731d35d55987","href":"/"},"favicon":"https://mintcdn.com/githits/Hm40jjPoMZp3cAjh/images/githits-favicon.svg?fit=max\u0026auto=format\u0026n=Hm40jjPoMZp3cAjh\u0026q=85\u0026s=701b144dbf93beea1351b26de5f854f1","api":{"playground":{"proxy":false,"credentials":false}},"appearance":{"default":"dark"},"background":{"color":{"light":"#ffffff","dark":"#13161a"}},"navbar":{"primary":{"type":"github","href":"https://github.com/githits-com/githits-cli"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"githits","hasAudioNarration":false,"actualSubdomain":"githits","customDomains":["docs.githits.com"],"gitSource":{"type":"github","owner":"githits-com","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4b2de21d44d6b52dd4471","collectionId":"593342e0-fc74-4dc6-828c-0ea85eb6e880","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4b2de21d44d6b52dd4471"},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4b2de21d44d6b52dd4471","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API","count":29},{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"v1 reference","count":22},{"language":"default","tag":"Tools","count":8},{"language":"default","tag":"Experimental","count":8},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Get Started","count":6},{"language":"default","tag":"Packages","count":5},{"language":"default","tag":"Reference","count":4},{"language":"default","tag":"Guides","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--githits-primary-soft:#ffb8de;--githits-primary-light:#ff72be;--githits-primary:#ff4fae;--githits-primary-strong:#cc3f8b;--githits-primary-deep:#651f45;--githits-secondary-soft:#fde3d0;--githits-secondary-light:#faac72;--githits-secondary:#ff872f;--githits-secondary-strong:#ba6c33;--githits-secondary-deep:#3e2411;--githits-neutral-white:#ffffff;--githits-neutral-100:#d5d9df;--githits-neutral-200:#abb2bf;--githits-body-dark:#c4cad3;--githits-neutral-300:#7d838d;--githits-neutral-400:#4a4e56;--githits-neutral-500:#21262d;--githits-neutral-600:#13161a;--githits-light-background:var(--githits-neutral-white);--githits-light-surface:var(--githits-neutral-100);--githits-light-panel:var(--githits-neutral-white);--githits-light-border:var(--githits-neutral-200);--githits-dark-background:var(--githits-neutral-600);--githits-dark-surface:var(--githits-neutral-500);--githits-dark-border:var(--githits-neutral-400);--githits-feature-panel-light:linear-gradient(\n 135deg,\n color-mix(in srgb, var(--githits-secondary-soft) 58%, var(--githits-neutral-white)),\n color-mix(in srgb, var(--githits-primary-soft) 54%, var(--githits-neutral-white))\n );--githits-feature-panel-dark:color-mix(in srgb, var(--githits-neutral-600) 78%, var(--githits-neutral-500))}html{letter-spacing:0}code,pre{font-family:Consolas,\"SF Mono\",Menlo,Monaco,monospace}#navbar{border-bottom-color:color-mix(in srgb,var(--githits-primary) 18%,transparent);font-size-adjust:.545}#navbar a[href=\"/\"]:has(img[src*=githits-wordmark]){box-sizing:border-box;display:inline-flex;flex:0 0 9.5rem;width:9.5rem;min-width:9.5rem;align-items:center;gap:.5rem}#navbar a[href=\"/\"]:has(img[src*=githits-wordmark])::after{content:\"Beta\";display:inline-flex;align-items:center;justify-content:center;min-height:1.5rem;padding:.25rem .5rem;border:1px solid #992f68;border-radius:.25rem;color:var(--githits-primary-light);font-family:Inter,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;font-size:.625rem;font-weight:600;line-height:1rem;text-transform:uppercase;white-space:nowrap}#navbar a[href=\"/\"] img[src*=githits-wordmark]{width:6.5rem!important;height:1.516rem!important;aspect-ratio:554/129.3;object-fit:contain;vertical-align:middle}@container navbar (max-width: 48rem){#navbar nav[aria-label=Main]{flex-shrink:0}#navbar nav[aria-label=Main] a{padding-inline:.25rem}}.githits-command-toolbar{display:flex;justify-content:flex-end;margin:1.5rem 0 -.25rem}.githits-command-toggle{display:inline-flex;align-items:center;gap:.625rem;min-height:2.5rem;padding:.5rem .875rem;border:1px solid color-mix(in srgb,var(--githits-neutral-300) 38%,transparent);border-radius:8px;background:color-mix(in srgb,var(--githits-neutral-white) 86%,transparent);color:var(--githits-neutral-500);font-size:.875rem;font-weight:600;line-height:1;cursor:pointer}.githits-command-toggle::after{content:\"\";width:.5rem;height:.5rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform 160ms ease}.githits-command-toggle[aria-expanded=true]::after{transform:rotate(225deg)}.githits-command-toggle:focus-visible,.githits-command-toggle:hover{border-color:var(--githits-primary);color:var(--githits-primary-deep)}html[data-current-path=\"/cli/commands\"] #content [data-component-part=accordion-title-container]{display:flex;flex-direction:column;gap:.25rem;line-height:1.35}html[data-current-path=\"/cli/commands\"] #content [data-component-part=accordion-description]{color:var(--githits-neutral-400);line-height:1.45}#content.mdx-content [data-as=p],#content.mdx-content [data-component-part=card-content],#content.mdx-content [data-component-part=card-content] *,#content.mdx-content>span{color:var(--githits-neutral-400)}.githits-beta-note{display:inline-flex;align-items:center;max-width:100%;margin:.75rem 0 1.5rem;padding:.5rem .75rem;border:1px solid color-mix(in srgb,var(--githits-primary) 34%,transparent);border-radius:8px;background:color-mix(in srgb,var(--githits-primary) 9%,transparent);color:var(--githits-neutral-500);font-size:.875rem;font-weight:500;line-height:1.5}:not(pre)>code{background:var(--githits-neutral-100);color:var(--githits-primary-deep)}[data-theme=dark],[data-theme=dark] .githits-feature-grid p,body.dark,body.dark .githits-feature-grid p,body[class~=dark],body[class~=dark] .githits-feature-grid p,html.dark,html.dark .githits-feature-grid p,html[class~=dark],html[class~=dark] .githits-feature-grid p{color:var(--githits-neutral-100)}[data-theme=dark] h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] h4,[data-theme=dark] h5,[data-theme=dark] h6,[data-theme=dark] strong,body.dark h1,body.dark h2,body.dark h3,body.dark h4,body.dark h5,body.dark h6,body.dark strong,body[class~=dark] h1,body[class~=dark] h2,body[class~=dark] h3,body[class~=dark] h4,body[class~=dark] h5,body[class~=dark] h6,body[class~=dark] strong,html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark h5,html.dark h6,html.dark strong,html[class~=dark] h1,html[class~=dark] h2,html[class~=dark] h3,html[class~=dark] h4,html[class~=dark] h5,html[class~=dark] h6,html[class~=dark] strong{color:var(--githits-neutral-white)}[data-theme=dark] #content.mdx-content [data-as=p],[data-theme=dark] #content.mdx-content [data-component-part=card-content],[data-theme=dark] #content.mdx-content [data-component-part=card-content] *,[data-theme=dark] #content.mdx-content>span,[data-theme=dark] blockquote,[data-theme=dark] li,[data-theme=dark] p,[data-theme=dark] td,body.dark #content.mdx-content [data-as=p],body.dark #content.mdx-content [data-component-part=card-content],body.dark #content.mdx-content [data-component-part=card-content] *,body.dark #content.mdx-content>span,body.dark blockquote,body.dark li,body.dark p,body.dark td,body[class~=dark] #content.mdx-content [data-as=p],body[class~=dark] #content.mdx-content [data-component-part=card-content],body[class~=dark] #content.mdx-content [data-component-part=card-content] *,body[class~=dark] #content.mdx-content>span,body[class~=dark] blockquote,body[class~=dark] li,body[class~=dark] p,body[class~=dark] td,html.dark #content.mdx-content [data-as=p],html.dark #content.mdx-content [data-component-part=card-content],html.dark #content.mdx-content [data-component-part=card-content] *,html.dark #content.mdx-content>span,html.dark blockquote,html.dark li,html.dark p,html.dark td,html[class~=dark] #content.mdx-content [data-as=p],html[class~=dark] #content.mdx-content [data-component-part=card-content],html[class~=dark] #content.mdx-content [data-component-part=card-content] *,html[class~=dark] #content.mdx-content>span,html[class~=dark] blockquote,html[class~=dark] li,html[class~=dark] p,html[class~=dark] td{color:var(--githits-body-dark)}[data-theme=dark] :not(pre)>code,body.dark :not(pre)>code,body[class~=dark] :not(pre)>code,html.dark :not(pre)>code,html[class~=dark] :not(pre)>code{background:var(--githits-neutral-500);color:var(--githits-primary-soft)}[data-theme=dark] pre,body.dark pre,body[class~=dark] pre,html.dark pre,html[class~=dark] pre{background:var(--githits-neutral-600);border-color:var(--githits-neutral-400)}pre code{background:0 0!important}.githits-feature-grid{container-type:inline-size;container-name:githits-features;margin-top:1.25rem}.githits-feature-grid .githits-tool-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12.5rem),1fr));gap:1rem}.githits-feature-grid>[role=link],.githits-feature-grid>a{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:center;margin-bottom:1rem}.githits-feature-grid [role=link],.githits-feature-grid a{background:0 0!important;border:1px solid transparent!important;border-color:transparent!important;box-shadow:none!important;color:var(--githits-neutral-600);outline:0!important}.githits-feature-grid [role=link]::after,.githits-feature-grid [role=link]::before,.githits-feature-grid a::after,.githits-feature-grid a::before{border:0!important;box-shadow:none!important;outline:0!important}.githits-feature-grid [role=link]:focus,.githits-feature-grid [role=link]:focus-visible,.githits-feature-grid [role=link]:hover,.githits-feature-grid a:focus,.githits-feature-grid a:focus-visible,.githits-feature-grid a:hover{background:0 0!important;border:1px solid var(--githits-primary)!important;box-shadow:none!important;outline:0!important}[data-theme=dark] .githits-feature-grid [role=link]:focus,[data-theme=dark] .githits-feature-grid [role=link]:focus-visible,[data-theme=dark] .githits-feature-grid [role=link]:hover,[data-theme=dark] .githits-feature-grid a:focus,[data-theme=dark] .githits-feature-grid a:focus-visible,[data-theme=dark] .githits-feature-grid a:hover,body.dark .githits-feature-grid [role=link]:focus,body.dark .githits-feature-grid [role=link]:focus-visible,body.dark .githits-feature-grid [role=link]:hover,body.dark .githits-feature-grid a:focus,body.dark .githits-feature-grid a:focus-visible,body.dark .githits-feature-grid a:hover,body[class~=dark] .githits-feature-grid [role=link]:focus,body[class~=dark] .githits-feature-grid [role=link]:focus-visible,body[class~=dark] .githits-feature-grid [role=link]:hover,body[class~=dark] .githits-feature-grid a:focus,body[class~=dark] .githits-feature-grid a:focus-visible,body[class~=dark] .githits-feature-grid a:hover,html.dark .githits-feature-grid [role=link]:focus,html.dark .githits-feature-grid [role=link]:focus-visible,html.dark .githits-feature-grid [role=link]:hover,html.dark .githits-feature-grid a:focus,html.dark .githits-feature-grid a:focus-visible,html.dark .githits-feature-grid a:hover,html[class~=dark] .githits-feature-grid [role=link]:focus,html[class~=dark] .githits-feature-grid [role=link]:focus-visible,html[class~=dark] .githits-feature-grid [role=link]:hover,html[class~=dark] .githits-feature-grid a:focus,html[class~=dark] .githits-feature-grid a:focus-visible,html[class~=dark] .githits-feature-grid a:hover{border-color:var(--githits-primary-light)!important}.githits-feature-grid [role=link] :not(img),.githits-feature-grid a :not(img){border-color:transparent!important;box-shadow:none!important;outline:0!important}.githits-feature-grid img{aspect-ratio:16/9;box-sizing:border-box;object-fit:contain;padding:.375rem;background:var(--githits-feature-panel-light);border:0!important;border-radius:8px}.githits-feature-grid>[role=link] img,.githits-feature-grid>a img{max-height:17rem}.githits-feature-grid h2,.githits-feature-grid h3,.githits-feature-grid h4,.githits-feature-grid strong{color:var(--githits-neutral-600)}.githits-feature-grid [data-component-part=card-content],.githits-feature-grid [data-component-part=card-content] *,.githits-feature-grid p{color:var(--githits-neutral-400)}[data-theme=dark] .githits-feature-grid [role=link],[data-theme=dark] .githits-feature-grid a,[data-theme=dark] .githits-feature-grid h2,[data-theme=dark] .githits-feature-grid h3,[data-theme=dark] .githits-feature-grid h4,[data-theme=dark] .githits-feature-grid strong,body.dark .githits-feature-grid [role=link],body.dark .githits-feature-grid a,body.dark .githits-feature-grid h2,body.dark .githits-feature-grid h3,body.dark .githits-feature-grid h4,body.dark .githits-feature-grid strong,body[class~=dark] .githits-feature-grid [role=link],body[class~=dark] .githits-feature-grid a,body[class~=dark] .githits-feature-grid h2,body[class~=dark] .githits-feature-grid h3,body[class~=dark] .githits-feature-grid h4,body[class~=dark] .githits-feature-grid strong,html.dark .githits-feature-grid [role=link],html.dark .githits-feature-grid a,html.dark .githits-feature-grid h2,html.dark .githits-feature-grid h3,html.dark .githits-feature-grid h4,html.dark .githits-feature-grid strong,html[class~=dark] .githits-feature-grid [role=link],html[class~=dark] .githits-feature-grid a,html[class~=dark] .githits-feature-grid h2,html[class~=dark] .githits-feature-grid h3,html[class~=dark] .githits-feature-grid h4,html[class~=dark] .githits-feature-grid strong{color:var(--githits-neutral-white)}[data-theme=dark] .githits-feature-grid img,body.dark .githits-feature-grid img,body[class~=dark] .githits-feature-grid img,html.dark .githits-feature-grid img,html[class~=dark] .githits-feature-grid img{background:var(--githits-feature-panel-dark);border:0!important}[data-theme=dark] .githits-beta-note,body.dark .githits-beta-note,body[class~=dark] .githits-beta-note,html.dark .githits-beta-note,html[class~=dark] .githits-beta-note{background:color-mix(in srgb,var(--githits-primary) 16%,transparent);border-color:color-mix(in srgb,var(--githits-primary-light) 42%,transparent);color:var(--githits-neutral-100)}[data-theme=dark] .githits-command-toggle,body.dark .githits-command-toggle,body[class~=dark] .githits-command-toggle,html.dark .githits-command-toggle,html[class~=dark] .githits-command-toggle{background:color-mix(in srgb,var(--githits-neutral-500) 72%,transparent);border-color:var(--githits-neutral-400);color:var(--githits-neutral-100)}[data-theme=dark] .githits-command-toggle:focus-visible,[data-theme=dark] .githits-command-toggle:hover,body.dark .githits-command-toggle:focus-visible,body.dark .githits-command-toggle:hover,body[class~=dark] .githits-command-toggle:focus-visible,body[class~=dark] .githits-command-toggle:hover,html.dark .githits-command-toggle:focus-visible,html.dark .githits-command-toggle:hover,html[class~=dark] .githits-command-toggle:focus-visible,html[class~=dark] .githits-command-toggle:hover{border-color:var(--githits-primary-light);color:var(--githits-primary-soft)}[data-theme=dark][data-current-path=\"/cli/commands\"] #content [data-component-part=accordion-description],html.dark[data-current-path=\"/cli/commands\"] #content [data-component-part=accordion-description],html[class~=dark][data-current-path=\"/cli/commands\"] #content [data-component-part=accordion-description],html[data-current-path=\"/cli/commands\"] [data-theme=dark] #content [data-component-part=accordion-description],html[data-current-path=\"/cli/commands\"] body.dark #content [data-component-part=accordion-description],html[data-current-path=\"/cli/commands\"] body[class~=dark] #content [data-component-part=accordion-description]{color:var(--githits-neutral-200)}[data-theme=dark] .githits-feature-grid [data-component-part=card-content],[data-theme=dark] .githits-feature-grid [data-component-part=card-content] *,body.dark .githits-feature-grid [data-component-part=card-content],body.dark .githits-feature-grid [data-component-part=card-content] *,body[class~=dark] .githits-feature-grid [data-component-part=card-content],body[class~=dark] .githits-feature-grid [data-component-part=card-content] *,html.dark .githits-feature-grid [data-component-part=card-content],html.dark .githits-feature-grid [data-component-part=card-content] *,html[class~=dark] .githits-feature-grid [data-component-part=card-content],html[class~=dark] .githits-feature-grid [data-component-part=card-content] *{color:var(--githits-neutral-100)}@container githits-features (max-width: 32rem){.githits-feature-grid>[role=link],.githits-feature-grid>a{display:block}}"}],"page":{"pagePath":"api-reference/v1/read/read-documentation-or-source-code","slug":"/api-reference/v1/read/read-documentation-or-source-code","pageMetadata":{"title":"Read documentation or source code","description":"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit.\n\n## Choose a target\n\nFor documentation, follow the `read` action from `POST /v1/list`, passing its `target` and non-null `path` unchanged. Browse hosted documentation with an explicit `site:` target; package and repository inventories include local documentation. Documentation results from `POST /v1/searches` also provide a `docs_read_target`, which you can pass as `target` without a path. An HTTP(S) target can include a fragment to select one indexed section.\n\nFor source code, pass both `target` and the exact target-relative file `path`. Use a package target such as `crates:serde@1.0.0`, or a supported public repository locator such as `https://github.com/serde-rs/serde@master`. Find paths with `POST /v1/list`, `POST /v1/grep`, or a code result from `POST /v1/searches`. Repository refs use `@`; a literal `#` is not supported in a code target.\n\nWhen you have a read action, pass its `target` and non-null `path` unchanged. A scoped site target can use `/` to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path.\n\nEncode both values as query parameters. Encode a literal `+` as `%2B`, `#` as `%23`, and `%` as `%25`; an unencoded `+` is decoded as a space. For example, `GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F` reads that scope's landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with `400 VALIDATION_ERROR`. Target resolution or indexing errors can occur before the source path is validated.\n\n## Interpret the result\n\nBranch on the required `kind` field:\n\n| `kind` | Result |\n| --- | --- |\n| `documentation` | Page identity, reusable `docs_read_target`, and exact crawled or repository source details. |\n| `code` | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. |\n\nDocumentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An `end_line` past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds `0`–`0`; binary code has null content and bounds. Explicit bounds require the `content` field group.\n\n## Selector catalogue\n\nUse these selectors with the `fields` query parameter. Supplying `fields` replaces the defaults; `kind` and the identity and provenance fields for the returned branch remain present. See [Choose what the response includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes) for the shared selection rules.\n\n| Selector | Documentation result | Code result | Default |\n| --- | --- | --- | --- |\n| `metadata` | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes |\n| `content` | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes |\n\n## Wait for code indexing\n\n`wait_timeout_ms` controls how long to wait for code preparation, from `0` to `60000` milliseconds; the default is `20000`. Use `0` when the caller prefers an immediate `503 PACKAGE_INDEXING` response if code is not ready. Documentation reads do not use this budget for indexing.\n\nFor failures, branch on the problem response's stable `code`. Correct malformed locators, paths, ranges, or selectors after `400 VALIDATION_ERROR`. A `404` means the requested page, file, package, version, repository, or ref was not found. A `409 DOCUMENTATION_PAGE_OWNER_CONFLICT` means the URL belongs to another documentation corpus. A `422` means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect `Retry-After` after `429 RATE_LIMITED`; retry `503 PACKAGE_INDEXING` later or with a positive wait budget. A `504 TIMEOUT` does not guarantee that preparation stopped.\n","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/read","href":"/api-reference/v1/read/read-documentation-or-source-code","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h2: \"h2\",\n p: \"p\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit.\"\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Choose a target\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For documentation, follow the \", _jsx(_components.code, {\n children: \"read\"\n }), \" action from \", _jsx(_components.code, {\n children: \"POST /v1/list\"\n }), \", passing its \", _jsx(_components.code, {\n children: \"target\"\n }), \" and non-null \", _jsx(_components.code, {\n children: \"path\"\n }), \" unchanged. Browse hosted documentation with an explicit \", _jsx(_components.code, {\n children: \"site:\"\n }), \" target; package and repository inventories include local documentation. Documentation results from \", _jsx(_components.code, {\n children: \"POST /v1/searches\"\n }), \" also provide a \", _jsx(_components.code, {\n children: \"docs_read_target\"\n }), \", which you can pass as \", _jsx(_components.code, {\n children: \"target\"\n }), \" without a path. An HTTP(S) target can include a fragment to select one indexed section.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For source code, pass both \", _jsx(_components.code, {\n children: \"target\"\n }), \" and the exact target-relative file \", _jsx(_components.code, {\n children: \"path\"\n }), \". Use a package target such as \", _jsx(_components.code, {\n children: \"crates:serde@1.0.0\"\n }), \", or a supported public repository locator such as \", _jsx(_components.code, {\n children: \"https://github.com/serde-rs/serde@master\"\n }), \". Find paths with \", _jsx(_components.code, {\n children: \"POST /v1/list\"\n }), \", \", _jsx(_components.code, {\n children: \"POST /v1/grep\"\n }), \", or a code result from \", _jsx(_components.code, {\n children: \"POST /v1/searches\"\n }), \". Repository refs use \", _jsx(_components.code, {\n children: \"@\"\n }), \"; a literal \", _jsx(_components.code, {\n children: \"#\"\n }), \" is not supported in a code target.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"When you have a read action, pass its \", _jsx(_components.code, {\n children: \"target\"\n }), \" and non-null \", _jsx(_components.code, {\n children: \"path\"\n }), \" unchanged. A scoped site target can use \", _jsx(_components.code, {\n children: \"/\"\n }), \" to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Encode both values as query parameters. Encode a literal \", _jsx(_components.code, {\n children: \"+\"\n }), \" as \", _jsx(_components.code, {\n children: \"%2B\"\n }), \", \", _jsx(_components.code, {\n children: \"#\"\n }), \" as \", _jsx(_components.code, {\n children: \"%23\"\n }), \", and \", _jsx(_components.code, {\n children: \"%\"\n }), \" as \", _jsx(_components.code, {\n children: \"%25\"\n }), \"; an unencoded \", _jsx(_components.code, {\n children: \"+\"\n }), \" is decoded as a space. For example, \", _jsx(_components.code, {\n children: \"GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F\"\n }), \" reads that scope’s landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with \", _jsx(_components.code, {\n children: \"400 VALIDATION_ERROR\"\n }), \". Target resolution or indexing errors can occur before the source path is validated.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Interpret the result\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Branch on the required \", _jsx(_components.code, {\n children: \"kind\"\n }), \" field:\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: _jsx(_components.code, {\n children: \"kind\"\n })\n }), _jsx(_components.th, {\n children: \"Result\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"documentation\"\n })\n }), _jsxs(_components.td, {\n children: [\"Page identity, reusable \", _jsx(_components.code, {\n children: \"docs_read_target\"\n }), \", and exact crawled or repository source details.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"code\"\n })\n }), _jsx(_components.td, {\n children: \"Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit.\"\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An \", _jsx(_components.code, {\n children: \"end_line\"\n }), \" past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds \", _jsx(_components.code, {\n children: \"0\"\n }), \"–\", _jsx(_components.code, {\n children: \"0\"\n }), \"; binary code has null content and bounds. Explicit bounds require the \", _jsx(_components.code, {\n children: \"content\"\n }), \" field group.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Selector catalogue\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use these selectors with the \", _jsx(_components.code, {\n children: \"fields\"\n }), \" query parameter. Supplying \", _jsx(_components.code, {\n children: \"fields\"\n }), \" replaces the defaults; \", _jsx(_components.code, {\n children: \"kind\"\n }), \" and the identity and provenance fields for the returned branch remain present. See \", _jsx(_components.a, {\n href: \"https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes\",\n children: \"Choose what the response includes\"\n }), \" for the shared selection rules.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Selector\"\n }), _jsx(_components.th, {\n children: \"Documentation result\"\n }), _jsx(_components.th, {\n children: \"Code result\"\n }), _jsx(_components.th, {\n children: \"Default\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"metadata\"\n })\n }), _jsx(_components.td, {\n children: \"Title, format, breadcrumbs, update and source context, and package ownership when known.\"\n }), _jsx(_components.td, {\n children: \"Detected language and total line count.\"\n }), _jsx(_components.td, {\n children: \"Yes\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"content\"\n })\n }), _jsx(_components.td, {\n children: \"Body, total lines, returned range, and resolved section anchor.\"\n }), _jsx(_components.td, {\n children: \"Body and returned range; values are null for binary files.\"\n }), _jsx(_components.td, {\n children: \"Yes\"\n })]\n })]\n })]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Wait for code indexing\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"wait_timeout_ms\"\n }), \" controls how long to wait for code preparation, from \", _jsx(_components.code, {\n children: \"0\"\n }), \" to \", _jsx(_components.code, {\n children: \"60000\"\n }), \" milliseconds; the default is \", _jsx(_components.code, {\n children: \"20000\"\n }), \". Use \", _jsx(_components.code, {\n children: \"0\"\n }), \" when the caller prefers an immediate \", _jsx(_components.code, {\n children: \"503 PACKAGE_INDEXING\"\n }), \" response if code is not ready. Documentation reads do not use this budget for indexing.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For failures, branch on the problem response’s stable \", _jsx(_components.code, {\n children: \"code\"\n }), \". Correct malformed locators, paths, ranges, or selectors after \", _jsx(_components.code, {\n children: \"400 VALIDATION_ERROR\"\n }), \". A \", _jsx(_components.code, {\n children: \"404\"\n }), \" means the requested page, file, package, version, repository, or ref was not found. A \", _jsx(_components.code, {\n children: \"409 DOCUMENTATION_PAGE_OWNER_CONFLICT\"\n }), \" means the URL belongs to another documentation corpus. A \", _jsx(_components.code, {\n children: \"422\"\n }), \" means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect \", _jsx(_components.code, {\n children: \"Retry-After\"\n }), \" after \", _jsx(_components.code, {\n children: \"429 RATE_LIMITED\"\n }), \"; retry \", _jsx(_components.code, {\n children: \"503 PACKAGE_INDEXING\"\n }), \" later or with a positive wait budget. A \", _jsx(_components.code, {\n children: \"504 TIMEOUT\"\n }), \" does not guarantee that preparation stopped.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Read documentation or source code","description":"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit.\n\n## Choose a target\n\nFor documentation, follow the `read` action from `POST /v1/list`, passing its `target` and non-null `path` unchanged. Browse hosted documentation with an explicit `site:` target; package and repository inventories include local documentation. Documentation results from `POST /v1/searches` also provide a `docs_read_target`, which you can pass as `target` without a path. An HTTP(S) target can include a fragment to select one indexed section.\n\nFor source code, pass both `target` and the exact target-relative file `path`. Use a package target such as `crates:serde@1.0.0`, or a supported public repository locator such as `https://github.com/serde-rs/serde@master`. Find paths with `POST /v1/list`, `POST /v1/grep`, or a code result from `POST /v1/searches`. Repository refs use `@`; a literal `#` is not supported in a code target.\n\nWhen you have a read action, pass its `target` and non-null `path` unchanged. A scoped site target can use `/` to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path.\n\nEncode both values as query parameters. Encode a literal `+` as `%2B`, `#` as `%23`, and `%` as `%25`; an unencoded `+` is decoded as a space. For example, `GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F` reads that scope's landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with `400 VALIDATION_ERROR`. Target resolution or indexing errors can occur before the source path is validated.\n\n## Interpret the result\n\nBranch on the required `kind` field:\n\n| `kind` | Result |\n| --- | --- |\n| `documentation` | Page identity, reusable `docs_read_target`, and exact crawled or repository source details. |\n| `code` | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. |\n\nDocumentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An `end_line` past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds `0`–`0`; binary code has null content and bounds. Explicit bounds require the `content` field group.\n\n## Selector catalogue\n\nUse these selectors with the `fields` query parameter. Supplying `fields` replaces the defaults; `kind` and the identity and provenance fields for the returned branch remain present. See [Choose what the response includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes) for the shared selection rules.\n\n| Selector | Documentation result | Code result | Default |\n| --- | --- | --- | --- |\n| `metadata` | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes |\n| `content` | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes |\n\n## Wait for code indexing\n\n`wait_timeout_ms` controls how long to wait for code preparation, from `0` to `60000` milliseconds; the default is `20000`. Use `0` when the caller prefers an immediate `503 PACKAGE_INDEXING` response if code is not ready. Documentation reads do not use this budget for indexing.\n\nFor failures, branch on the problem response's stable `code`. Correct malformed locators, paths, ranges, or selectors after `400 VALIDATION_ERROR`. A `404` means the requested page, file, package, version, repository, or ref was not found. A `409 DOCUMENTATION_PAGE_OWNER_CONFLICT` means the URL belongs to another documentation corpus. A `422` means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect `Retry-After` after `429 RATE_LIMITED`; retry `503 PACKAGE_INDEXING` later or with a positive wait budget. A `504 TIMEOUT` does not guarantee that preparation stopped.\n","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/read","href":"/api-reference/v1/read/read-documentation-or-source-code","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit.\n\n## Choose a target\n\nFor documentation, follow the `read` action from `POST /v1/list`, passing its `target` and non-null `path` unchanged. Browse hosted documentation with an explicit `site:` target; package and repository inventories include local documentation. Documentation results from `POST /v1/searches` also provide a `docs_read_target`, which you can pass as `target` without a path. An HTTP(S) target can include a fragment to select one indexed section.\n\nFor source code, pass both `target` and the exact target-relative file `path`. Use a package target such as `crates:serde@1.0.0`, or a supported public repository locator such as `https://github.com/serde-rs/serde@master`. Find paths with `POST /v1/list`, `POST /v1/grep`, or a code result from `POST /v1/searches`. Repository refs use `@`; a literal `#` is not supported in a code target.\n\nWhen you have a read action, pass its `target` and non-null `path` unchanged. A scoped site target can use `/` to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path.\n\nEncode both values as query parameters. Encode a literal `+` as `%2B`, `#` as `%23`, and `%` as `%25`; an unencoded `+` is decoded as a space. For example, `GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F` reads that scope's landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with `400 VALIDATION_ERROR`. Target resolution or indexing errors can occur before the source path is validated.\n\n## Interpret the result\n\nBranch on the required `kind` field:\n\n| `kind` | Result |\n| --- | --- |\n| `documentation` | Page identity, reusable `docs_read_target`, and exact crawled or repository source details. |\n| `code` | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. |\n\nDocumentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An `end_line` past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds `0`–`0`; binary code has null content and bounds. Explicit bounds require the `content` field group.\n\n## Selector catalogue\n\nUse these selectors with the `fields` query parameter. Supplying `fields` replaces the defaults; `kind` and the identity and provenance fields for the returned branch remain present. See [Choose what the response includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes) for the shared selection rules.\n\n| Selector | Documentation result | Code result | Default |\n| --- | --- | --- | --- |\n| `metadata` | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes |\n| `content` | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes |\n\n## Wait for code indexing\n\n`wait_timeout_ms` controls how long to wait for code preparation, from `0` to `60000` milliseconds; the default is `20000`. Use `0` when the caller prefers an immediate `503 PACKAGE_INDEXING` response if code is not ready. Documentation reads do not use this budget for indexing.\n\nFor failures, branch on the problem response's stable `code`. Correct malformed locators, paths, ranges, or selectors after `400 VALIDATION_ERROR`. A `404` means the requested page, file, package, version, repository, or ref was not found. A `409 DOCUMENTATION_PAGE_OWNER_CONFLICT` means the URL belongs to another documentation corpus. A `422` means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect `Retry-After` after `429 RATE_LIMITED`; retry `503 PACKAGE_INDEXING` later or with a positive wait budget. A `504 TIMEOUT` does not guarantee that preparation stopped.\n","operationId":"read","parameters":["2b3f7f9d-22e8-49d9-bbe7-8928fcc0dd31","d80bc810-0939-45e6-a6cc-bfd05959c1cd","a510a712-3800-4937-af07-fb2fbdd5ebb7","aa654e57-676d-4d20-a99c-dac17e7cd9ca","9ffcf613-7922-41ef-a3c3-4bcd25b16c8a","1372a371-63b1-4645-a59f-b8a844ab9008","42e563ad-ba57-4b1e-92e3-4d06bb50b5f5","2f3fcf97-3804-4811-87b6-3a7ed47c9228","c9ce36bc-6052-4732-b612-052ce29ffe72","c86e05d0-49a9-48b0-9643-e3188d87cd39"],"responses":{"200":"3785ea9e-cf75-40e7-accf-617a532c9466","400":"7b591fae-bb6f-4284-b0b3-742321bc1f77","401":"b5a9c7e8-4a82-4bed-9c71-38d9a05e8691","403":"255707e1-5098-4018-8a22-dc1da87c346d","404":"f6cd2700-86ab-4cec-89bd-f129368a46bf","405":"dc10b6a8-9444-4917-a65a-89a50fbb9eef","409":"0cc93fd6-8690-4a01-9ce1-8df840406966","422":"215c2c1d-aa7a-454f-ad58-8d1e38f357c0","429":"68498621-9a88-4154-9f1e-6e23a0ed1755","500":"8aa7696c-6105-4cfe-9056-f9749b57550c","502":"5562be87-c7f5-40d7-ab4c-c3c07793d088","503":"8c6ee3bf-71e8-4546-b176-9d49e70f4899","504":"f7252b0c-299b-4100-9888-4d43797715c0"},"security":["49dd0347-daed-48a5-9c50-de5b011734f0"],"summary":"Read documentation or source code","tags":["Read"],"x-codeSamples":[{"label":"Documentation target","lang":"HTTP","source":"GET /v1/read?target=https%3A%2F%2Fdocs.example.org%2Fguide%23install HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"},{"label":"Package source file","lang":"HTTP","source":"GET /v1/read?target=crates%3Aserde%401.0.0\u0026path=src%2Flib.rs HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"},{"label":"Repository range","lang":"HTTP","source":"GET /v1/read?target=https%3A%2F%2Fgithub.com%2Fexample%2Frepository%40main\u0026path=src%2Fmain.rs\u0026start_line=1\u0026end_line=40\u0026fields=content HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"}],"x-githits-cost":1,"x-githits-mcp-tool":"read","x-githits-selection":{"default":["metadata","content"],"dependencies":{},"input_dependencies":{"end_line":["content"],"start_line":["content"]},"mandatory_fields":["kind"],"max_decoded_bytes":2048,"selectors":[{"default":true,"description":"Page metadata or source-file language and line count.","groups":["metadata"],"name":"metadata"},{"default":true,"description":"Page or source-file body and its inclusive returned range.","groups":["content"],"name":"content"}]},"method":"get","type":"path","servers":["078a74e7-4d25-496a-979d-4eff5db36c94"],"path":"/v1/read","baseUrlOptions":["https://api.githits.dev"],"title":"Read documentation or source code","codeSamples":[{"label":"Documentation target","lang":"HTTP","source":"GET /v1/read?target=https%3A%2F%2Fdocs.example.org%2Fguide%23install HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"},{"label":"Package source file","lang":"HTTP","source":"GET /v1/read?target=crates%3Aserde%401.0.0\u0026path=src%2Flib.rs HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"},{"label":"Repository range","lang":"HTTP","source":"GET /v1/read?target=https%3A%2F%2Fgithub.com%2Fexample%2Frepository%40main\u0026path=src%2Fmain.rs\u0026start_line=1\u0026end_line=40\u0026fields=content HTTP/1.1\nHost: api.githits.dev\nAuthorization: Bearer \u003ctoken>"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{"2b3f7f9d-22e8-49d9-bbe7-8928fcc0dd31":{"description":"Required nonblank read target. Pass an emitted read action target unchanged: a documentation page ID or URL, a scoped site: target, a package in \u003cregistry>:\u003cname>[@\u003cversion>] form, or a supported public repository locator. Repository refs use @. Encode literal + as %2B and literal # as %23.","in":"query","name":"target","required":true,"schema":{"type":"string","isRequired":true,"description":"Required nonblank read target. Pass an emitted read action target unchanged: a documentation page ID or URL, a scoped site: target, a package in \u003cregistry>:\u003cname>[@\u003cversion>] form, or a supported public repository locator. Repository refs use @. Encode literal + as %2B and literal # as %23.","uniqueKey":"","typeLabel":"string"}},"d80bc810-0939-45e6-a6cc-bfd05959c1cd":{"description":"Exact path from a read action, preserved after query decoding. Omit null or blank paths. For a scoped site, / reads its landing page; trailing slashes, query bytes, and literal percent bytes can identify distinct pages. Encode path as a query value without normalizing it. NUL and control characters are rejected. Source-file paths must be relative to the addressed target; absolute paths, dot segments, and trailing slashes are invalid.","in":"query","name":"path","required":false,"schema":{"type":"string","isRequired":false,"description":"Exact path from a read action, preserved after query decoding. Omit null or blank paths. For a scoped site, / reads its landing page; trailing slashes, query bytes, and literal percent bytes can identify distinct pages. Encode path as a query value without normalizing it. NUL and control characters are rejected. Source-file paths must be relative to the addressed target; absolute paths, dot segments, and trailing slashes are invalid.","uniqueKey":"","typeLabel":"string"}},"a510a712-3800-4937-af07-fb2fbdd5ebb7":{"description":"Optional positive inclusive start line. Either bound overrides a documentation URL fragment and requires content.","in":"query","name":"start_line","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer","isRequired":false,"description":"Optional positive inclusive start line. Either bound overrides a documentation URL fragment and requires content.","uniqueKey":"","typeLabel":"integer"}},"aa654e57-676d-4d20-a99c-dac17e7cd9ca":{"description":"Optional positive inclusive end line. It must not precede start_line and requires content.","in":"query","name":"end_line","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer","isRequired":false,"description":"Optional positive inclusive end line. It must not precede start_line and requires content.","uniqueKey":"","typeLabel":"integer"}},"9ffcf613-7922-41ef-a3c3-4bcd25b16c8a":{"description":"Milliseconds to wait for code indexing, from 0 to 60000; defaults to 20000. Zero returns 503 PACKAGE_INDEXING immediately when code is not ready. Documentation reads do not use this budget for indexing. The overall request deadline includes the selected budget.","in":"query","name":"wait_timeout_ms","required":false,"schema":{"default":20000,"maximum":60000,"minimum":0,"type":"integer","isRequired":false,"description":"Milliseconds to wait for code indexing, from 0 to 60000; defaults to 20000. Zero returns 503 PACKAGE_INDEXING immediately when code is not ready. Documentation reads do not use this budget for indexing. The overall request deadline includes the selected budget.","uniqueKey":"","typeLabel":"integer"}},"1372a371-63b1-4645-a59f-b8a844ab9008":{"description":"Comma-separated metadata and content response groups; both are selected by default. Supplying fields replaces the defaults. Explicit line bounds require content; kind and branch identity remain present.\n\nUse the case-sensitive selectors in the catalogue. Order and duplicate selectors do not affect the result. ASCII whitespace around selectors is ignored. The decoded value is limited to 2048 UTF-8 bytes. Empty or unknown selectors and repeated `fields` query parameters return `400 VALIDATION_ERROR`. A group does not include nested groups unless the catalogue says so; only listed wildcard bundles are supported.","in":"query","name":"fields","required":false,"schema":{"default":"metadata,content","type":"string","isRequired":false,"description":"Comma-separated metadata and content response groups; both are selected by default. Supplying fields replaces the defaults. Explicit line bounds require content; kind and branch identity remain present.\n\nUse the case-sensitive selectors in the catalogue. Order and duplicate selectors do not affect the result. ASCII whitespace around selectors is ignored. The decoded value is limited to 2048 UTF-8 bytes. Empty or unknown selectors and repeated `fields` query parameters return `400 VALIDATION_ERROR`. A group does not include nested groups unless the catalogue says so; only listed wildcard bundles are supported.","uniqueKey":"","typeLabel":"string"}},"42e563ad-ba57-4b1e-92e3-4d06bb50b5f5":{"description":"Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.","in":"header","name":"X-GitHits-Client-Name","required":false,"schema":{"type":"string","isRequired":false,"description":"Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.","uniqueKey":"","typeLabel":"string"}},"2f3fcf97-3804-4811-87b6-3a7ed47c9228":{"description":"Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.","in":"header","name":"X-GitHits-Client-Version","required":false,"schema":{"type":"string","isRequired":false,"description":"Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.","uniqueKey":"","typeLabel":"string"}},"c9ce36bc-6052-4732-b612-052ce29ffe72":{"description":"Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.","in":"header","name":"X-GitHits-Agent","required":false,"schema":{"type":"string","isRequired":false,"description":"Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.","uniqueKey":"","typeLabel":"string"}},"c86e05d0-49a9-48b0-9643-e3188d87cd39":{"description":"Optional caller-defined session ID: one to 64 ASCII letters, digits, underscores or hyphens, preserved exactly. Supply the header at most once. Invalid supplied IDs return 400 INVALID_SESSION_ID; no session is created.","in":"header","name":"X-GitHits-Session-ID","required":false,"schema":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string","isRequired":false,"description":"Optional caller-defined session ID: one to 64 ASCII letters, digits, underscores or hyphens, preserved exactly. Supply the header at most once. Invalid supplied IDs return 400 INVALID_SESSION_ID; no session is created.","uniqueKey":"","typeLabel":"string"}}},"responses":{"3785ea9e-cf75-40e7-accf-617a532c9466":{"content":{"application/json":{"examples":{"code":{"title":"code","value":{"code_index_state":"current","content":{"body":"fn main() {}\n","end_line":1,"start_line":1},"indexing_ref":null,"is_binary":false,"kind":"code","metadata":{"language":"Rust","total_lines":1},"path":"src/main.rs","repository_file_path":"packages/core/src/main.rs","target_resolution":{"freshness":"current","freshness_reason":"exact_current","requested":{"commit_sha":null,"git_ref":"main","kind":"repo_branch","name":null,"registry":null,"repo_url":"https://github.com/example/repository","version":null},"resolved_requested":{"commit_sha":"0123456789abcdef0123456789abcdef01234567","git_ref":"0123456789abcdef0123456789abcdef01234567","kind":null,"name":null,"registry":null,"repo_url":"https://github.com/example/repository","version":null},"served":{"commit_sha":"0123456789abcdef0123456789abcdef01234567","git_ref":"0123456789abcdef0123456789abcdef01234567","kind":null,"name":null,"registry":null,"repo_url":"https://github.com/example/repository","version":null}}}},"documentation":{"title":"documentation","value":{"content":{"anchor":null,"body":"# Guide\n","end_line":2,"start_line":1,"total_lines":2},"docs_read_target":"https://docs.example.org/guide","id":"guide","kind":"documentation","metadata":{"base_url":"https://docs.example.org/guide","breadcrumbs":["Guide"],"content_format":"markdown","last_updated_at":null,"owner":null,"requested_ref":null,"source_label":"Documentation","title":"Guide"},"source":{"kind":"crawled","url":"https://docs.example.org/guide"}}},"documentation_empty":{"title":"documentation_empty","value":{"content":{"anchor":null,"body":"","end_line":null,"start_line":null,"total_lines":0},"docs_read_target":"empty","id":"empty","kind":"documentation","source":{"kind":"crawled","url":"https://docs.example.org/empty"}}}},"schema":{"oneOf":[{"type":"object","description":"A documentation page or source file, selected by `kind`.","required":["id","docs_read_target","source","kind"],"properties":{"docs_read_target":{"description":"Exact target accepted by a subsequent read.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.docs_read_target","typeLabel":"string"},"id":{"description":"Opaque documentation page ID.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"},"kind":{"enum":["documentation"],"type":"string","isRequired":true,"uniqueKey":"oneOf.0.kind","typeLabel":"enum\u003cstring>"},"source":{"description":"Mandatory source attribution and repository locator when applicable.","properties":{"kind":{"description":"Open source kind: crawled, repository, or unknown for a newer producer enum.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.source.kind","typeLabel":"string"},"url":{"description":"Exact source evidence URL.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.source.url","typeLabel":"string"},"file_path":{"description":"Repository-root path for a known repository snapshot.","type":"string","uniqueKey":"oneOf.0.source.file_path","typeLabel":"string"},"git_ref":{"description":"Exact served Git ref for a known repository snapshot.","type":"string","uniqueKey":"oneOf.0.source.git_ref","typeLabel":"string"},"repo_url":{"description":"Repository root when the source is a known repository snapshot.","type":"string","uniqueKey":"oneOf.0.source.repo_url","typeLabel":"string"}},"required":["kind","url"],"type":"object","isRequired":true,"uniqueKey":"oneOf.0.source","typeLabel":"object"},"content":{"description":"Page body and returned range, absent when unselected.","properties":{"anchor":{"oneOf":[{"description":"Resolved indexed anchor; null for full-page and explicit-line reads.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.content.anchor.oneOf.0","typeLabel":"string"},{"description":"Resolved indexed anchor; null for full-page and explicit-line reads.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.content.anchor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.anchor","typeLabel":"string | null"},"body":{"description":"Full or ranged documentation text, preserving source bytes.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.content.body","typeLabel":"string"},"end_line":{"oneOf":[{"description":"Null only for an empty page.","format":"int32","minimum":1,"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.content.end_line.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"Null only for an empty page.","format":"int32","minimum":1,"type":"null","isRequired":true,"uniqueKey":"oneOf.0.content.end_line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.end_line","typeLabel":"integer\u003cint32> | null"},"start_line":{"oneOf":[{"description":"Null only for an empty page.","format":"int32","minimum":1,"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.content.start_line.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"Null only for an empty page.","format":"int32","minimum":1,"type":"null","isRequired":true,"uniqueKey":"oneOf.0.content.start_line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.content.start_line","typeLabel":"integer\u003cint32> | null"},"total_lines":{"description":"Total line count of the stored page; a terminal LF adds an empty line.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.content.total_lines","typeLabel":"integer\u003cint32>"}},"required":["body","total_lines","start_line","end_line","anchor"],"type":"object","uniqueKey":"oneOf.0.content","typeLabel":"object"},"metadata":{"description":"Atomic descriptive metadata, absent when unselected.","properties":{"base_url":{"oneOf":[{"description":"Base URL for resolving relative links, null when unavailable.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.base_url.oneOf.0","typeLabel":"string"},{"description":"Base URL for resolving relative links, null when unavailable.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.base_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.base_url","typeLabel":"string | null"},"breadcrumbs":{"description":"Ordered navigation labels from the documentation root to this page.","items":{"type":"string","uniqueKey":"oneOf.0.metadata.breadcrumbs.items.[INDEX]","typeLabel":"string"},"type":"array","isRequired":true,"uniqueKey":"oneOf.0.metadata.breadcrumbs","typeLabel":"string[]"},"content_format":{"description":"Content format reported by the documentation source, such as markdown or HTML.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.content_format","typeLabel":"string"},"last_updated_at":{"oneOf":[{"description":"Update timestamp reported by the documentation source, null when unknown.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.last_updated_at.oneOf.0","typeLabel":"string"},{"description":"Update timestamp reported by the documentation source, null when unknown.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.last_updated_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.last_updated_at","typeLabel":"string | null"},"owner":{"oneOf":[{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.0","typeLabel":"null"},{"type":"object","description":"Best-effort package owner, null when the page is not package-scoped.","required":["registry","name","version"],"properties":{"name":{"oneOf":[{"description":"Package name, null when the source cannot report it.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.name.oneOf.0","typeLabel":"string"},{"description":"Package name, null when the source cannot report it.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.name","typeLabel":"string | null"},"registry":{"oneOf":[{"description":"Package registry, null when the source cannot report it.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.registry.oneOf.0","typeLabel":"string"},{"description":"Package registry, null when the source cannot report it.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.registry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.registry","typeLabel":"string | null"},"version":{"oneOf":[{"description":"Package version, null when the page is not version-pinned.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.version.oneOf.0","typeLabel":"string"},{"description":"Package version, null when the page is not version-pinned.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.version.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1.version","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"oneOf.0.metadata.owner.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.owner","typeLabel":"null | object"},"requested_ref":{"oneOf":[{"description":"Requested repository ref, null for crawled pages or when absent.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.requested_ref.oneOf.0","typeLabel":"string"},{"description":"Requested repository ref, null for crawled pages or when absent.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.requested_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.requested_ref","typeLabel":"string | null"},"source_label":{"oneOf":[{"description":"Human-readable source label, null when absent.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.source_label.oneOf.0","typeLabel":"string"},{"description":"Human-readable source label, null when absent.","type":"null","isRequired":true,"uniqueKey":"oneOf.0.metadata.source_label.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.metadata.source_label","typeLabel":"string | null"},"title":{"description":"Page title reported by the documentation source.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.metadata.title","typeLabel":"string"}},"required":["title","content_format","breadcrumbs","last_updated_at","source_label","requested_ref","base_url","owner"],"type":"object","uniqueKey":"oneOf.0.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"A documentation page or source file, selected by `kind`.","required":["path","repository_file_path","is_binary","target_resolution","code_index_state","indexing_ref","kind"],"properties":{"code_index_state":{"description":"Freshness of the served artifact; pending work is a typed error.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.code_index_state","typeLabel":"string"},"indexing_ref":{"oneOf":[{"description":"Active indexing reference, null when absent.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.indexing_ref.oneOf.0","typeLabel":"string"},{"description":"Active indexing reference, null when absent.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.indexing_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.indexing_ref","typeLabel":"string | null"},"is_binary":{"description":"True for non-UTF-8 files; selected body and counters are null.","type":"boolean","isRequired":true,"uniqueKey":"oneOf.1.is_binary","typeLabel":"boolean"},"kind":{"enum":["code"],"type":"string","isRequired":true,"uniqueKey":"oneOf.1.kind","typeLabel":"enum\u003cstring>"},"path":{"description":"Canonical path relative to the requested target.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.path","typeLabel":"string"},"repository_file_path":{"description":"Canonical repository-root path at the served ref.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.repository_file_path","typeLabel":"string"},"target_resolution":{"description":"Requested target, current resolution and exact artifact served.","properties":{"freshness":{"oneOf":[{"description":"Open source freshness vocabulary, including current, `fallback_recent` and provisional. Unfamiliar values pass through unchanged; null means unavailable.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness.oneOf.0","typeLabel":"string"},{"description":"Open source freshness vocabulary, including current, `fallback_recent` and provisional. Unfamiliar values pass through unchanged; null means unavailable.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness","typeLabel":"string | null"},"freshness_reason":{"oneOf":[{"description":"Machine-readable source explanation; null when unavailable.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness_reason.oneOf.0","typeLabel":"string"},{"description":"Machine-readable source explanation; null when unavailable.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.freshness_reason","typeLabel":"string | null"},"requested":{"description":"Original request intent including omitted version or default branch.","properties":{"commit_sha":{"oneOf":[{"description":"Exact commit when known; preferred artifact pin.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.commit_sha.oneOf.0","typeLabel":"string"},{"description":"Exact commit when known; preferred artifact pin.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.commit_sha.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.commit_sha","typeLabel":"string | null"},"git_ref":{"oneOf":[{"description":"Requested or served ref according to this identity side.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.git_ref.oneOf.0","typeLabel":"string"},{"description":"Requested or served ref according to this identity side.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.git_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.git_ref","typeLabel":"string | null"},"kind":{"oneOf":[{"description":"Original request kind on requested identity; null on concrete identities.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.kind.oneOf.0","typeLabel":"string"},{"description":"Original request kind on requested identity; null on concrete identities.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.kind.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.kind","typeLabel":"string | null"},"name":{"oneOf":[{"description":"Canonical package name, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.name.oneOf.0","typeLabel":"string"},{"description":"Canonical package name, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.name","typeLabel":"string | null"},"registry":{"oneOf":[{"description":"Canonical package registry, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.registry.oneOf.0","typeLabel":"string"},{"description":"Canonical package registry, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.registry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.registry","typeLabel":"string | null"},"repo_url":{"oneOf":[{"description":"Repository backing the target when known.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.repo_url.oneOf.0","typeLabel":"string"},{"description":"Repository backing the target when known.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.repo_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.repo_url","typeLabel":"string | null"},"version":{"oneOf":[{"description":"Concrete package version when resolved; null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.version.oneOf.0","typeLabel":"string"},{"description":"Concrete package version when resolved; null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.version.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested.version","typeLabel":"string | null"}},"required":["kind","registry","name","version","repo_url","git_ref","commit_sha"],"type":"object","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.requested","typeLabel":"object"},"resolved_requested":{"description":"Current resolved request; may be fresher than the served artifact.","properties":{"commit_sha":{"oneOf":[{"description":"Exact commit when known; preferred artifact pin.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.commit_sha.oneOf.0","typeLabel":"string"},{"description":"Exact commit when known; preferred artifact pin.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.commit_sha.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.commit_sha","typeLabel":"string | null"},"git_ref":{"oneOf":[{"description":"Requested or served ref according to this identity side.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.git_ref.oneOf.0","typeLabel":"string"},{"description":"Requested or served ref according to this identity side.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.git_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.git_ref","typeLabel":"string | null"},"kind":{"oneOf":[{"description":"Original request kind on requested identity; null on concrete identities.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.kind.oneOf.0","typeLabel":"string"},{"description":"Original request kind on requested identity; null on concrete identities.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.kind.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.kind","typeLabel":"string | null"},"name":{"oneOf":[{"description":"Canonical package name, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.name.oneOf.0","typeLabel":"string"},{"description":"Canonical package name, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.name","typeLabel":"string | null"},"registry":{"oneOf":[{"description":"Canonical package registry, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.registry.oneOf.0","typeLabel":"string"},{"description":"Canonical package registry, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.registry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.registry","typeLabel":"string | null"},"repo_url":{"oneOf":[{"description":"Repository backing the target when known.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.repo_url.oneOf.0","typeLabel":"string"},{"description":"Repository backing the target when known.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.repo_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.repo_url","typeLabel":"string | null"},"version":{"oneOf":[{"description":"Concrete package version when resolved; null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.version.oneOf.0","typeLabel":"string"},{"description":"Concrete package version when resolved; null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.version.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested.version","typeLabel":"string | null"}},"required":["kind","registry","name","version","repo_url","git_ref","commit_sha"],"type":"object","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.resolved_requested","typeLabel":"object"},"served":{"description":"Exact served artifact; prefer `commit_sha` over `git_ref` for repository pagination.","properties":{"commit_sha":{"oneOf":[{"description":"Exact commit when known; preferred artifact pin.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.commit_sha.oneOf.0","typeLabel":"string"},{"description":"Exact commit when known; preferred artifact pin.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.commit_sha.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.commit_sha","typeLabel":"string | null"},"git_ref":{"oneOf":[{"description":"Requested or served ref according to this identity side.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.git_ref.oneOf.0","typeLabel":"string"},{"description":"Requested or served ref according to this identity side.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.git_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.git_ref","typeLabel":"string | null"},"kind":{"oneOf":[{"description":"Original request kind on requested identity; null on concrete identities.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.kind.oneOf.0","typeLabel":"string"},{"description":"Original request kind on requested identity; null on concrete identities.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.kind.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.kind","typeLabel":"string | null"},"name":{"oneOf":[{"description":"Canonical package name, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.name.oneOf.0","typeLabel":"string"},{"description":"Canonical package name, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.name","typeLabel":"string | null"},"registry":{"oneOf":[{"description":"Canonical package registry, null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.registry.oneOf.0","typeLabel":"string"},{"description":"Canonical package registry, null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.registry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.registry","typeLabel":"string | null"},"repo_url":{"oneOf":[{"description":"Repository backing the target when known.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.repo_url.oneOf.0","typeLabel":"string"},{"description":"Repository backing the target when known.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.repo_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.repo_url","typeLabel":"string | null"},"version":{"oneOf":[{"description":"Concrete package version when resolved; null for repository targets.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.version.oneOf.0","typeLabel":"string"},{"description":"Concrete package version when resolved; null for repository targets.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.version.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served.version","typeLabel":"string | null"}},"required":["kind","registry","name","version","repo_url","git_ref","commit_sha"],"type":"object","isRequired":true,"uniqueKey":"oneOf.1.target_resolution.served","typeLabel":"object"}},"required":["requested","resolved_requested","served","freshness","freshness_reason"],"type":"object","isRequired":true,"uniqueKey":"oneOf.1.target_resolution","typeLabel":"object"},"content":{"description":"Atomic source content, absent when unselected.","properties":{"body":{"oneOf":[{"description":"Full or ranged text, empty for empty text files and null for binary files.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.content.body.oneOf.0","typeLabel":"string"},{"description":"Full or ranged text, empty for empty text files and null for binary files.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.content.body.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content.body","typeLabel":"string | null"},"end_line":{"oneOf":[{"description":"Last returned line clamped to EOF, zero for empty text and null for binary files.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.content.end_line.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"Last returned line clamped to EOF, zero for empty text and null for binary files.","format":"int32","minimum":0,"type":"null","isRequired":true,"uniqueKey":"oneOf.1.content.end_line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content.end_line","typeLabel":"integer\u003cint32> | null"},"start_line":{"oneOf":[{"description":"First returned 1-based line, zero for empty text and null for binary files.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.content.start_line.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"First returned 1-based line, zero for empty text and null for binary files.","format":"int32","minimum":0,"type":"null","isRequired":true,"uniqueKey":"oneOf.1.content.start_line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.content.start_line","typeLabel":"integer\u003cint32> | null"}},"required":["body","start_line","end_line"],"type":"object","uniqueKey":"oneOf.1.content","typeLabel":"object"},"metadata":{"description":"Atomic language and line-count metadata, absent when unselected.","properties":{"language":{"oneOf":[{"description":"Detected source language, null for binary or unknown files.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.metadata.language.oneOf.0","typeLabel":"string"},{"description":"Detected source language, null for binary or unknown files.","type":"null","isRequired":true,"uniqueKey":"oneOf.1.metadata.language.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.metadata.language","typeLabel":"string | null"},"total_lines":{"oneOf":[{"description":"Total line count of the served file, null for binary files.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.metadata.total_lines.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"Total line count of the served file, null for binary files.","format":"int32","minimum":0,"type":"null","isRequired":true,"uniqueKey":"oneOf.1.metadata.total_lines.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.metadata.total_lines","typeLabel":"integer\u003cint32> | null"}},"required":["language","total_lines"],"type":"object","uniqueKey":"oneOf.1.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Documentation page or source file","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"X-RateLimit-Limit":{"description":"Maximum requests in the authenticated usage window shared across operations. Optional: supplied only when usage metadata is available.","schema":{"pattern":"^[0-9]+$","type":"string"}},"X-RateLimit-Remaining":{"description":"Requests remaining in that usage window after admission. Advisory snapshot; concurrent requests can consume quota. Optional when usage metadata is unavailable.","schema":{"pattern":"^[0-9]+$","type":"string"}},"X-RateLimit-Reset":{"description":"Usage window reset time as Unix epoch seconds (UTC), rounded up to the next whole second. This is an absolute timestamp, not a delay. Optional when usage metadata is unavailable. Honor Retry-After on 429 when present; other quotas can also reject requests.","schema":{"pattern":"^[0-9]+$","type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"7b591fae-bb6f-4284-b0b3-742321bc1f77":{"content":{"application/problem+json":{"examples":{"invalid_session_id":{"title":"invalid_session_id","value":{"code":"INVALID_SESSION_ID","detail":"X-GitHits-Session-ID must occur once and match [A-Za-z0-9_-]{1,64}.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":400,"title":"Invalid session ID","type":"about:blank"}},"upstream_validation":{"title":"upstream_validation","value":{"code":"VALIDATION_ERROR","detail":"The request is invalid.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":400,"title":"Validation error","type":"about:blank"}},"validation":{"title":"validation","value":{"code":"VALIDATION_ERROR","detail":"query: contains unknown parameters; use only the documented parameters.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":400,"title":"Validation error","type":"about:blank"}}},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"VALIDATION_ERROR: Correct the target, path, line bounds, wait budget or fields selection before retrying. INVALID_SESSION_ID: a supplied session header is invalid or duplicated. Local VALIDATION_ERROR details identify the first invalid field and a client-safe reason, including zero-based batch paths and canonical-version guidance when applicable; submitted values and unknown keys are not echoed.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"b5a9c7e8-4a82-4bed-9c71-38d9a05e8691":{"content":{"application/problem+json":{"example":{"code":"AUTHENTICATION_REQUIRED","detail":"A bearer credential is required.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":401,"title":"Authentication required","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"AUTHENTICATION_REQUIRED","detail":"A bearer credential is required.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":401,"title":"Authentication required","type":"about:blank"}}},"exampleType":"examples"}},"description":"AUTHENTICATION_REQUIRED: Supply a usable bearer token.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"WWW-Authenticate":{"description":"Bearer challenge.","schema":{"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"255707e1-5098-4018-8a22-dc1da87c346d":{"content":{"application/problem+json":{"example":{"code":"FORBIDDEN","detail":"The caller is not allowed to access this resource.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":403,"title":"Forbidden","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"FORBIDDEN","detail":"The caller is not allowed to access this resource.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":403,"title":"Forbidden","type":"about:blank"}}},"exampleType":"examples"}},"description":"FORBIDDEN, ACCOUNT_INACTIVE, FEATURE_FLAG_REQUIRED, TERMS_ACCEPTANCE_REQUIRED: Resolve account access, feature availability or terms acceptance before retrying.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"f6cd2700-86ab-4cec-89bd-f129368a46bf":{"content":{"application/problem+json":{"example":{"code":"READ_TARGET_NOT_FOUND","detail":"The requested read target was not found.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":404,"title":"Read target not found","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"READ_TARGET_NOT_FOUND","detail":"The requested read target was not found.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":404,"title":"Read target not found","type":"about:blank"}}},"exampleType":"examples"}},"description":"READ_TARGET_NOT_FOUND, FILE_NOT_FOUND, PACKAGE_NOT_FOUND, NO_RELEASED_VERSIONS, VERSION_NOT_FOUND, REPOSITORY_NOT_FOUND, REF_NOT_FOUND: The requested page, file, package, version, repository or ref was not found. Check the problem code and correct the corresponding target component before retrying.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"dc10b6a8-9444-4917-a65a-89a50fbb9eef":{"content":{"application/problem+json":{"example":{"code":"METHOD_NOT_ALLOWED","detail":"The requested method is not supported for this route.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":405,"title":"Method not allowed","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"METHOD_NOT_ALLOWED","detail":"The requested method is not supported for this route.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":405,"title":"Method not allowed","type":"about:blank"}}},"exampleType":"examples"}},"description":"METHOD_NOT_ALLOWED: the route does not support this HTTP method.","headers":{"Allow":{"description":"Supported methods: GET, HEAD.","schema":{"type":"string"}},"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"X-Request-ID":{"description":"Request trace ID for diagnostics; matches problem.instance on failures.","schema":{"type":"string"}}},"exampleType":"examples"},"0cc93fd6-8690-4a01-9ce1-8df840406966":{"content":{"application/problem+json":{"example":{"code":"DOCUMENTATION_PAGE_OWNER_CONFLICT","detail":"The documentation URL belongs to another documentation corpus.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":409,"title":"Documentation page owner conflict","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"DOCUMENTATION_PAGE_OWNER_CONFLICT","detail":"The documentation URL belongs to another documentation corpus.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":409,"title":"Documentation page owner conflict","type":"about:blank"}}},"exampleType":"examples"}},"description":"DOCUMENTATION_PAGE_OWNER_CONFLICT: Use the docs_read_target returned for the intended documentation corpus.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"215c2c1d-aa7a-454f-ad58-8d1e38f357c0":{"content":{"application/problem+json":{"example":{"code":"DOCUMENTATION_SECTION_UNRESOLVED","detail":"The requested target cannot be returned as one read result.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":422,"title":"Read target unresolved","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"DOCUMENTATION_SECTION_UNRESOLVED","detail":"The requested target cannot be returned as one read result.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":422,"title":"Read target unresolved","type":"about:blank"}}},"exampleType":"examples"}},"description":"DOCUMENTATION_SECTION_UNRESOLVED, FILE_PATH_EXCLUDED, SOURCE_FILE_INVENTORY_UNKNOWN, UNSUPPORTED_PACKAGE_VARIANTS, AMBIGUOUS_REF, REF_UNRESOLVABLE: The target exists but the requested section, file, package variant or repository ref cannot produce one result. Check the problem code and choose a more specific or supported target.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"68498621-9a88-4154-9f1e-6e23a0ed1755":{"content":{"application/problem+json":{"example":{"code":"RATE_LIMITED","detail":"The request was rate limited.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":429,"title":"Rate limited","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"RATE_LIMITED","detail":"The request was rate limited.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":429,"title":"Rate limited","type":"about:blank"}}},"exampleType":"examples"}},"description":"RATE_LIMITED: Respect Retry-After when present before retrying. RATE_LIMITED also represents shared daily allowance exhaustion (upstream QUOTA_EXCEEDED). Retry-After uses the upstream HTTP header when supplied, otherwise an HTTP date derived from reset_at. Retry after that time.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"Retry-After":{"description":"Optional bounded delta seconds or HTTP date.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Maximum requests in the authenticated usage window shared across operations. Optional: supplied only when usage metadata is available.","schema":{"pattern":"^[0-9]+$","type":"string"}},"X-RateLimit-Remaining":{"description":"Requests remaining in that usage window after admission. Advisory snapshot; concurrent requests can consume quota. Optional when usage metadata is unavailable.","schema":{"pattern":"^[0-9]+$","type":"string"}},"X-RateLimit-Reset":{"description":"Usage window reset time as Unix epoch seconds (UTC), rounded up to the next whole second. This is an absolute timestamp, not a delay. Optional when usage metadata is unavailable. Honor Retry-After on 429 when present; other quotas can also reject requests.","schema":{"pattern":"^[0-9]+$","type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"8aa7696c-6105-4cfe-9056-f9749b57550c":{"description":"Request identity could not be created. Empty body without X-Request-ID; no problem object is available.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}}},"x-githits-empty-identity-failure":true,"content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"5562be87-c7f5-40d7-ab4c-c3c07793d088":{"content":{"application/problem+json":{"example":{"code":"UPSTREAM_ERROR","detail":"The upstream service failed to provide a response.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":502,"title":"Upstream error","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"UPSTREAM_ERROR","detail":"The upstream service failed to provide a response.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":502,"title":"Upstream error","type":"about:blank"}}},"exampleType":"examples"}},"description":"UPSTREAM_ERROR: A dependency failed or returned unusable data; retry later if appropriate.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"8c6ee3bf-71e8-4546-b176-9d49e70f4899":{"content":{"application/problem+json":{"example":{"code":"PACKAGE_INDEXING","detail":"Code evidence is not ready; retry the request later.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":503,"title":"Code indexing","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"PACKAGE_INDEXING","detail":"Code evidence is not ready; retry the request later.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":503,"title":"Code indexing","type":"about:blank"}}},"exampleType":"examples"}},"description":"PACKAGE_INDEXING: Code is not ready. Retry later or allow a positive wait_timeout_ms budget. QUOTA_UNAVAILABLE: daily usage authorization is temporarily unavailable; retryable, retry the same request.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"},"f7252b0c-299b-4100-9888-4d43797715c0":{"content":{"application/problem+json":{"example":{"code":"TIMEOUT","detail":"The upstream request did not complete in time.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":504,"title":"Upstream timeout","type":"about:blank"},"schema":{"description":"The stable problem document returned for an unsuccessful public API request.","properties":{"code":{"description":"The stable uppercase API error code.","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Client-safe explanation. Classified upstream service failures use nonempty REST-suitable guidance when available; otherwise gateway guidance is used. Internal, unclassified and transport diagnostics remain private. Wording is not stable; use code and structured fields. Local validation identifies the first invalid field (including array indices) and a reason; version-tag errors include canonical-version guidance.","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"The active request trace ID.","type":"string","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"status":{"description":"The HTTP status returned with this problem.","format":"int32","minimum":0,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"title":{"description":"A short, stable title for the error.","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"The generic RFC 9457 problem type.","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"acceptance_url":{"description":"Link for accepting the required terms, when provided.","type":"string","uniqueKey":"acceptance_url","typeLabel":"string"},"retryable":{"description":"Retryability for transient quota authorization failures, when known.","type":"boolean","uniqueKey":"retryable","typeLabel":"boolean"},"terms_url":{"description":"Link to the terms that require acceptance, when provided.","type":"string","uniqueKey":"terms_url","typeLabel":"string"}},"required":["type","title","status","detail","instance","code"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"TIMEOUT","detail":"The upstream request did not complete in time.","instance":"4bf92f3577b34da6a3ce929d0e0e4736","status":504,"title":"Upstream timeout","type":"about:blank"}}},"exampleType":"examples"}},"description":"TIMEOUT: The read did not complete before its deadline. A retry may repeat preparation work.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"x-request-id":{"description":"Active trace identity, also problem.instance.","schema":{"type":"string"}}},"exampleType":"examples"}},"security":{"49dd0347-daed-48a5-9c50-de5b011734f0":{"bearer_auth":{"scheme":"bearer","type":"http","scopes":[],"schemeName":"bearer_auth"}}},"servers":{"078a74e7-4d25-496a-979d-4eff5db36c94":{"description":"Production","url":"https://api.githits.dev"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"scheme":"bearer","type":"http","scopes":[],"schemeName":"bearer_auth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer_auth","name":"Authorization"}],"title":"bearer_auth"}]},"originalFileLocation":"https://api.githits.dev/v1/openapi.json"},"subdomain":"githits","siteName":"GitHits","title":"Read documentation or source code - GitHits","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T15:08:52.162Z","originalFileLocation":"api-reference/v1/read/read-documentation-or-source-code.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit. ## Choose a target For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section. For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target. When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path. Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide\u0026amp;path=%2F reads that scope\u0026#x27;s landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated. ## Interpret the result Branch on the required kind field: | kind | Result | | --- | --- | | documentation | Page identity, reusable docs_read_target, and exact crawled or repository source details. | | code | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. | Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group. ## Selector catalogue Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules. | Selector | Documentation result | Code result | Default | | --- | --- | --- | --- | | metadata | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes | | content | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes | ## Wait for code indexing wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing. For failures, branch on the problem response\u0026#x27;s stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.\">\u003cmeta data-mint-head name=\"application-name\" content=\"GitHits\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Read documentation or source code - GitHits\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit. ## Choose a target For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section. For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target. When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path. Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide\u0026amp;path=%2F reads that scope\u0026#x27;s landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated. ## Interpret the result Branch on the required kind field: | kind | Result | | --- | --- | | documentation | Page identity, reusable docs_read_target, and exact crawled or repository source details. | | code | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. | Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group. ## Selector catalogue Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules. | Selector | Documentation result | Code result | Default | | --- | --- | --- | --- | | metadata | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes | | content | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes | ## Wait for code indexing wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing. For failures, branch on the problem response\u0026#x27;s stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GitHits\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://githits.mintlify.app/_mintlify/api/og/v2?division=Read\u0026amp;title=Read+documentation+or+source+code\u0026amp;description=Read+a+documentation+page+or+an+exact+source+file.+The+response+identifies+which+kind+was+returned+and+includes+the+information+needed+to+cite+the+page%2C+package\u0026amp;theme=09db3a93f8c5f10dfeb89a5d\u0026amp;signature=d3d27e55d37e80ae699517f345faae8fa29e45062ac28eaf5ca78479e8e21de0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Read documentation or source code - GitHits\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit. ## Choose a target For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section. For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target. When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path. Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide\u0026amp;path=%2F reads that scope\u0026#x27;s landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated. ## Interpret the result Branch on the required kind field: | kind | Result | | --- | --- | | documentation | Page identity, reusable docs_read_target, and exact crawled or repository source details. | | code | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. | Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group. ## Selector catalogue Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules. | Selector | Documentation result | Code result | Default | | --- | --- | --- | --- | | metadata | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes | | content | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes | ## Wait for code indexing wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing. For failures, branch on the problem response\u0026#x27;s stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://githits.mintlify.app/_mintlify/api/og/v2?division=Read\u0026amp;title=Read+documentation+or+source+code\u0026amp;description=Read+a+documentation+page+or+an+exact+source+file.+The+response+identifies+which+kind+was+returned+and+includes+the+information+needed+to+cite+the+page%2C+package\u0026amp;theme=09db3a93f8c5f10dfeb89a5d\u0026amp;signature=d3d27e55d37e80ae699517f345faae8fa29e45062ac28eaf5ca78479e8e21de0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/githits/hPN3FB6to_tLCtYP/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GitHits\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c03b83\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/v1/read/read-documentation-or-source-code.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.githits.com/#organization\",\"name\":\"GitHits\",\"url\":\"https://docs.githits.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/githits/nEuGn8_ZROo1DncD/images/githits-wordmark.svg?fit=max\u0026auto=format\u0026n=nEuGn8_ZROo1DncD\u0026q=85\u0026s=33b1a4083b1476ad8520731d35d55987\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.githits.com#website\",\"name\":\"GitHits\",\"url\":\"https://docs.githits.com\",\"publisher\":{\"@id\":\"https://docs.githits.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code#webpage\",\"url\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code\",\"name\":\"Read documentation or source code\",\"description\":\"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit. ## Choose a target For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section. For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target. When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path. Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F reads that scope's landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated. ## Interpret the result Branch on the required kind field: | kind | Result | | --- | --- | | documentation | Page identity, reusable docs_read_target, and exact crawled or repository source details. | | code | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. | Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group. ## Selector catalogue Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules. | Selector | Documentation result | Code result | Default | | --- | --- | --- | --- | | metadata | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes | | content | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes | ## Wait for code indexing wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing. For failures, branch on the problem response's stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.\",\"dateModified\":\"2026-10-23T15:08:52.162Z\",\"isPartOf\":{\"@id\":\"https://docs.githits.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"v1 reference\",\"item\":\"https://docs.githits.com/api-reference/v1/packages/get-a-package-or-repository-changelog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Read documentation or source code\",\"item\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code#apireference\",\"headline\":\"Read documentation or source code\",\"name\":\"Read documentation or source code\",\"description\":\"Read a documentation page or an exact source file. The response identifies which kind was returned and includes the information needed to cite the page, package version, or repository commit. ## Choose a target For documentation, follow the read action from POST /v1/list, passing its target and non-null path unchanged. Browse hosted documentation with an explicit site: target; package and repository inventories include local documentation. Documentation results from POST /v1/searches also provide a docs_read_target, which you can pass as target without a path. An HTTP(S) target can include a fragment to select one indexed section. For source code, pass both target and the exact target-relative file path. Use a package target such as crates:serde@1.0.0, or a supported public repository locator such as https://github.com/serde-rs/serde@master. Find paths with POST /v1/list, POST /v1/grep, or a code result from POST /v1/searches. Repository refs use @; a literal # is not supported in a code target. When you have a read action, pass its target and non-null path unchanged. A scoped site target can use / to read its landing page. Preserve trailing slashes, query bytes, and literal percent bytes: they can identify distinct pages. Omit a null path. Encode both values as query parameters. Encode a literal + as %2B, # as %23, and % as %25; an unencoded + is decoded as a space. For example, GET /v1/read?target=site%3Aexample.org%2Fguide\u0026path=%2F reads that scope's landing page. For a ready source target, absolute paths, dot segments, or trailing slashes are rejected with 400 VALIDATION_ERROR. Target resolution or indexing errors can occur before the source path is validated. ## Interpret the result Branch on the required kind field: | kind | Result | | --- | --- | | documentation | Page identity, reusable docs_read_target, and exact crawled or repository source details. | | code | Target-relative and repository-root paths, binary status, and the requested, resolved, and served package version or repository commit. | Documentation and source files use 1-based inclusive line ranges. If no bounds are supplied, the complete page or file is returned; for a documentation URL, its fragment selects an indexed section. Explicit bounds override that fragment. An end_line past the end is clamped. Empty documentation has null bounds, while an empty text file has bounds 0–0; binary code has null content and bounds. Explicit bounds require the content field group. ## Selector catalogue Use these selectors with the fields query parameter. Supplying fields replaces the defaults; kind and the identity and provenance fields for the returned branch remain present. See Choose what the response includes for the shared selection rules. | Selector | Documentation result | Code result | Default | | --- | --- | --- | --- | | metadata | Title, format, breadcrumbs, update and source context, and package ownership when known. | Detected language and total line count. | Yes | | content | Body, total lines, returned range, and resolved section anchor. | Body and returned range; values are null for binary files. | Yes | ## Wait for code indexing wait_timeout_ms controls how long to wait for code preparation, from 0 to 60000 milliseconds; the default is 20000. Use 0 when the caller prefers an immediate 503 PACKAGE_INDEXING response if code is not ready. Documentation reads do not use this budget for indexing. For failures, branch on the problem response's stable code. Correct malformed locators, paths, ranges, or selectors after 400 VALIDATION_ERROR. A 404 means the requested page, file, package, version, repository, or ref was not found. A 409 DOCUMENTATION_PAGE_OWNER_CONFLICT means the URL belongs to another documentation corpus. A 422 means the target exists but the requested section, file, package variant, or repository ref cannot produce one result. Respect Retry-After after 429 RATE_LIMITED; retry 503 PACKAGE_INDEXING later or with a positive wait budget. A 504 TIMEOUT does not guarantee that preparation stopped.\",\"url\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code\",\"mainEntityOfPage\":{\"@id\":\"https://docs.githits.com/api-reference/v1/read/read-documentation-or-source-code#webpage\"},\"dateModified\":\"2026-10-23T15:08:52.162Z\",\"publisher\":{\"@id\":\"https://docs.githits.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.githits.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GitHits\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"GitHits","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API","groups":[{"group":"Get started","pages":[{"title":"GitHits REST API","sidebarTitle":"Overview","href":"/api/overview"},{"title":"API quickstart","href":"/api/quickstart"},{"title":"API authentication","href":"/api/authentication"},{"title":"Requests and responses","href":"/api/requests-and-responses"},{"title":"Analyze manifests and lockfiles","sidebarTitle":"Lockfile analysis","href":"/api/lockfile-analysis"},{"title":"API errors","href":"/api/errors"},{"title":"API versioning","href":"/api/versioning"}]},{"group":"v1 reference","pages":[{"group":"Packages","pages":[{"title":"Get a package or repository changelog","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/changelog","href":"/api-reference/v1/packages/get-a-package-or-repository-changelog"},{"title":"Review package upgrades","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/package-upgrade-reviews","href":"/api-reference/v1/packages/review-package-upgrades"},{"title":"Inspect a package release","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/packages/{registry}/{name}","href":"/api-reference/v1/packages/inspect-a-package-release"},{"title":"Inspect package dependencies","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/packages/{registry}/{name}/dependencies","href":"/api-reference/v1/packages/inspect-package-dependencies"},{"title":"Inspect package vulnerabilities","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/packages/{registry}/{name}/vulnerabilities","href":"/api-reference/v1/packages/inspect-package-vulnerabilities"}]},{"group":"Code Diff","pages":[{"title":"Compare two exact source trees","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/code/diff","href":"/api-reference/v1/code-diff/compare-two-exact-source-trees"}]},{"group":"Examples","pages":[{"title":"Generate an example from open-source references","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/examples/search","href":"/api-reference/v1/examples/generate-an-example-from-open-source-references"}]},{"group":"Experimental","pages":[{"title":"Compare two exact source trees","deprecated":true,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/experimental/code/diff","href":"/api-reference/v1/experimental/compare-two-exact-source-trees"},{"title":"Submit a lockfile analysis job","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/experimental/lockfile-jobs","href":"/api-reference/v1/experimental/submit-a-lockfile-analysis-job"},{"title":"Get lockfile analysis status","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/experimental/lockfile-jobs/{id}","href":"/api-reference/v1/experimental/get-lockfile-analysis-status"},{"title":"Stream lockfile analysis progress","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/experimental/lockfile-jobs/{id}/events","href":"/api-reference/v1/experimental/stream-lockfile-analysis-progress"},{"title":"Download a completed lockfile analysis","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/experimental/lockfile-jobs/{id}/result","href":"/api-reference/v1/experimental/download-a-completed-lockfile-analysis"},{"title":"Research a question with cited sources","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/experimental/research","href":"/api-reference/v1/experimental/research-a-question-with-cited-sources"},{"title":"Generate an SBOM from uploaded files","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/experimental/sbom","href":"/api-reference/v1/experimental/generate-an-sbom-from-uploaded-files"},{"title":"Resolve a target name","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/experimental/targets/resolve","href":"/api-reference/v1/experimental/resolve-a-target-name"}]},{"group":"Feedback","pages":[{"title":"Submit solution or session feedback","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/feedback","href":"/api-reference/v1/feedback/submit-solution-or-session-feedback"}]},{"group":"Grep","pages":[{"title":"Find regex or literal matches across source and documentation","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/grep","href":"/api-reference/v1/grep/find-regex-or-literal-matches-across-source-and-documentation"}]},{"group":"Languages","pages":[{"title":"Search supported programming languages","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/languages","href":"/api-reference/v1/languages/search-supported-programming-languages"}]},{"group":"List","pages":[{"title":"List files and documentation paths","description":"Browse files and documentation paths in a package, repository, or documentation site. Use this endpoint when you know the target and want to find something to read. Use grep to find text within its contents, or search to discover documentation by topic.\n\n## Start browsing\n\nSend a JSON body to `POST /v1/list`. This request lists the root of a package:\n\n```json\n{\"target\":\"npm:express@5.2.1\"}\n```\n\nPackage targets list files within that package, including local documentation. A repository target such as `github:expressjs/express` lists the whole repository snapshot. To browse hosted documentation, use a `site:` target:\n\n```json\n{\"target\":\"site:expressjs.com/en\",\"recursive\":true,\"limit\":100}\n```\n\nOmit `paths`, or use an empty array, to start at the root. To narrow the selection, pass paths or globs such as `{\"target\":\"github:expressjs/express\",\"paths\":[\"lib/**/*.js\"]}`. Entries matching any selector are included. Directories show their immediate children by default; `recursive: true` lists files or pages beneath them. Glob depth is determined by the glob itself.\n\nThe `file_types`, `languages`, and `intents` filters apply only to source files. For filename extensions, use a path glob. Send all options in the JSON body; query parameters are not accepted. Request bodies can be at most 2 MiB.\n\n## Read a result or open a directory\n\nEach entry includes a `read` action, a `browse` action, or both as applicable. Use these actions to make the next request:\n\n- For `read`, send its `target` and non-null `path` as URL-encoded query parameters to `GET /v1/read`. Omit `path` when it is null.\n- For `browse`, send its `target` and non-null `paths` in a new `POST /v1/list` body. Omit `paths` when it is null, and leave out `after`.\n\nCopy action values exactly. A displayed path can differ from the path needed to read a file. Preserve the path value, including trailing slashes and any query string, then URL-encode it as one query parameter. Encode literal `+` as `%2B` and `%` as `%25`; do not decode the action before encoding it. For example, `GET /v1/read?target=site%3Aexpressjs.com%2Fen\u0026path=%2F` reads the landing page for that site scope. Use the action returned for your selected entry.\n\n## Get the next page\n\n`limit` defaults to 100 and accepts 1–500 entries per page. When `has_more` is true, repeat the same target, paths, filters, recursion, and limit, adding the returned `next_cursor` as `after`. Copy the cursor unchanged. If it is rejected, start again without `after`.\n\nSite pages can change between requests. Pagination does not freeze their contents or membership; start without `after` to get a fresh listing. The response does not report a total number of entries.\n\n## Check availability and coverage\n\nAn empty page does not prove that all content has been indexed. For source files, inspect `code_index_state` and `target_resolution` to check availability, freshness, and the version or commit actually returned. For sites, inspect `inventory_state`, `crawl_status`, `coverage_state`, and `preparation`. Null means unknown or not applicable.\n\nA site selection can combine multiple indexed documentation collections. Crawl and coverage fields are null when there is no single collection summary. The `canonical_target` may identify the host root even for a narrower request; keep your original selection and use the returned actions.\n\nTo wait for source indexing or an empty site's preparation, set `wait_timeout_ms` to a value from 0 to 210000 milliseconds. The default, 0, returns without waiting. At the maximum wait, allow up to 240 seconds for the HTTP request. A wait timeout does not stop preparation. Each site's wait reports an exact `status` and a summary `outcome`; use `status` to distinguish `failed` from `discarded`, or `superseded` from `cancelled`.\n\nIn `preparation`, `selected` counts documentation collections, `enqueued` counts newly queued preparation, and `active_jobs` lists work already running. A positive `repair_limit_reached` means some collections still need preparation but were not queued. Narrow the site selection to include fewer collections. A zero value does not guarantee complete coverage.\n\nFor `RESOURCE_LIMIT` errors, choose a target or paths that select fewer documentation collections. If a single collection exceeds the limit, read a known page directly; selecting fewer paths within that collection does not reduce the limit. If a package's source inventory is unavailable (`409 SOURCE_INVENTORY_SCOPE_UNAVAILABLE`), the error can include `repo_url` and `commit_sha`. A repository target at that commit, such as `github:expressjs/express@\u003ccommit_sha>`, can include files outside the package, so use it only when that broader scope is acceptable.\n","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/list","href":"/api-reference/v1/list/list-files-and-documentation-paths"}]},{"group":"Read","pages":[{"title":"Read documentation or source code","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/read","href":"/api-reference/v1/read/read-documentation-or-source-code"}]},{"group":"Search","pages":[{"title":"Search documentation, code and symbols","description":"Search documentation, source code, and symbols across packages, public repositories, and documentation sites. Results include matching text and source locations you can use to read the original page or file.\n\nUse this endpoint to discover relevant documentation and implementations across projects. Searches can return while indexing or searching is still in progress; use `GET /v1/searches/{search_ref}` to retrieve subsequent results and status.\n\n## Selector catalogue\n\nUse the following selectors with the `fields` query parameter to choose which fields the response includes. See [Choose what the response includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes) for details.\n\n| Selector | Data | Default |\n| --- | --- | --- |\n| `results` | Matching items, their text, relevance scores, source locations, and coverage information. | Yes |\n| `results.highlights` | Highlight locations within result titles and summaries. Also includes `results`. | No |\n| `results.*` | Results and highlights together. | No |\n| `sources` | Source status, applied filters, coverage, and suggested documentation sites. | No |\n| `progress` | Search request details, readiness counts, and available or suggested versions and refs. | No |\n","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json post /v1/searches","href":"/api-reference/v1/search/search-documentation-code-and-symbols"},{"title":"Get search status and retained results","deprecated":null,"version":null,"openapi":"https://api.githits.dev/v1/openapi.json get /v1/searches/{search_ref}","href":"/api-reference/v1/search/get-search-status-and-retained-results"}]}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/overview"}]}]},"basePath":"","title":"Read documentation or source code - GitHits","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-m07pfKpT.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}