> ## 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 Contents: Inputs, Cost & CLI Example

> Extracting page contents, summaries, and highlights from URLs. 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_contents:{"urls":["https://example.com"]}' --json
```

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

## Input Schema

| Name                       | Type                                               | Required | Default | Description                                                                                                            |
| -------------------------- | -------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `payload.urls`             | `array`                                            | No       |         | URLs to fetch contents for (alias of ids).                                                                             |
| `payload.ids`              | `array`                                            | No       |         | Document IDs (or URLs) to fetch contents for.                                                                          |
| `payload.text`             | `boolean \| object`                                | No       |         |                                                                                                                        |
| `payload.highlights`       | `boolean \| object`                                | No       |         |                                                                                                                        |
| `payload.summary`          | `object`                                           | No       |         | LLM-generated summary of each page (structured output supported).                                                      |
| `payload.livecrawl`        | `"never" \| "fallback" \| "preferred" \| "always"` | No       |         | Live crawl behavior (deprecated in Exa docs; prefer maxAgeHours).                                                      |
| `payload.livecrawlTimeout` | `number`                                           | No       |         | Live crawl timeout in milliseconds.                                                                                    |
| `payload.maxAgeHours`      | `number`                                           | No       |         | Max age (hours) for cached content before live crawl.                                                                  |
| `payload.subpages`         | `number`                                           | No       |         | Number of subpages to crawl from each result.                                                                          |
| `payload.subpageTarget`    | `string \| array`                                  | No       |         | Subpage keyword(s) to target.                                                                                          |
| `payload.extras`           | `object`                                           | No       |         | Extra content options.                                                                                                 |
| `payload.context`          | `boolean \| object`                                | No       |         | Return a combined context string. When true, combines all result contents into one string (10,000+ chars recommended). |

### Allowed values

| Field               | Allowed values                             |
| ------------------- | ------------------------------------------ |
| `payload.livecrawl` | `never`, `fallback`, `preferred`, `always` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Exa contents input.",
    "properties": {
      "urls": {
        "type": "array",
        "description": "URLs to fetch contents for (alias of ids).",
        "items": {
          "type": "string"
        }
      },
      "ids": {
        "type": "array",
        "description": "Document IDs (or URLs) to fetch contents for.",
        "items": {
          "type": "string"
        }
      },
      "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",
        "description": "Live crawl behavior (deprecated in Exa docs; prefer maxAgeHours).",
        "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": {
        "description": "Return a combined context string. When true, combines all result contents into one string (10,000+ chars recommended).",
        "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
          }
        ]
      }
    },
    "required": [],
    "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 contents 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": {}
                },
                "subpages": {
                  "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
                  }
                }
              },
              "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_contents --payload '{
  "urls": [
    "https://example.com"
  ]
}' --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.02` per pricing unit.
* Billing mode: `post_deduct`.
