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:Example output · results vary
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’ssnippet 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. Setlive=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
- Fetch API reference: every fetch parameter and response field.
- Search API reference:
max_results,snippet_max_lengthand the result fields. - Ground answers with citations: turn the snippets you keep into a cited prompt.