Skip to main content
Fetch gives your agent any web page as clean markdown, with navigation and boilerplate stripped. Add a prompt to get back only the part you need.

Fetch a page

This sample fetches one page without a key and prints its title and the first 300 characters of its content: You see the page title, then the start of the page as markdown:
Example output · results vary

Cost

Each fetch is billed by where the page came from. Keyless calls are free. Rate limits cap them. A fetch costs $4 per 1,000 at standard prices, and your organization can have its own. Read what a call cost from the usage object in the response. See Balance and usage for the allowance and how usage is reported.

Key parameters

To cap the content, pass max_chars. This request returns at most 2,000 characters of the page as markdown. The SDKs name it max_chars in Python and Rust, and maxChars in TypeScript:
When the page is longer, the response has truncated set to true, and total_chars holds the full length. This request fetches a page live and returns only the answer to a prompt. The SDKs take the same options on fetch. See SDK methods.
content holds one sentence instead of the full page:
Example output · results vary

Gotchas

By default, Fetch returns Keenable’s indexed copy of the page. If Keenable has no indexed copy, it fetches the page live from the source and bills the call as fetch.live, even without live=true. Read usage.sku in the response to see which SKU a call was billed as.

Next steps

Production checklist

Ship Keenable search and fetch to production: keys from the environment, rate limits, retries on 429 with Retry-After, stopping on 402, timeouts and status.

cognee

Give cognee clean Markdown pages: Keenable is the web-fetch backend behind cognee’s URL ingestion and scheduled scraper.

Fetch with a prompt

How to pass a prompt to fetch so content holds only the facts you asked for, write prompts that return parseable output, and handle the 2,000-character limit.

Live fetch

How to set live=true so fetch reads a page from its source instead of the indexed copy, when that’s worth it, and how a live read is billed as fetch.live.