Web search

by Exa

exa/search

Search the web and get ranked results, optionally with page content.

Billed per
call
Price
Price: $0.0084
Provider
Exa
Timeout
5 min

Overview

Takes a natural-language or keyword query and returns ranked web results, each with a URL, title, publication date, author, and a stable document id. Results can be narrowed by domain allow and deny lists, publication date, and a content category such as news or research. Asking for contents folds retrieval into the same call, so one request returns extracted page text, query-relevant highlights, and summaries instead of a fetch per result.

A result list, each entry carrying a title, URL, document id, publication date, and any content that was requested.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
querystringYesWhat to search for, in plain language or keywords.
numResultsintegerNoHow many results to return.
Default: 10
Minimum: 1
Maximum: 100
typestringNoHow hard to search, from an instant lookup to a deep research pass.
Allowed: instant, fast, auto, deep-lite, deep, deep-reasoning
Default: "auto"
categorystringNoRestrict results to one kind of page.
Allowed: company, publication, news, personal site, financial report, people
includeDomainsarrayNoOnly return results from these domains.
contentsobjectNoReturn page content with each result: text, highlights, and summaries.

Requests up to 1 MB.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"exa","endpoint":"search","input":{"query":"agent gateways","numResults":5,"contents":{"text":{"maxCharacters":1000}}}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

$0.0084 per call using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions