---
title: "Search"
method: POST
path: "/search"
---

# Search

`POST /search`

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

## Request body

- SearchRequest
  - `includeDomains` string[], 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.
  - `excludeDomains` string[], 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.
  - `startCrawlDate` string, date-time, nullable — Deprecated and has no effect; ignored by the API. Must be specified in ISO 8601 format.
  - `endCrawlDate` string, date-time, nullable — Deprecated and has no effect; ignored by the API. Must be specified in ISO 8601 format.
  - `startPublishedDate` string, date-time, nullable — Only links with a published date after this will be returned. Must be specified in ISO 8601 format.
  - `endPublishedDate` string, date-time, nullable — Only links with a published date before this will be returned. Must be specified in ISO 8601 format.
  - `numResults` integer, 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.
  - `context` union
    - boolean — Deprecated: Use highlights or text instead. Returns page contents as a combined context string.
    - object — Deprecated: Use highlights or text instead. Returns page contents as a combined context string.
      - `maxCharacters` integer — Deprecated. Maximum character limit for the context string. Maximum supported value is 10000.
  - `moderation` boolean, nullable — Enable content moderation to filter unsafe content from search results.
  - `contents` ContentsOptions
    - `text` union
      - boolean — If true, returns full page text with default settings. If false, disables text return.
      - object — Advanced options for controlling text extraction. Use this when you need to limit text length or include HTML structure.
        - `maxCharacters` integer, nullable — Maximum character limit for the full page text. Useful for controlling response size and API costs. Maximum supported value is 10000.
        - `includeHtmlTags` boolean, nullable — If true, include lightweight HTML tags in returned text instead of plain markdown-style text. Use maxAgeHours: 0 when you need this applied to freshly fetched content.
        - `verbosity` 'compact' | 'standard' | 'full', nullable — Controls text rendering verbosity. compact focuses on main content, standard includes more surrounding page context, and full requests the most complete rendered text. Some pages may produce identical standard and full output. Use maxAgeHours: 0 when you need this applied to freshly fetched content.
        - `includeSections` string[], nullable — Best-effort. Only include content classified into these semantic page sections. Section classification may be unavailable or incomplete for some pages; validate output if strict filtering is required. Use maxAgeHours: 0 when you need this applied to freshly fetched content.
        - `excludeSections` string[], nullable — Exclude content classified into these semantic page sections. Section classification is best-effort. Use maxAgeHours: 0 when you need this applied to freshly fetched content.
    - `highlights` union
      - boolean — If true, returns highlights with default settings. If false, disables highlights.
      - object — Advanced options for steering highlight extraction. Pass highlights: true for the highest-quality default; supply this object only when you need to guide selection with your own query.
        - `query` string, nullable — Custom query that guides which highlights the LLM picks.
        - `maxCharacters` integer, nullable — Maximum number of characters to return for highlights. Controls the total length of highlight text returned per URL. Maximum supported value is 10000.
        - `numSentences` integer, nullable — Deprecated and will be removed in a future release. Currently mapped to a character budget of about 1333 characters per sentence. Pass highlights: true for default highlights, or { query } to guide selection with your own query.
        - `highlightsPerUrl` integer, nullable — Deprecated and will be removed in a future release. Currently ignored. Pass highlights: true for default highlights, or { query } to guide selection with your own query.
    - `summary` object, nullable — Summary of the webpage.
      - `query` string, nullable — Custom query for the LLM-generated summary.
      - `schema` object, nullable — JSON schema for structured output from summary. See https://json-schema.org/overview/what-is-jsonschema for JSON Schema documentation.
    - `extras` object, nullable — Extra parameters to pass.
      - `links` integer, nullable — Number of URLs to return from each webpage.
      - `imageLinks` integer, nullable — Number of images to return for each result.
      - `richImageLinks` integer, nullable — Number of rich image links to return for each result.
      - `richLinks` integer, nullable — Number of rich links to return for each result.
      - `codeBlocks` integer, nullable — Number of code blocks to return for each result.
    - `context` union
      - boolean — Deprecated: Use highlights or text instead. Returns page contents as a combined context string.
      - object — Deprecated: Use highlights or text instead. Returns page contents as a combined context string.
        - `maxCharacters` integer — Deprecated. Maximum character limit for the context string. Maximum supported value is 10000.
    - `livecrawl` 'never' | 'always' | 'fallback' | 'preferred', nullable — Deprecated: Use maxAgeHours instead for content freshness control. livecrawl does not guarantee freshly fetched parser output and may be served according to server freshness policy. Do not send livecrawl and maxAgeHours together.
    - `livecrawlTimeout` integer, nullable — The timeout for livecrawling in milliseconds.
    - `maxAgeHours` integer, nullable — Maximum age of cached content in hours. Positive values use cached content if it is less than this many hours old; 0 fetches fresh content and is the supported way to apply text rendering options to newly fetched pages; -1 always uses cache; omitted uses fallback fetching when cached content is unavailable. Maximum supported value is 720 hours.
    - `subpages` integer, nullable — The number of subpages to crawl. The actual number crawled may be limited by system constraints.
    - `subpageTarget` union
      - string
      - string[]
  - `query` string, required — The query string for the search.
  - `additionalQueries` string[], 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.
  - `userLocation` string, 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.
  - `outputSchema` union
    - object
      - `type` 'text', required
      - `description` string
    - object
      - `type` 'object', required
      - `description` string
      - `properties` object
      - `required` string[]
      - `additionalProperties` boolean
  - `systemPrompt` string, nullable — Additional instructions that guide generated output or agent behavior. Use this for source preferences, novelty constraints, duplication constraints, or other behavior guidance.
  - `stream` boolean, 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.

