v1

latestOpenAPI 3.1.02026-08-0458114534.0 KB

Search

Perform a search with an Exa prompt-engineered query and retrieve a list of relevant results. Optionally get contents.

post/search

Request body

includeDomainsstring[] nullable

List of domains or domain paths to include in the search. Each entry can be a hostname (for example, example.com), a hostname with a path prefix (for example, example.com/docs), or a wildcard subdomain (for example, *.example.com). If specified, results will only come from the matching domains or paths. Use this parameter for domain or path filtering instead of adding a site: operator to the query.

excludeDomainsstring[] nullable

List of domains or domain paths to exclude from search results. Each entry can be a hostname (for example, example.com), a hostname with a path prefix (for example, example.com/docs), or a wildcard subdomain (for example, *.example.com). If specified, no results will be returned from the matching domains or paths. Use this parameter for domain or path filtering instead of adding a site: operator to the query.

startCrawlDatestring date-time nullable

Deprecated and has no effect; ignored by the API. Must be specified in ISO 8601 format.

endCrawlDatestring date-time nullable

Deprecated and has no effect; ignored by the API. Must be specified in ISO 8601 format.

startPublishedDatestring date-time nullable

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

endPublishedDatestring date-time nullable

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

numResultsinteger nullable

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.

moderationboolean nullable

Enable content moderation to filter unsafe content from search results.

querystring required

The query string for the search.

additionalQueriesstring[] nullable

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.

type'instant' | 'fast' | 'auto' | 'deep-lite' | 'deep' | 'deep-reasoning' nullable

The search mode to use. auto (default) is a balanced mode that optimizes for both quality and speed and is recommended for most applications. fast returns high-quality results with reduced latency, making it a good fit for user-facing search and interactive workflows. instant is optimized for minimum response time, trading some search depth for speed in real-time experiences such as chat, voice agents, and autocomplete. deep-lite performs lightweight research with synthesized results and a consistent 4-second latency, lower than full deep search. deep conducts comprehensive multi-step research with synthesis, while deep-reasoning adds stronger reasoning for complex analysis and decision-making tasks.

category'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people' nullable

A data category to focus on. Known categories include company, publication, 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. The publication category surfaces scholarly publications such as research papers, preprints, and journal articles, with structured metadata like authors, venue, and citations. Note: The company and people categories only support a limited set of filters. The following parameters are NOT supported for these categories: startPublishedDate, endPublishedDate, excludeDomains. Using unsupported parameters will result in a 400 error.

userLocationstring nullable

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

compliance'hipaa' nullable

Enterprise-only compliance mode. Set to hipaa for HIPAA mode. Requires cache-only retrieval with supported parameters. See the HIPAA docs for details.

systemPromptstring nullable

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

streamboolean nullable

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.

Example request

{
  "includeDomains": [
    "arxiv.org",
    "exa.ai/blog"
  ],
  "excludeDomains": [
    "docs.python.org/3"
  ],
  "startCrawlDate": "2023-01-01T00:00:00.000Z",
  "endCrawlDate": "2023-12-31T00:00:00.000Z",
  "startPublishedDate": "2023-01-01T00:00:00.000Z",
  "endPublishedDate": "2023-12-31T00:00:00.000Z",
  "numResults": 10,
  "context": true,
  "moderation": true,
  "contents": {
    "text": {
      "maxCharacters": 1000,
      "verbosity": "standard",
      "includeSections": [
        "body",
        "header"
      ],
      "excludeSections": [
        "navigation",
        "footer",
        "sidebar"
      ]
    },
    "highlights": {
      "query": "Key advancements",
      "maxCharacters": 2000,
      "numSentences": 1,
      "highlightsPerUrl": 1
    },
    "summary": {
      "query": "Main developments",
      "schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Title",
        "type": "object",
        "properties": {
          "Property 1": {
            "type": "string",
            "description": "Description"
          },
          "Property 2": {
            "type": "string",
            "enum": [
              "option 1",
              "option 2",
              "option 3"
            ],
            "description": "Description"
          }
        },
        "required": [
          "Property 1"
        ]
      }
    },
    "extras": {
      "links": 1,
      "imageLinks": 1
    },
    "context": true,
    "livecrawl": "preferred",
    "livecrawlTimeout": 1000,
    "maxAgeHours": 24,
    "subpages": 1
  },
  "query": "Latest developments in LLM capabilities",
  "additionalQueries": [
    "LLM advancements",
    "large language model progress"
  ],
  "type": "auto",
  "category": "publication",
  "userLocation": "US",
  "compliance": "hipaa",
  "systemPrompt": "Prefer official sources and avoid duplicate results."
}

Response

OK

OR

Example response

{
  "requestId": "b5947044c4b78efa9552a7c89b306d95",
  "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"
        }
      ],
      "extras": {
        "links": []
      }
    }
  ],
  "costDollars": {
    "total": 0.007,
    "search": {
      "neural": 0.007
    }
  }
}
All 58 operations