API reference
Fetch API reference
Fetch a web page with GET /v1/fetch and get its main text as markdown, or only the part a prompt asks for.
GET
Read a web page as clean markdown, or pass a prompt to get only the part you need.
The API reference covers the base URL, authentication and the limits both endpoints share.
Prefer the official SDKs (
The public endpoint requires an
pip install keenable, npm install keenable, cargo add keenable, or the Go module). They read KEENABLE_API_KEY from the environment. For raw HTTP, use the curl tab.
Without a key
GET /v1/fetch/public takes the same query parameters and returns the same shape, with no API key:
X-Keenable-Title header with your application’s name. If the header is missing, the API returns 400 with Missing app identifier. If you call without a key, Keenable limits requests per IP address and charges nothing. See Authentication. The playground on this page calls the keyed endpoint.
Request
Pass everything as query parameters. Onlyurl is required. A parameter that isn’t listed here returns 400 with Unknown parameter(s) and the list of supported parameters. When the name is close to a supported one, such as maxchars, the error says which one you meant. See 400 Invalid request parameters.
The page to read, as an absolute
http or https URL. URL-encode it when it carries its own query string (curl --data-urlencode does this for you).If url is missing, the API returns 400 with "url" is required. If the value isn’t a URL, the message is Could not parse the provided URL. A URL without a scheme, such as example.com, returns the same message, so start it with https:// or http://. If no page exists at the URL, the API returns 404.Hard cap on the characters of
content. Longer content is cut to fit and ends with ... (left out when max_chars is 3 or less), so content is never longer than the number you set. The response then has truncated set to true, and total_chars gives the length of the full page.Any value that isn’t a positive integer returns 400 with "max_chars": must be a positive integer. See Read long pages.Fetch the page from the source now instead of returning Keenable’s indexed copy. Without it, Keenable returns its indexed copy if it has one and fetches the page otherwise. Use
live when you need the current version of a page that changes often.Any value other than true or false returns 400 with "live": must be true or false. See Live fetch.An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and
content holds only its answer instead of the whole page. On the TypeScript handbook’s Everyday Types page, the prompt above returns string, number, boolean, bigint, symbol, null and undefined, one per line.A prompt longer than 2000 characters returns 400 with "prompt": must be 2000 characters or less. See Fetch with a prompt.Your own ID for grouping related requests, up to 128 characters. You can send it as the
X-Keenable-Session-Id header instead. If you send both, the header wins.Response
A200 returns the page as markdown. Fields marked required are always present; the others are left out when Keenable doesn’t know them.
The page’s final address after redirects. It can differ from the
url you sent: http://typescriptlang.org/docs/... comes back as https://www.typescriptlang.org/docs/.... Cite this one.The page’s main text as markdown, with navigation and boilerplate stripped. Headings, lists, links, tables and code blocks are kept. Capped by
max_chars. With prompt, it holds the extraction instead of the page.true when the page was longer than max_chars and content was cut. Cut content ends with ..., except when max_chars is 3 or less.The length of the full page content in characters, before
max_chars was applied. Equal to the length of content when truncated is false.The author or authors as the page names them, for example
Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis. Left out when the page names no author.When the page was published, as an ISO 8601 timestamp in UTC such as
2026-10-30T00:00:00Z, the same format as on search results. Left out when the publish date is unknown. Earlier versions of the API sent it as Unix seconds (1793318400), so code that also reads stored older responses should accept both.Always an empty string; read
content. Kept so older clients don’t break; see Versioning and deprecation.What the call was billed. Present on successful calls made with a key. The public endpoint leaves it out. A fetch that Keenable had to make live, because it had no indexed copy, is billed as
fetch.live even without live=true. See Balance and usage.Errors
Every error has the same JSON shape, with a shorterror and a message that says what to change:
The body also has a stable
code, a fix and retryable. Branch on code. Every status and code, with its exact message and fix, is on Errors.