> ## 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: Answer

> Ask a research question about a company or person and get a direct, citation-backed answer from live web results. Includes SDK V2 examples, schemas, and cost.

Ask a research question about a company or person and get a direct, citation-backed answer from live web results.

> [!NOTE]
>
> Tool ID: `exa_answer`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'exa_answer',
  {
    "query": "software companies hiring engineers"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute exa_answer --input '{
  "query": "software companies hiring engineers"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "answer": "example",
    "citations": [
      {
        "id": "id_123",
        "url": "https://example.com",
        "title": "VP of Engineering"
      }
    ]
  }
}
```

Use `deepline describe exa_answer --json` for the latest machine-readable contract.

## Input reference

Exa answer input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.query` | `string` | Yes | — | Question to answer using web results. |
| `payload.stream` | `boolean` | No | — | Stream tokens as they are generated. |
| `payload.text` | `boolean` | No | — | Include full source text in citations. |
| `payload.outputSchema` | `any` | No | — | JSON Schema to return a structured answer. Supports arbitrary user-defined schema shape. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Exa answer input.",
    "properties": {
      "query": {
        "type": "string",
        "description": "Question to answer using web results."
      },
      "stream": {
        "type": "boolean",
        "description": "Stream tokens as they are generated."
      },
      "text": {
        "type": "boolean",
        "description": "Include full source text in citations."
      },
      "outputSchema": {
        "type": "any",
        "description": "JSON Schema to return a structured answer. Supports arbitrary user-defined schema shape."
      }
    },
    "required": [
      "query"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Exa answer result.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.answer` | `string \| record` | No | — | — |
| `result.data.citations` | `array` | No | — | — |
| `result.data.citations[].id` | `string` | No | — | — |
| `result.data.citations[].url` | `string` | No | — | — |
| `result.data.citations[].title` | `string` | No | — | — |
| `result.data.citations[].text` | `string` | No | — | — |
| `result.data.citations[].publishedDate` | `string` | No | — | — |
| `result.data.citations[].author` | `string \| unknown` | No | — | — |
| `result.data.citations[].score` | `number` | No | — | — |
| `result.data.citations[].highlights` | `array` | No | — | — |
| `result.data.citations[].highlightScores` | `array` | No | — | — |
| `result.data.citations[].summary` | `string \| record` | No | — | — |
| `result.data.citations[].entities` | `array` | No | — | — |
| `result.data.citations[].entities[].id` | `string` | No | — | — |
| `result.data.citations[].entities[].type` | `"company" \| "person"` | No | — | Allowed: `company`, `person`. |
| `result.data.citations[].entities[].version` | `number` | No | — | — |
| `result.data.citations[].entities[].properties` | `record` | No | — | — |
| `result.data.citations[].extras` | `record` | No | — | — |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Exa answer result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ]
          },
          "citations": {
            "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
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0.07` per pricing unit.

## Related documentation

* [Exa provider guide](https://deepline.com/docs/providers/exa/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.