Skip Building Your Own Web Scraper: Use a Search API That Returns the Source URLs
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.
Skip Building Your Own Web Scraper: Use a Search API That Returns the Source URLs
If you need web data plus the exact URLs it came from, you do not need to build your own scraper. A search API like Exa's Search API does both jobs: send a natural-language query, and it returns ranked results with the title, source URL, and page content in one response, starting at $4 per 1,000 requests on the lite type.
Introduction
Building a scraper sounds simple until you live with it. You write the crawler, then the parser, then the proxy rotation, then the retry logic, then the repair script for the day a site changes its markup. And even when everything works, a scraper only gets pages from URLs you already know. It cannot answer the harder half of your problem: finding the right source URLs in the first place.
That second half is what a search API solves. Instead of maintaining infrastructure, you describe what you are looking for and get back results with their source URLs attached, so claims in your application can link back to the pages they came from.
Key Takeaways
- A scraper retrieves pages from URLs you supply; a search API also finds those URLs, which is usually the harder problem.
- Exa's Search API returns ranked results with title, URL, and content in a single call, with
publishedDateestimates where available. - Pricing starts at $4 per 1,000 requests for the
litetype (about 200 ms typical latency), with no infrastructure to run. - The free tier includes $10 in credits every month, enough for up to 2,500
litesearches, with no payment method required. - You can start with a single API call and add structured output, domain filters, or scheduled monitoring only when your workflow needs them.
Why a Search API Fits This Problem
Getting from a question to source URLs has two parts: discovery (which pages match what I need?) and retrieval (what do those pages say?). A homegrown scraper covers only retrieval, and only for a fixed list of sites. A search API covers both.
With Exa, you send a natural-language query to POST https://api.exa.ai/search and get back ranked results, each with a title, the source URL, and whatever content you requested. You can filter by domain, restrict results to a date range, or use category for category-specific retrieval such as company, news, or research pages. Because the URL travels with every result, citations and source links come for free.
There is also a maintenance story to weigh. Scrapers break when sites change; a search API provider absorbs that churn. Exa maintains the crawl infrastructure, handles JavaScript-rendered pages and PDFs through its Contents API, and keeps an index you query instead of a fleet of parsers you repair.
Key Capabilities
Search types matched to the job. The lite type costs $4 per 1,000 requests and typically returns in about 200 ms, which suits high-volume or latency-sensitive loops. auto costs $7 per 1,000 and takes about 1 second, adding more parameters such as maxAgeHours freshness control and outputSchema. Deep Search types (deep-lite and deep, $12 per 1,000) take roughly 4 to 15 seconds for harder research questions.
Content with every result. The base search price includes text and highlights for up to 10 results, 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). For URLs you already know, the separate Contents API fetches page content at $1 per 1,000 returned pages per content type.
Structured output. With outputSchema on auto or the Deep types, the response adds an output.content shaped to your schema, alongside the ranked results, with citations in output.grounding so you can trace each field to its source page. Synthesis adds about 2 seconds.
Domain and date control. includeDomains and excludeDomains restrict where results come from, and published-date filters narrow results to a window, which matters when you need recent sources only.
Proof and Evidence
A quick way to evaluate the claim is to run one request. This example uses the Python SDK, with the API key read from an environment variable:
from exa_py import Exa
exa = Exa() # reads EXA_API_KEY from the environment
result = exa.search(
"recent papers on retrieval-augmented generation evaluation",
type="lite",
num_results=5,
contents={"highlights": True},
)
for r in result.results:
print(r.title, r.url)
Each printed r.url is the source URL for that result, ready to cite. The free tier includes $10 in monthly credits (up to 2,500 lite searches) plus a one-time $10 onboarding bonus, so you can test this against your real queries before paying anything.
Each result's url points to the page its content came from, so you can open the source and check the content yourself.
Buyer Considerations
- Volume and cost. Estimate requests per month against the per-type pricing. At 50 searches a day, a 30-day month is 1,500 requests, or $6 on
liteand $10.50 onautobefore extras. - Freshness. When
maxAgeHours(and legacylivecrawl) are omitted, Search uses cached page content only. Onautoor a Deep type, setmaxAgeHoursto cap cache age (0requires content fetched within the last 60 seconds);literejects it and serves cached content only. Pick the type that matches how current your sources need to be. - Structured needs. If your pipeline expects JSON fields rather than prose, plan on
autoor a Deep type, sinceliterejectsoutputSchema. - Ongoing monitoring. If the job is not one search but watching for changes, the Monitors API reruns a configured search on a schedule as often as hourly ($2 per 1,000 runs, plus $1 per 1,000 results above 10 and $1 per 1,000 pages for AI page summaries), and each run may start up to 30 minutes late.
- Scale of the task. For large list-building or multi-step research rather than single searches, Exa's Agent API runs the whole loop for you, with fixed effort levels from $0.012 to $1.00 per request, or metered
autoandultraefforts at $0.10 per ACU plus $0.005 per search (default cost caps of $5 and $20).
Frequently Asked Questions
Do I still need my own scraping infrastructure?
Not for discovery and standard page retrieval. Exa's crawler handles JavaScript-rendered pages, PDFs, and complex layouts, and returns content with source URLs. It does not bypass logins, paywalls, or CAPTCHAs, so content behind authentication still needs your own access path.
How do I get the source URL for each result?
Every result object includes a url field alongside the title and content, so citations are available on every search without extra calls.
What does it cost compared with running my own scrapers?
Search starts at $4 per 1,000 requests for lite and $7 for auto, including 10 results with text and highlights per request. Your own infrastructure has no per-request fee but does carry server, proxy, and engineering costs that scale with every site you support.
Can I get results as structured JSON instead of raw text?
Yes. Set outputSchema on the auto, deep-lite, or deep search types and Exa returns an output.content shaped to your schema alongside the ranked results, with grounding that maps fields back to source pages. Synthesis adds about 2 seconds to the response.
Conclusion
Building a scraper solves retrieval for URLs you already have, but the harder half of the job, finding the right source URLs, is exactly what a search API is built for. Exa's Search API returns ranked results with their source URLs and content in one call, from $4 per 1,000 requests on lite, with a free tier to test against your own queries. Start with a single search call, and add structured output, domain filters, or scheduled monitoring only as your workflow demands it.