Skip to main content

Read a page in full

A search gives about 1,200 characters of each page. When the fact you need, a parameter, a limit, a signature, is on a page but not in its excerpt, POST /v1/fetch returns that page's text.

It returns the text of up to five pages a call, each named by the source_id from a merged view or by a URL a search returned. Only pages your own searches returned in the last 24 hours can be fetched; anything else comes back not_recent, free. It is not a general fetcher. That list of recent results is kept in the router's memory, so after the router restarts every page is not_recent until you search again. From a shell, jevlin fetch sends the same request; see Reading a page in full.

curl -s https://api.jevlin.ai/v1/fetch \
-H "Authorization: Bearer $JEVLIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pages": [{"source_id": "s_…"}], "max_chars": 10000, "query": "what you are looking for"}'
{"request_id": "…",
"pages": [{"source_id": "s_…", "url": "…", "title": "…", "status": "ok",
"content": "…", "offset": 0, "next_offset": 9874, "content_length": 171842,
"provider": "tavily", "cached": false, "cost_micros": 2000}],
"usage": {"cost_micros": 2000, "latency_ms": 812}}

The request​

fieldwhat it does
pages1 to 5 entries, each {"source_id": "s_…"} or {"url": "https://…"}.
max_charsHow many characters of each page to return, 1,000 to 50,000; 10,000 by default.
offsetWhere in each page's text to start. Send a page's next_offset to read on.
queryExperimental, at most 1,000 characters: what you are looking for. With offset 0, the slice starts at the paragraph holding the most of its words of three or more letters (the top when none match); ignored past offset 0.
as_ofThe cutoff of a dated search: read each page as it was saved at or before then, never live. See Dated read.

Fetch the one to three pages you actually need, not every result.

The whole call is a 400 for no pages or more than five, the same page named twice, max_chars out of range, a negative offset, or anything after the body's one JSON value. One page that cannot be read as asked is that page's invalid status instead, and the others are answered.

The answer​

  • Slices. Each page comes back as at most max_chars characters from offset, cut on a paragraph or line break. next_offset is where to read on from, null once the page is exhausted. Reading on within 15 minutes is served from the fetch cache.

  • Long pages. When a page is much longer than one slice, pass a query so the slice starts near the fact, rather than paging from the top. The upstream returns at most 200,000 characters of a page; a page it cut says truncated: true, with full_length, the page's real length as the upstream counted it before links were removed (so not in the same units as content_length, which is how much of it you can read).

  • The text. Links are removed (a link keeps its words and loses its target) and Markdown escapes are undone; code blocks and inline code are kept as they are.

  • Statuses. Each page is ok, failed with a reason, not_recent or invalid:

    • upstream_failed is worth one retry;
    • unrendered is an app shell that needs a browser, so use another source;
    • on a dated read only, blocked and not_saved_at_as_of.

    The call is 200 whatever the pages say.

Dated read​

To read a page from a dated search as it was then, send the search's as_of:

{"pages": [{"source_id": "s_…"}], "as_of": "2026-11-05T00:00:00Z"}
  • Each page is Perplexity's copy saved at or before the cutoff: never a live read, and never from or into the fetch cache. The answer echoes as_of, and each page's provider is perplexity. Text only.
  • A page is failed with blocked when Perplexity does not serve that site at all, or not_saved_at_as_of when no copy was saved by the cutoff. Both are normal answers, and free.
  • The same rule on recent results applies: only pages your own searches returned in the last 24 hours.
  • It takes the same as_of_* codes as a dated search, and runs on the platform's key only (403 as_of_requires_platform_key).
  • Dated reads share one call a second across the service, all of a call's pages in one: past it, 429 as_of_rate_limited with Retry-After, and no page is returned or charged.

What it costs​

Each ok page read from the upstream costs 2,000 micro-dollars ($0.002), against the same ceilings and rate windows as a search; a dated read's ok page costs the same. A page served from the 15-minute fetch cache (cached: true) is free, and so are failed, not_recent and invalid pages. The fetch cache is shared across accounts: it holds the public page, not anything about who asked. A fetched page is recorded as result.fetched on the trace of the search that returned it, so it needs no feedback call.

Who can fetch​

Fetch needs a claimed account that keeps search content.

answermeaning
403 fetch_unavailableThis account cannot fetch: an unclaimed agent, a zero-retention account, or one with no credit to bill. Final.
402 search_credit_onlyCredit is left, but it is the part of the weekly allowance kept for search. Searches still work; fetch works again at the weekly reset or after a top-up.
503 fetch_disabledFetch is not offered on this deployment. Final.

The rest of the errors are as for any call; see Errors.