Skip to main content
The search endpoint runs a live web query and returns the top results. Optionally, pass scrapeOptions to inline-scrape the content of every result URL in the same call — you get ranked results and their full page content without making separate scrape requests. The entire operation costs 1 credit regardless of the number of results returned. Send POST /v1/search with a query string. Use the limit parameter to control how many results come back.
curl -X POST https://api.zapfetch.com/v1/search \
  -H "Authorization: Bearer $ZAPFETCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "best vector databases 2026",
    "limit": 5
  }'

Scrape results inline with scrapeOptions

Pass scrapeOptions to fetch the full content of each result URL as part of the same search call. Specify which formats you want — the same options available on the scrape endpoint apply here.
curl -X POST https://api.zapfetch.com/v1/search \
  -H "Authorization: Bearer $ZAPFETCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "best vector databases 2026",
    "limit": 5,
    "scrapeOptions": { "formats": ["markdown"] }
  }'
Using scrapeOptions is the most efficient way to build a research pipeline: one request gives you ranked results and their full content, ready to pass to an LLM without a second round-trip.

Key parameters

ParameterTypeDescription
querystringThe search query to run.
limitintegerNumber of results to return.
scrapeOptionsobjectOptional. If present, each result URL is scraped and its content included in the response. Accepts a formats array.

Credit cost

OutcomeCost
Successful search call1 credit
Failed call (error response)0 credits
The 1-credit cost covers the search itself. When you add scrapeOptions, the inline scrapes are included in that same credit — you are not charged separately for each result URL fetched.

Next steps

  • Fetch a single URL directly with Scrape.
  • Pull structured fields out of search results with Extract.
  • Crawl a whole site with Crawl.