List files and documentation paths
Browse a known package, repository, or documentation site to find the path you want to read. Package targets stay within the package’s own tree; repository targets cover the whole snapshot. Both include local documentation. To browse hosted docs, use an explicit site: target from resolve or a docs search result. Omit paths to start at the root. Directories show immediate children unless recursive is true; glob depth works independently. Follow an entry’s read or browse action unchanged. Use search for topics and code grep for exact source text.
Start browsing
Send JSON such as {"target":"npm:express@5.2.1"}. For hosted docs use {"target":"site:expressjs.com/en"}. Source filters file_types, languages, and intents cannot be used with a site target. Paths form a union of literals and globs; extensions belong in a paths glob such as lib/**/*.js.
This operation returns one fixed JSON projection; it does not accept fields or query parameters. The normal HTTP body limit is 2 MiB, independent of per-array caps. Up to 500 logical entries fit on a page; no total count is implied.
Read or browse an entry
Use read.target and its non-null read.path as URL-encoded query values for GET /v1/read. Omit a null path. A scoped site uses / for its landing page; preserve trailing slashes, query bytes, and literal percent bytes. Display paths can differ from repository-root read paths. Do not construct a read target from a display path.
Use browse.target and browse.paths in a fresh POST /v1/list request. Do not carry the old cursor into a different selection. For example, GET /v1/read?target=site%3Aexpressjs.com%2Fen&path=%2F reads that site’s indexed landing page. Read the emitted action for the actual page you selected.
Continue and assess readiness
When has_more is true, repeat the same target, paths, filters, recursion, and limit with next_cursor as after. The cursor is opaque; a rejected cursor requires a fresh request without it.
An empty page is not proof of complete coverage. Source inventories retain requested, resolved, and served provenance plus indexing state. A source page can be returned while preparation is pending. Hosted inventories separately expose stored-page availability, crawl status, coverage, and preparation jobs. Null means inapplicable or unknown; arrays, zero, and false retain their meanings.
wait_timeout_ms defaults to 0 and accepts 0 through 210000 milliseconds. A positive value waits for source or empty-site preparation; the transport timeout is added. Preparation can continue after a timeout. A package-owned inventory that is unavailable returns recovery guidance rather than silently broadening to its repository. A pinned repository target covers a broader scope; choose it only if that scope is acceptable.
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 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.
1 - 64^[A-Za-z0-9_-]{1,64}$Body
Selection for a source or hosted-site inventory page. Unknown and null controls are rejected.
Required nonblank compact package, repository, or explicit site:host[/scope] target. Forwarded unchanged.
1Opaque continuation. Blank starts page one; preserve a nonblank cursor unchanged and repeat the same selection.
Source-only raw file-type labels; at most 64, trimmed and lowercased. Empty means no filter.
64Source-only file-purpose inclusion union; at most 64 values. Empty means no filter.
64Purpose of a source file; inclusion values form a union.
production, test, benchmark, example, generated, fixture, build, vendor Source-only language labels; at most 64, trimmed and lowercased. Empty means no filter.
64Logical entries per page, 1 through 500, default 100. No total count is implied.
1 <= x <= 500Literal/glob union of at most 1000 selectors, each nonblank and at most 2048 UTF-8 bytes. Omit or use [] for root. Explicit sites remove one leading slash; root alone is allowed.
1000Default false lists immediate directory children. True expands selected directories to leaves; glob depth is independent.
Source or empty-site preparation wait, 0 through 210000 milliseconds, default 0. Transport time is added; timeout does not mean preparation stopped.
0 <= x <= 210000Response
One source or hosted-site inventory page with exact actions and readiness evidence
One bounded inventory page with exact follow-up actions and readiness evidence.
Indexed package versions or repository refs for immediate retry; null for sites.
Resolved package version, repository commit, or site scope; null while unavailable.
Source freshness or preparation state; null for sites.
current, stale, provisional, indexing, pending, failed, not_found, unresolvable Hosted coverage explanation, when available.
Hosted inventory coverage; empty entries alone do not establish completion.
none, partial, capped, complete Latest hosted-site crawl state, or null.
idle, running, complete, failed Ordered entries on this bounded page; no total count is implied.
Whether another inventory page is available.
Served source ref; null for sites or unprepared source.
Source preparation estimate, when known.
Opaque active source preparation reference, or null.
Source indexing lifecycle; prefer code_index_state for freshness.
indexed, indexing, pending, failed, not_found, unresolvable Inventory being browsed: source files or hosted documentation.
source, site Whether the hosted site has active pages; null for source inventories.
available, empty Opaque continuation; repeat the same request with this value as after.
Hosted-site admission, active work and bounded wait evidence, or null.
Normalized target bound to this page and continuation.
Source snapshot resolution; null when not applicable or known.
Requested, resolved and served source provenance, including retry candidates.