> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Exa Search: Inputs, Cost & CLI Example

> General web search with Exa ranking and freshness controls. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=exa_search:{"query":"{{query}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                         | Type                                                                                                      | Required | Default | Description                                                                            |
| ---------------------------- | --------------------------------------------------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------- |
| `payload.query`              | `string`                                                                                                  | Yes      |         | The search query string.                                                               |
| `payload.additionalQueries`  | `array`                                                                                                   | No       |         | Additional queries (used with type="deep" to expand coverage).                         |
| `payload.type`               | `"auto" \| "fast" \| "deep" \| "neural" \| "instant"`                                                     | No       |         | Search type (auto chooses the best strategy).                                          |
| `payload.category`           | `"company" \| "people" \| "news" \| "research paper" \| "tweet" \| "personal site" \| "financial report"` | No       |         | Optional result category filter.                                                       |
| `payload.numResults`         | `number`                                                                                                  | No       |         | Number of results to return (max 100).                                                 |
| `payload.includeDomains`     | `array`                                                                                                   | No       |         | Only include results from these domains.                                               |
| `payload.excludeDomains`     | `array`                                                                                                   | No       |         | Exclude results from these domains.                                                    |
| `payload.startCrawlDate`     | `string`                                                                                                  | No       |         | Only include links crawled after this ISO date-time.                                   |
| `payload.endCrawlDate`       | `string`                                                                                                  | No       |         | Only include links crawled before this ISO date-time.                                  |
| `payload.startPublishedDate` | `string`                                                                                                  | No       |         | Only include links published after this ISO date-time.                                 |
| `payload.endPublishedDate`   | `string`                                                                                                  | No       |         | Only include links published before this ISO date-time.                                |
| `payload.includeText`        | `array`                                                                                                   | No       |         | Require these text snippets to appear in page content (max 1 string of up to 5 words). |
| `payload.excludeText`        | `array`                                                                                                   | No       |         | Exclude pages containing these text snippets (max 1 string of up to 5 words).          |
| `payload.userLocation`       | `string`                                                                                                  | No       |         | Two-letter ISO country code, e.g. "US".                                                |
| `payload.contents`           | `object`                                                                                                  | No       |         |                                                                                        |
| `payload.context`            | `boolean \| object`                                                                                       | No       |         |                                                                                        |
| `payload.moderation`         | `boolean`                                                                                                 | No       |         | Enable content moderation (may reduce recall).                                         |

### Allowed values

| Field              | Allowed values                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------- |
| `payload.type`     | `auto`, `fast`, `deep`, `neural`, `instant`                                                 |
| `payload.category` | `company`, `people`, `news`, `research paper`, `tweet`, `personal site`, `financial report` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Exa raw search input.",
    "properties": {
      "query": {
        "type": "string",
        "description": "The search query string."
      },
      "additionalQueries": {
        "type": "array",
        "description": "Additional queries (used with type=\"deep\" to expand coverage).",
        "items": {
          "type": "string"
        }
      },
      "type": {
        "type": "string",
        "description": "Search type (auto chooses the best strategy).",
        "enum": [
          "auto",
          "fast",
          "deep",
          "neural",
          "instant"
        ]
      },
      "category": {
        "type": "string",
        "description": "Optional result category filter.",
        "enum": [
          "company",
          "people",
          "news",
          "research paper",
          "tweet",
          "personal site",
          "financial report"
        ]
      },
      "numResults": {
        "type": "number",
        "description": "Number of results to return (max 100)."
      },
      "includeDomains": {
        "type": "array",
        "description": "Only include results from these domains.",
        "items": {
          "type": "string"
        }
      },
      "excludeDomains": {
        "type": "array",
        "description": "Exclude results from these domains.",
        "items": {
          "type": "string"
        }
      },
      "startCrawlDate": {
        "type": "string",
        "description": "Only include links crawled after this ISO date-time."
      },
      "endCrawlDate": {
        "type": "string",
        "description": "Only include links crawled before this ISO date-time."
      },
      "startPublishedDate": {
        "type": "string",
        "description": "Only include links published after this ISO date-time."
      },
      "endPublishedDate": {
        "type": "string",
        "description": "Only include links published before this ISO date-time."
      },
      "includeText": {
        "type": "array",
        "description": "Require these text snippets to appear in page content (max 1 string of up to 5 words).",
        "maxItems": 1,
        "items": {
          "type": "string"
        }
      },
      "excludeText": {
        "type": "array",
        "description": "Exclude pages containing these text snippets (max 1 string of up to 5 words).",
        "maxItems": 1,
        "items": {
          "type": "string"
        }
      },
      "userLocation": {
        "type": "string",
        "description": "Two-letter ISO country code, e.g. \"US\"."
      },
      "contents": {
        "type": "object",
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "If true, returns full page text with default settings. If false, disables text return."
              },
              {
                "type": "object",
                "description": "Advanced text extraction options.",
                "properties": {
                  "maxCharacters": {
                    "type": "number",
                    "description": "Maximum characters for full page text (use to cap response size)."
                  },
                  "includeHtmlTags": {
                    "type": "boolean",
                    "description": "Include HTML tags in the returned text."
                  },
                  "verbosity": {
                    "type": "string",
                    "enum": [
                      "compact",
                      "standard",
                      "full"
                    ]
                  },
                  "includeSections": {
                    "type": "array",
                    "description": "Only include content from these sections.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "header",
                        "navigation",
                        "banner",
                        "body",
                        "sidebar",
                        "footer",
                        "metadata"
                      ]
                    }
                  },
                  "excludeSections": {
                    "type": "array",
                    "description": "Exclude content from these sections.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "header",
                        "navigation",
                        "banner",
                        "body",
                        "sidebar",
                        "footer",
                        "metadata"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "highlights": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "If true, returns highlight snippets with default settings (short evidence excerpts)."
              },
              {
                "type": "object",
                "description": "Advanced highlight extraction options.",
                "properties": {
                  "numSentences": {
                    "type": "number",
                    "description": "Number of sentences per highlight snippet."
                  },
                  "highlightsPerUrl": {
                    "type": "number",
                    "description": "Number of highlight snippets per URL."
                  },
                  "query": {
                    "type": "string",
                    "description": "Custom query to guide highlight selection."
                  },
                  "maxCharacters": {
                    "type": "number",
                    "description": "Maximum characters returned for highlights."
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "summary": {
            "type": "object",
            "description": "LLM-generated summary of each page (structured output supported).",
            "properties": {
              "query": {
                "type": "string",
                "description": "Custom query for the summary."
              },
              "schema": {
                "type": "object",
                "description": "JSON Schema for structured summary output (validated).",
                "additionalProperties": {}
              }
            },
            "additionalProperties": false
          },
          "livecrawl": {
            "type": "string",
            "enum": [
              "never",
              "fallback",
              "preferred",
              "always"
            ]
          },
          "livecrawlTimeout": {
            "type": "number",
            "description": "Live crawl timeout in milliseconds."
          },
          "maxAgeHours": {
            "type": "number",
            "description": "Max age (hours) for cached content before live crawl."
          },
          "subpages": {
            "type": "number",
            "description": "Number of subpages to crawl from each result."
          },
          "subpageTarget": {
            "description": "Subpage keyword(s) to target.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "extras": {
            "type": "object",
            "description": "Extra content options.",
            "properties": {
              "links": {
                "type": "number",
                "description": "Number of links to return per result."
              },
              "imageLinks": {
                "type": "number",
                "description": "Number of image links to return per result."
              }
            },
            "additionalProperties": false
          },
          "context": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "If true, returns a combined context string from results. Context strings often perform better than highlights for RAG."
              },
              {
                "type": "object",
                "description": "Context string options. When enabled, combines all result contents into a single string.",
                "properties": {
                  "maxCharacters": {
                    "type": "number",
                    "description": "Maximum characters for the combined context string. Exa recommends 10,000+ characters for best results."
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "context": {
        "anyOf": [
          {
            "type": "boolean",
            "description": "If true, returns a combined context string from results. Context strings often perform better than highlights for RAG."
          },
          {
            "type": "object",
            "description": "Context string options. When enabled, combines all result contents into a single string.",
            "properties": {
              "maxCharacters": {
                "type": "number",
                "description": "Maximum characters for the combined context string. Exa recommends 10,000+ characters for best results."
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "moderation": {
        "type": "boolean",
        "description": "Enable content moderation (may reduce recall)."
      }
    },
    "required": [
      "query"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Exa search result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "publishedDate": {
                  "type": "string"
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "score": {
                  "type": "number"
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "highlightScores": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                "summary": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  ]
                },
                "entities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "company",
                          "person"
                        ]
                      },
                      "version": {
                        "type": "number"
                      },
                      "properties": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "extras": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "additionalProperties": false
            }
          },
          "context": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute exa_search --payload '{
  "query": "latest developments in AI agents"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ```md theme={null}
  > The search endpoint lets you search the web and extract contents from the results.

  &lt;Card title="Get your Exa API key" icon="key" horizontal href="https://dashboard.exa.ai/api-keys" />
  ```
</details>

## Cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.07` per pricing unit.
* Billing mode: `post_deduct`.