## Response `200`

OK

- union
  - object
    - `requestId` string — Unique identifier for the request.
    - `results` SearchResultOutput[], required — A list of search results containing title, URL, published date, and author.
      - `title` string, required — The title of the search result.
      - `url` string, uri, required — The URL of the search result.
      - `publishedDate` string, date-time — An estimate of the creation date, from parsing HTML content. Format is YYYY-MM-DD.
      - `author` string, nullable — If available, the author of the content.
      - `id` string — The temporary ID for the document. Useful for the /contents endpoint.
      - `image` string, uri — The URL of an image associated with the search result, if available.
      - `favicon` string, uri — The URL of the favicon for the search result's domain.
      - `text` string — The full content text of the search result.
      - `highlights` string[] — Array of highlights extracted from the search result content.
      - `highlightScores` number[] — Array of cosine similarity scores for each highlighted snippet.
      - `summary` string — Summary of the webpage.
      - `subpages` object[] — Array of subpages for the search result.
        - `title` string, required — The title of the search result.
        - `url` string, uri, required — The URL of the search result.
        - `publishedDate` string, date-time — An estimate of the creation date, from parsing HTML content. Format is YYYY-MM-DD.
        - `author` string, nullable — If available, the author of the content.
        - `id` string — The temporary ID for the document. Useful for the /contents endpoint.
        - `image` string, uri — The URL of an image associated with the search result, if available.
        - `favicon` string, uri — The URL of the favicon for the search result's domain.
      - `entities` union[] — Structured entity data for company, person, or publication search results. Returned for supported entity-backed categories.
        - union
          - object
            - `id` string, required — Stable company entity identifier.
            - `type` 'company', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Company-specific entity fields.
              - …
          - object
            - `id` string, required — Stable person entity identifier.
            - `type` 'person', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Person-specific entity fields.
              - …
          - object
            - `id` string, required — Stable publication entity identifier.
            - `type` 'publication', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Publication-specific entity fields.
              - …
      - `extras` object — Results from extras.
        - `links` string[] — Array of links from the search result.
    - `resolvedSearchType` string — Deprecated legacy field. Current production responses may return an empty string; clients should not branch on this value.
    - `context` string — Deprecated. Combined context string from search results. Use highlights or text instead.
    - `costDollars` CostDollarsOutput — Endpoint-dependent estimated dollar cost breakdown for the completed request. Billing is computed from usage counters rather than this response object.
      - `total` number, float — Estimated total dollar cost for the completed request. This response value is not an invoice record.
      - `search` object — Endpoint-dependent estimated search cost breakdown by retrieval mode. Instant, fast, and auto search responses may include neural search cost. Deep search modes may be reflected only in total.
        - `neural` number, float — Cost of neural search operations.
    - `output` SearchSynthesisOutputOutput, required — Synthesized output. Returned when outputSchema is provided.
      - `content` union, required — Synthesized content. String by default, or object when outputSchema is provided.
        - string
        - object
      - `grounding` object[], required — Field-level grounding for synthesized output.
        - `field` string, required — Field path in output.content, for example content or companies[0].funding.
        - `citations` object[], required — Sources supporting this output field.
          - `url` string, uri, required — Source URL.
          - `title` string, required — Source title.
        - `confidence` 'low' | 'medium' | 'high', required — Model-reported reliability for this field.
  - object
    - `requestId` string — Unique identifier for the request.
    - `results` SearchResultOutput[], required — A list of search results containing title, URL, published date, and author.
      - `title` string, required — The title of the search result.
      - `url` string, uri, required — The URL of the search result.
      - `publishedDate` string, date-time — An estimate of the creation date, from parsing HTML content. Format is YYYY-MM-DD.
      - `author` string, nullable — If available, the author of the content.
      - `id` string — The temporary ID for the document. Useful for the /contents endpoint.
      - `image` string, uri — The URL of an image associated with the search result, if available.
      - `favicon` string, uri — The URL of the favicon for the search result's domain.
      - `text` string — The full content text of the search result.
      - `highlights` string[] — Array of highlights extracted from the search result content.
      - `highlightScores` number[] — Array of cosine similarity scores for each highlighted snippet.
      - `summary` string — Summary of the webpage.
      - `subpages` object[] — Array of subpages for the search result.
        - `title` string, required — The title of the search result.
        - `url` string, uri, required — The URL of the search result.
        - `publishedDate` string, date-time — An estimate of the creation date, from parsing HTML content. Format is YYYY-MM-DD.
        - `author` string, nullable — If available, the author of the content.
        - `id` string — The temporary ID for the document. Useful for the /contents endpoint.
        - `image` string, uri — The URL of an image associated with the search result, if available.
        - `favicon` string, uri — The URL of the favicon for the search result's domain.
      - `entities` union[] — Structured entity data for company, person, or publication search results. Returned for supported entity-backed categories.
        - union
          - object
            - `id` string, required — Stable company entity identifier.
            - `type` 'company', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Company-specific entity fields.
              - …
          - object
            - `id` string, required — Stable person entity identifier.
            - `type` 'person', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Person-specific entity fields.
              - …
          - object
            - `id` string, required — Stable publication entity identifier.
            - `type` 'publication', required — Entity discriminator.
            - `version` integer, required — Entity schema version.
            - `properties` object, required — Publication-specific entity fields.
              - …
      - `extras` object — Results from extras.
        - `links` string[] — Array of links from the search result.
    - `resolvedSearchType` string — Deprecated legacy field. Current production responses may return an empty string; clients should not branch on this value.
    - `context` string — Deprecated. Combined context string from search results. Use highlights or text instead.
    - `costDollars` CostDollarsOutput — Endpoint-dependent estimated dollar cost breakdown for the completed request. Billing is computed from usage counters rather than this response object.
      - `total` number, float — Estimated total dollar cost for the completed request. This response value is not an invoice record.
      - `search` object — Endpoint-dependent estimated search cost breakdown by retrieval mode. Instant, fast, and auto search responses may include neural search cost. Deep search modes may be reflected only in total.
        - `neural` number, float — Cost of neural search operations.

## Other responses

- `402` — Payment Required

---

[API](https://skmtc.net/exa/apis/exa-public-api.md) · [All operations](https://skmtc.net/exa/apis/exa-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/exa/exa-public-api/revisions/5c7114e0ef43/schema)
