prompt to a fetch: a model reads the page, and content holds its answer instead of the page’s markdown.
Parameters
Extract a table from a page
This sample fetches the PostgreSQL versioning policy page and asks for each supported version with its release dates, one line each. It runs with no API key:Example output · results vary
url and title, so you can cite the source. total_chars is the length of the answer, not of the page:
Response · results vary
Write the prompt
Write the prompt as an instruction about this one page. Name the facts you want and the format to return them in, so your code can parse the answer without another model call.content is the model’s answer, so check it before you act on it. If the page doesn’t hold the answer, the model says so in content, and the response is still 200. Give it a fixed reply for that case, as the last row does, so your code can test for it.
Prompt or whole page
A prompt doesn’t change what the call costs. A fetch is billed as
fetch, or as fetch.live when it was read from the source, with or without a prompt. See Pricing.
Common mistakes
In the SDKs, CLI and MCP
fetch takes prompt in every SDK: a keyword argument in Python, fetch(url, { prompt }) in TypeScript (from keenable 0.2.0), FetchOptions.Prompt in Go and FetchOptions.prompt in Rust. See SDK methods. The CLI takes --prompt (see CLI). Over MCP, fetch_page_content takes prompt (see MCP server).
API reference
- Fetch request:
prompt,max_charsandlivein full. - Search, then fetch: decide when a fetch is worth it.
- Fetch the current version of a page: combine
promptwithlive=true.