Read a documentation page
Read a documentation page, either in full or as a range of lines. The response includes the page content and information about its source.
Use a page identifier returned by GET /v1/packages/{registry}/{name}/docs or a documentation search result. This endpoint reads an existing page; it does not start a new crawl.
Selector catalogue
Use the following selectors with the fields query parameter to choose which fields the response includes. See Choose what the response includes for details.
| Selector | Data | Default |
|---|---|---|
metadata | Page title, format, navigation breadcrumbs, update time, source label, requested ref, base URL, and available package context. | Yes |
content | Original page content or the requested line range, with total line count and returned start and end lines. | Yes |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.
Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.
Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.
Optional session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.
Path Parameters
Page identifier or docs_read_target returned by documentation listing or search. Percent-encode the complete value as one path segment; it is decoded exactly once. For example, a token containing a%2Fb must contain a%252Fb in the request path. Pass the returned value unchanged before encoding.
Query Parameters
Response groups to include: metadata and content, both selected by default. Explicit selection replaces defaults. No subfields or wildcards are supported. Line ranges require content. Selection and line ranges reduce response size, but do not reduce upstream retrieval of the full page.
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.
Positive decimal integer, default 1. Requires selected content; start beyond EOF returns empty interval with end=start-1.
x >= 1Last line to read, inclusive. Must be at least start_line; end_line=0 is invalid. Omit to read through the end of the page. Values beyond the end are clamped. Requires content selection.
x >= 1Response
Existing page with selected data groups
A page with mandatory exact identity and source; omitted groups are absent.
Exact input token for a subsequent read, encoded as one path segment.
Opaque source-reported page ID; never reconstruct or parse it.
Mandatory source attribution and exact repository locator when applicable.
- Option 1
- Option 2
Atomic content and returned range; absent when unselected.
Atomic descriptive metadata and best-effort owner; absent when unselected.