POST
/
search
curl -X POST 'https://api.exa.ai/search' \
  -H 'Authorization: Bearer YOUR-EXA-API-KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "Latest research in LLMs",
    "text": true
  }'

Get your Exa API key

Authorizations

Authorization
string
header
required

API key can be provided either via x-api-key header or Authorization header with Bearer scheme

Body

application/json
query
string
required

The query string for the search.

useAutoprompt
boolean
default:
true

Autoprompt converts your query to an Exa-style query. Enabled by default for auto search, optional for neural search, and not available for keyword search.

type
enum<string>
default:
auto

The type of search. Neural uses an embeddings-based model, keyword is google-like SERP. Default is auto, which automatically decides between keyword and neural.

Available options:
keyword,
neural,
auto
category
enum<string>

A data category to focus on.

Available options:
company,
research paper,
news,
pdf,
github,
tweet,
personal site,
linkedin profile,
financial report
numResults
integer
default:
10

Number of results to return (up to thousands of results available for custom plans)

Required range: x < 100
includeDomains
string[]

List of domains to include in the search. If specified, results will only come from these domains.

excludeDomains
string[]

List of domains to exclude from search results. If specified, no results will be returned from these domains.

startCrawlDate
string

Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled after this date. Must be specified in ISO 8601 format.

endCrawlDate
string

Crawl date refers to the date that Exa discovered a link. Results will include links that were crawled before this date. Must be specified in ISO 8601 format.

startPublishedDate
string

Only links with a published date after this will be returned. Must be specified in ISO 8601 format.

endPublishedDate
string

Only links with a published date before this will be returned. Must be specified in ISO 8601 format.

includeText
string[]

List of strings that must be present in webpage text of results. Currently, only 1 string is supported, of up to 5 words.

excludeText
string[]

List of strings that must not be present in webpage text of results. Currently, only 1 string is supported, of up to 5 words.

contents
object

Response

200 - application/json
OK
requestId
string

Unique identifier for the request

autopromptString
string

The prompt generated by autoprompt for your query

autoDate
string

Timestamp of when autoprompt was generated

resolvedSearchType
enum<string>

The search type that was actually used for this request

Available options:
neural,
keyword
results
object[]

A list of search results containing title, URL, published date, author, and score.

searchType
enum<string>

For auto searches, indicates which search type was selected.

Available options:
neural,
keyword
costDollars
object