Skip to main content
Give your agent the facts it needs with the fewest characters in its context. Search with short snippets first. Answer from the snippets when they hold the answer, and fetch a page only when they don’t, asking fetch for only the part you need.

Parameters

Search, then fetch the top result

This sample searches with 300-character snippets, takes the top result, and fetches only the answer to a question about that page. It runs with no API key:
You see the page the search picked, then a two-sentence answer from that page instead of the whole page:
Example output · results vary
The curl tab takes the top result URL with jq. The fetch response holds the extraction in content. This is an example fetch response:
Response · results vary

Decide when to fetch

Each search result’s snippet is page text chosen for the query, so it often holds the answer. Fetch when one of these is true:

Fetch the current version of a page

By default, fetch returns Keenable’s indexed copy of the page if it has a usable one, and fetches the page from the source otherwise. Set live=true when the indexed copy may be out of date for your task. Compare the search result’s acquired_at, when Keenable indexed the page, with how often the page changes. A call that fetched from the source is billed as fetch.live, whether you set live=true or Keenable had no indexed copy. Read usage.sku in a keyed response to see which one you paid for. See Fetch and Live fetch.

Common mistakes

When content is cut at max_chars, truncated is true and total_chars holds the full length. Fetch again with a larger max_chars, or with a prompt, if you need the rest. See Read long pages and Fetch with a prompt.

In the SDKs, CLI and MCP

fetch takes max_chars, live and prompt in every SDK: keyword arguments in Python, fetch(url, { maxChars, live, prompt }) in TypeScript (from keenable 0.2.0), FetchWithOptions with FetchOptions in Go, and fetch_with with FetchOptions in Rust. See SDK methods. Over MCP, fetch_page_content takes the same three arguments and returns at most 20,000 characters unless you set max_chars (see MCP server).

API reference