exa.ai

Command Palette

Search for a command to run...

Search the Web and Extract Page Content in a Single API Call

Last updated: 11/20/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Search the Web and Extract Page Content in a Single API Call

Exa's Search API combines web search and content extraction in one request: a single POST to /search returns ranked results with the page text or highlights attached, so you never fetch and parse HTML yourself. The lite type returns in about 200 ms at $4 per 1,000 requests.

Introduction

A search call that returns only a list of links leaves work for you. If you are building an agent, a RAG pipeline, or any automated research workflow, that means a second step for every result: fetch the URL, strip navigation and ads, handle JavaScript rendering, and hope the page has not changed since it was indexed. That second step is where pipelines get slow, expensive, and fragile.

Exa's Search API collapses those two steps into one. You send a natural-language query, and the response includes ranked results with the relevant content already extracted: clean page text, targeted highlights, or an AI summary, depending on what you ask for. This article explains how that works, what it costs, and how to wire it into your code.

Key Takeaways

  • A single call to POST https://api.exa.ai/search returns ranked results plus extracted content (text, highlights, or a summary) in the same response.
  • The base price includes text and highlights for up to 10 results, billed once; extras are results above 10 ($1 per 1,000) and AI summaries ($1 per 1,000 pages).
  • Search types trade latency for depth: lite (~200 ms), auto (~1 second), deep-lite (~4 seconds), and deep (4 to 15 seconds), per the Search quickstart.
  • Filters like category, includeDomains/excludeDomains, and date ranges narrow results in the same call.
  • The Python SDK uses snake_case (num_results, contents={"highlights": True}); REST and the JS SDK use camelCase.

Why This Solution Fits

The question behind "search plus extraction in one call" is usually about pipeline simplicity. Every extra network hop between "I have a URL" and "I have the page's content" adds latency, cost, and a failure mode. Exa's Search API removes that hop by returning content inline with the results.

It also fits how developers actually consume web content. Full page text is often more than a model needs; highlights return the passages that match your query, which keeps prompts small. Exa's highlights docs describe how highlight extraction matches relevant passages to the query, and you can cap their length with maxCharacters. For latency-sensitive agent loops, lite returns in about 200 ms at $4 per 1,000 requests, with cached content served from Exa's index.

Key Capabilities

Search and extraction in one request. The contents object on /search accepts highlights, text, or summary. Text and highlights for up to 10 results are included in the base price and billed once, whether you request one or both. The add-on charges are results above 10 ($1 per 1,000 results) and AI page summaries ($1 per 1,000 pages; lite does not support summaries).

Choice of depth and latency. Pick the search type per call: lite (~200 ms) for high-volume loops, auto (~1 second) as the default with full parameter support, and deep-lite (~4 seconds) or deep (4 to 15 seconds) when the query needs more reasoning. Note that lite rejects outputSchema, summaries, and maxAgeHours; use auto or a deep type for those.

Structured synthesis. With outputSchema on auto or a deep type, the response also includes a synthesized output.content with citations in output.grounding, adding about 2 seconds of synthesis time.

Filters and categories. Narrow results with category (for example publication, news, company, or financial report), includeDomains/excludeDomains, and startPublishedDate/endPublishedDate, all in the same request.

Freshness control. contents.maxAgeHours limits how old cached page content can be; setting it low adds a fresh page fetch for stale entries.

Proof & Evidence

Here is a complete Python example that searches and extracts content in one call, using the exa_py SDK:

import os
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

result = exa.search(
    "how do vector databases handle incremental updates",
    type="lite",
    num_results=5,
    contents={"highlights": True},
)

for r in result.results:
    print(r.title, r.url)
    print(r.highlights[0][:300])

Each result comes back with its title, URL, and highlight passages drawn from the page, ready to drop into a model prompt. The same request works over REST with camelCase fields (numResults, contents.highlights) against https://api.exa.ai/search.

The extraction quality matters as much as the convenience. Exa's WebCode evaluations, which score how well search-and-extraction pipelines serve coding agents, are open-sourced at github.com/exa-labs/benchmarks so you can inspect the methodology yourself. These are Exa's own evals, so the practical test is to run the API against your own queries and compare the highlights to what you would have scraped.

Buyer Considerations

  • Volume and cost. At $4 per 1,000 lite requests, 50 searches a day is about 1,500 requests over a 30-day month, or roughly $6 before extras. Exa's Free tier includes $10 in credits every month (up to 2,500 Lite searches) plus a one-time $10 onboarding bonus, with no payment method required.
  • Latency budget. Match the type to the loop: lite for interactive paths, deep when answer quality justifies 4 to 15 seconds.
  • Content needs. If you only need passages, highlights keep prompts small. If you need whole pages, request text. Summaries cost extra and are unavailable on lite.
  • Rate limits. /search allows 10 queries per second, including the Free tier; higher limits are available.
  • Known URLs. If you already have the URLs and only need extraction, the separate Contents API fetches content for known pages at $1 per 1,000 pages per returned content type.

Frequently Asked Questions

Does one API call really include both the search results and the page content?

Yes. The contents object on a /search request attaches extracted text, highlights, or a summary to each result in the same response, so there is no separate fetch step.

What does it cost to get page content with search results?

Text and highlights for up to 10 results are included in the base price and billed once. Results above 10 cost $1 per 1,000, and AI page summaries cost $1 per 1,000 pages (lite does not support summaries), per Exa's pricing page.

Which search type should I use for a latency-sensitive application?

lite is built for speed, returning in about 200 ms at $4 per 1,000 requests. It serves cached content and does not support summaries, outputSchema, or maxAgeHours; use auto when you need those parameters.

Can I get a synthesized answer instead of raw passages?

Yes. With outputSchema on auto or a deep search type, the response includes a synthesized output.content with citations in output.grounding, at the cost of about 2 seconds of extra synthesis time.

Conclusion

Retrieving relevant web results and extracting their main content no longer requires a search API plus a scraping pipeline. Exa's Search API does both in a single call: ranked results, extracted highlights or full text, filters, and optional structured synthesis, with latency from about 200 ms and pricing that includes content for up to 10 results in the base request. Start with the Search quickstart, try it with the Free tier's monthly credits, and see whether one call can replace the fetch-and-parse step in your pipeline.

Related Articles