/contents

Clean text and structured data from any web page

Extract text, highlights, and summaries from any URL. Choose how much content to return and how fresh it should be.

Get structured data for what your task needs

Send a URL and get back the full page as markdown, the passages relevant to your task, or JSON that matches your schema. Contents API handles JavaScript-rendered pages, PDFs, and complex layouts automatically.

exa.ai/docs/search/quickstart
What types of search does Exa offer?
autoYou want the best default balance of quality and speed~1 second
liteCost or latency matters most, such as high-volume or real-time workloads~450 ms
deepThe task requires multi-step search and stronger synthesis4–15 seconds

Send your model token-efficient content

Use Highlights to keep context small for agents, RAG, and factual lookups. Highlights strip navigation, sidebars, and boilerplate and keep the most relevant excerpts that answer the question.

Choose how fresh your content needs to be

Control the balance between speed and freshness for each task, whether it's answering questions about documentation or tracking breaking news. Set it to use a saved copy of the page for a faster response. When freshness matters, fetch the page live every time or set a maximum age for the saved copy.

news.ycombinator.com
maxAgeHours: 0 · Fetching live…
docs.stripe.com/rate-limits
Default · Checking cache…
maxAgeHoursWhat Exa does
omitUse the cache, fetch when needed
24Fetch if the cached copy is older than 24h
0Always fetch the live page
-1Cache only

Highest extraction quality on WebCode

Each provider extracted the same 250 documentation pages, graded against a golden reference built from the fully rendered page.

Exa
82.8
Parallel
74.2
Claude web fetch
59.8
020406080100
Completeness (0–100)

WebCode contents benchmark, 250 URLs mined from coding-agent searches. Claude web fetch returned empty content for 12% of URLs. Read the methodology or rerun it from the open-source repo.

Everything you can extract from a web page with Contents API

Clean markdown

The full page body as markdown, without navigation and ads. Cap the length when you need to.

Relevant passages

Only the passages that answer your query.

Summaries

A short summary of the page, focused on the question you ask.

JSON in your schema

The fields you define in a JSON schema, returned ready to parse.

Page metadata

Title, URL, author, and published date, when the page has them.

Images

The page's main image, plus the image URLs on the page.

Links

The URLs linked from the page, up to 1,000 per page.

Subpages

Content from up to 100 linked pages per request, steered toward sections like docs or pricing.

Status for every URL

Success or error for each URL, whether it came from cache or a live fetch, and the HTTP code on errors.

Pricing

Pay per page, per content type

$1/1k pages
text$1/1k pages

Full page contents as clean markdown

highlights$1/1k pages

Token-efficient passages relevant to your query

summary$1/1k pages

LLM summaries and JSON schema extraction

Start extracting in a few lines

Install the Python or JavaScript SDK, or call the REST endpoint directly. Pass URLs and pick the content you want back: text, highlights, or a summary.

from exa_py import Exa

exa = Exa()

result = exa.get_contents(
    ["https://docs.stripe.com/rate-limits"],
    highlights={"query": "default API rate limits per second"},
)

print(result.results[0].highlights)

Common questions

The Exa Contents API is a website text extraction API and webpage content extractor for developers. Send it one or more URLs and it returns clean page content: full text as markdown, highlights relevant to your query, or a summary that can follow a JSON schema. Each result also includes page metadata: the title and URL, plus the image, favicon, author, and published date when the page has them. It handles JavaScript-rendered pages, PDFs, and complex layouts, and reports a status for every URL.

Send the page URL to Exa's /contents endpoint with a JSON schema in summary.schema. Exa reads the page and returns a JSON string that matches your schema, so you can parse it straight into your application. For example, a schema with a list of plans, each with a name and price, returns the plans from a pricing page as JSON. See the Contents quickstart for code in Python, JavaScript, and cURL.

For developers building with LLMs, the best webpage structured data extraction tool returns only the content your model needs, in a format your code can use. Exa Contents API returns clean markdown, query-relevant highlights, or JSON that matches your schema from one API call. On Exa's open WebCode benchmark of 250 documentation pages, Exa's extraction scored highest on completeness (82.8 vs. 74.2 for Parallel and 59.8 for Claude web fetch) and signal (94.5 vs. 77.6 and 55.1).

Request text from /contents to get the page body as markdown, without navigation, ads, and other page chrome. When your model only needs to answer a question about the page, request highlights with a query instead. Highlights return the relevant passages and use far fewer tokens than the full page.

You can write your own scraper with an HTTP client and an HTML parser, run a headless browser for pages rendered with JavaScript, or call a website text extraction API. Scrapers and headless browsers mean maintaining parsers, proxies, and retries yourself. With Exa Contents API, you send URLs to /contents from the Python or JavaScript SDK or with cURL, and Exa fetches, renders, and cleans each page, returning clean text, markdown, and metadata from the URL.

Web-to-text tools range from browser extensions and online website to text converters, which handle one page at a time, to APIs you call from code. If you're building an application or agent, use an API: Exa Contents API converts up to 100 URLs per request into clean markdown, query-relevant passages, or JSON, and reports a status for every URL. On Exa's open WebCode benchmark, Exa's extraction scored highest on completeness and signal against Parallel and Claude web fetch.

Send the URLs to /contents with a JSON schema in summary.schema, and Exa returns fields that match your schema for each page, ready to load into a dataset or analysis pipeline. Request text as well when you need the full page as markdown, and use the title, published date, and author metadata to label and filter results. For training data at corpus scale, talk to Exa sales about access to Exa's index.

Call /contents from your code or a scheduled job. Each request takes up to 100 URLs, and every URL gets its own status in the response, so you can retry only the pages that failed. Set subpages to follow linked pages from a starting URL, and set maxAgeHours so each run gets content as fresh as your task needs.

Yes. Exa handles JavaScript-rendered pages, PDFs, and complex layouts automatically. Send the URL the same way you would for any other page. Highlights and summaries work on PDFs too, so you can pull a specific result out of a research paper or report without parsing the file yourself.

By default, Exa uses cached content when it's available and fetches the page when it isn't. Set maxAgeHours to the oldest content you'll accept: Exa uses the cached copy if it's newer than that and fetches the page otherwise. Use 0 to always fetch the page, or -1 to only use the cache. livecrawlTimeout caps how long a fresh fetch can take.

Yes. Set subpages to follow linked pages from each starting URL, and add subpageTarget with terms such as "docs" or "pricing" to prioritize the sections you need. You can send up to 100 URLs in a single request and get up to 100 subpages per request in total.

Use Contents when you already have the URLs. Use Search when you need to find pages first: every Contents option is also available on /search for the results it returns. Text and highlights are included for up to 10 results per search; summaries and schema extraction are billed at $1 per 1k pages. For web search tools in agents, request highlights on /search instead of making a separate Contents call.

Contents costs $1 per 1,000 pages for each content type: text, highlights, or summary. A page requested with both text and highlights counts as two. See pricing for volume and enterprise options.