Context API extracts full context from any web page
Perplexity's new Context API lets AI agents pull up to 10 web pages at once and get back clean Markdown, HTML, links, and query-matched passages instead of raw HTML full of ads and navigation. Developers can control how fresh the content must be, from cached copies to live fetches.
- Returns clean Markdown with boilerplate like cookie banners, navigation, and ads stripped out, and can return only passages relevant to a query, so the model processes less text.
- Freshness is adjustable: by default it uses a cached copy from the last two days, but max_age_seconds set to 0 forces a live read, and cache_only prevents live requests entirely.
- In Perplexity's own evaluation, 92.3% of URLs returned usable content, 87.9% of key facts were recovered, and content precision was 80.3%.
Perplexity's new Context API takes up to 10 URLs per request and hands back clean Markdown, raw HTML, a list of deduplicated absolute links in page order, and query-relevant snippets for each page. The point is to stop AI agents from wading through raw HTML full of navigation, cookie banners, and ads, or from working off search-result excerpts that cut out the methodology, parameters, or policy exceptions they actually need. Each result also carries metadata like title, author, language, and published date, plus Open Graph tags. Snippets are selected original passages rather than generated summaries, so the model sees the source wording but less of it, which cuts token use.
Freshness is the main control developers get. By default the service checks Perplexity's web index for a copy fetched in the last two days and only goes live if nothing is there. Setting `max_age_seconds` to 0 forces a live read, which suits prices, scores, and breaking news, while longer values suit reference material. `cache_only` set to true guarantees no live request is made. Each result returns a status field, and the article says to check it before using the content, since failed fetches come back as error pages or empty results rather than failing loudly.
Perplexity's own evaluation reports 92.3% of URLs returning usable content, 87.9% key-fact recall across providers, and 80.3% content precision, meaning about one in five returned characters is still boilerplate. The examples given are a coding agent pulling API docs with auth and error details, a support agent reading a policy page for its exceptions, and a research agent comparing full articles instead of excerpts. The quickstart is a single curl POST to api.perplexity.ai/v1/context with a bearer token. Worth noting for anyone weighing it: the benchmark numbers are self-reported, and the article doesn't name the competing providers used in the comparison.