Skip to main content
POST
/
search
curl -X POST 'https://api.exa.ai/search' \
  -H 'x-api-key: YOUR-EXA-API-KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "Latest research in LLMs",
    "contents": {
      "highlights": true
    }
  }'
{
  "results": [
    {
      "title": "A Comprehensive Overview of Large Language Models",
      "url": "https://arxiv.org/pdf/2307.06435.pdf",
      "publishedDate": "2023-11-16T01:36:32.547Z",
      "author": "Humza Naveed",
      "id": "https://arxiv.org/abs/2307.06435",
      "image": "https://arxiv.org/pdf/2307.06435.pdf/page_1.png",
      "favicon": "https://arxiv.org/favicon.ico",
      "text": "Abstract Large Language Models (LLMs) have recently demonstrated remarkable capabilities...",
      "highlights": [
        "Such requirements have limited their adoption..."
      ],
      "highlightScores": [
        0.4600165784358978
      ],
      "summary": "This overview paper on Large Language Models (LLMs) highlights key developments...",
      "subpages": [
        {
          "title": "A Comprehensive Overview of Large Language Models",
          "url": "https://arxiv.org/pdf/2307.06435.pdf",
          "publishedDate": "2023-11-16T01:36:32.547Z",
          "author": "Humza Naveed",
          "id": "https://arxiv.org/abs/2307.06435",
          "image": "https://arxiv.org/pdf/2307.06435.pdf/page_1.png",
          "favicon": "https://arxiv.org/favicon.ico"
        }
      ],
      "entities": [
        {
          "id": "<string>",
          "type": "<string>",
          "version": 2,
          "properties": {
            "name": "<string>",
            "foundedYear": 123,
            "description": "<string>",
            "workforce": {
              "total": 123
            },
            "headquarters": {
              "address": "<string>",
              "city": "<string>",
              "postalCode": "<string>",
              "country": "<string>"
            },
            "financials": {
              "revenueAnnual": 123,
              "fundingTotal": 123,
              "fundingLatestRound": {
                "name": "<string>",
                "date": "<string>",
                "amount": 123
              }
            },
            "webTraffic": {
              "visitsMonthly": 123,
              "countryRank": 123,
              "avgDurationSeconds": 123,
              "history": [
                {
                  "value": 123,
                  "dateFrom": "<string>",
                  "dateTo": "<string>"
                }
              ]
            }
          }
        }
      ],
      "extras": {
        "links": []
      }
    }
  ],
  "output": {
    "content": "<string>",
    "grounding": [
      {
        "field": "<string>",
        "citations": [
          {
            "url": "<string>",
            "title": "<string>"
          }
        ]
      }
    ]
  },
  "requestId": "b5947044c4b78efa9552a7c89b306d95",
  "resolvedSearchType": "",
  "context": "<string>",
  "costDollars": {
    "total": 0.007,
    "search": {
      "neural": 0.007
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://exa.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Get your Exa API key

Authorizations

x-api-key
string
header
required

Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .

Body

application/json
query
string
required

The query string for the search.

Minimum string length: 1
Example:

"Latest developments in LLM capabilities"

includeDomains
string[] | null

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

Maximum array length: 1200
Example:
["arxiv.org", "paperswithcode.com"]
excludeDomains
string[] | null

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

Maximum array length: 1200
startCrawlDate
string<date-time> | null

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.

Example:

"2023-01-01T00:00:00.000Z"

endCrawlDate
string<date-time> | null

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.

Example:

"2023-12-31T00:00:00.000Z"

startPublishedDate
string<date-time> | null

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

Example:

"2023-01-01T00:00:00.000Z"

endPublishedDate
string<date-time> | null

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

Example:

"2023-12-31T00:00:00.000Z"

numResults
integer | null
default:10

Number of results to return. Limits vary by search type. The maximum public limit is 100 results. Contact sales (hello@exa.ai) to discuss higher limits.

Required range: 1 <= x <= 100
Example:

10

context
deprecated

Deprecated: Use highlights or text instead. Returns page contents as a combined context string.

Example:

true

moderation
boolean | null
default:false

Enable content moderation to filter unsafe content from search results.

Example:

true

contents
object

Content options for text, highlights, summary, extras, and freshness controls.

additionalQueries
string[] | null

Additional query variations for deep-search variants. Only works with a deep-search type. When provided, these queries are used alongside the main query for broader results.

Required array length: 1 - 10 elements
Example:
[
"LLM advancements",
"large language model progress"
]
type
enum<string> | null
default:auto

The type of search. auto is the default and intelligently selects the best search mode, instant provides the lowest latency for real-time applications, fast uses lower-latency search models, deep-lite is lightweight synthesis, deep performs in-depth research with synthesis, and deep-reasoning adds more reasoning.

Available options:
instant,
fast,
auto,
deep-lite,
deep,
deep-reasoning
Example:

"auto"

category
enum<string> | null

A data category to focus on. Known categories include company, research paper, news, personal site, financial report, and people. Other strings are accepted and used as category hints for search. The people and company categories have improved quality for finding people profiles and company pages. Note: The company and people categories only support a limited set of filters. The following parameters are NOT supported for these categories: startPublishedDate, endPublishedDate, startCrawlDate, endCrawlDate, excludeDomains. For people category, includeDomains only accepts supported profile domains. Using unsupported parameters will result in a 400 error.

Available options:
company,
research paper,
news,
personal site,
financial report,
people
Example:

"research paper"

userLocation
string | null

The two-letter ISO country code of the user, e.g. US.

Example:

"US"

compliance
enum<string> | null

Enterprise-only compliance mode. Set to hipaa to require HIPAA-safe processing. Requests fail closed or restrict features when the requested behavior requires non-HIPAA-safe processors.

Available options:
hipaa
Example:

"hipaa"

outputSchema
object

JSON schema for synthesized output. Supported root types are "text" and "object". When provided, the response includes an output object whose content matches this schema. Works with every search type and adds about 2 seconds of synthesis latency on top of the selected search type.

systemPrompt
string | null

Additional instructions that guide generated output or agent behavior. Use this for source preferences, novelty constraints, duplication constraints, or other behavior guidance.

Example:

"Prefer official sources and avoid duplicate results."

stream
boolean | null
default:false

Requests server-sent events for synthesized output streaming. Streaming is currently used only when outputSchema is provided; otherwise the endpoint returns the normal JSON search response.

Response

OK

results
object[]
required

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

output
object
required

Synthesized output. Returned when outputSchema is provided.

requestId
string

Unique identifier for the request.

Example:

"b5947044c4b78efa9552a7c89b306d95"

resolvedSearchType
string
deprecated

Deprecated legacy field. Current production responses may return an empty string; clients should not branch on this value.

Example:

""

context
string
deprecated

Deprecated. Combined context string from search results. Use highlights or text instead.

costDollars
object

Endpoint-dependent estimated dollar cost breakdown for the completed request. Billing is computed from usage counters rather than this response object.