> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Answer Question

- Component: `appmixer.ai.exa.AnswerQuestion`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.ai.exa 1.0.2](https://connectors.appmixer.com/connector/appmixer.ai.exa/1.0.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.ai.exa/1.0.2/component/appmixer.ai.exa.AnswerQuestion>

Ask Exa a question and get a direct AI generated answer grounded in live web sources, together with the pages it cited.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Question (`query`) | textarea | The question to answer, e.g. `What is the latest valuation of SpaceX?`. |
| Include Citation Text (`includeText`) | toggle | Also return the full page text of every cited source. Costs extra Exa credits per page. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Request ID (`requestId`) | string | - |
| Answer (`answer`) | string | - |
| Citations (`citations`) | array | - |
| Citations Count (`citationsCount`) | integer | - |
| Cost (USD) (`costDollars`) | number | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.ai.exa.AnswerQuestion",
  "label": "Answer Question",
  "description": "Ask Exa a question and get a direct AI generated answer grounded in live web sources, together with the pages it cited.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:ai:exa"
  },
  "quota": {
    "manager": "appmixer:ai:exa",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "includeText": {
            "type": "boolean"
          }
        },
        "required": [
          "query"
        ]
      },
      "inspector": {
        "inputs": {
          "query": {
            "type": "textarea",
            "index": 1,
            "label": "Question",
            "tooltip": "The question to answer, e.g. <code>What is the latest valuation of SpaceX?</code>."
          },
          "includeText": {
            "type": "toggle",
            "index": 2,
            "label": "Include Citation Text",
            "tooltip": "Also return the full page text of every cited source. Costs extra Exa credits per page."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "title": "Request ID",
            "example": "0f7bd4cefce10e519f7408d9a79a9788"
          },
          "answer": {
            "type": "string",
            "title": "Answer",
            "example": "Exa is a web search API designed for AI agents and applications."
          },
          "citations": {
            "type": "array",
            "title": "Citations",
            "example": [
              {
                "id": "https://exa.ai/about",
                "title": "About Exa",
                "url": "https://exa.ai/about"
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Citation ID",
                  "example": "https://exa.ai/about"
                },
                "title": {
                  "type": "string",
                  "title": "Title",
                  "example": "About Exa"
                },
                "url": {
                  "type": "string",
                  "title": "URL",
                  "example": "https://exa.ai/about"
                },
                "publishedDate": {
                  "type": "string",
                  "title": "Published Date",
                  "example": "2024-11-08T00:00:00.000Z"
                },
                "author": {
                  "type": "string",
                  "title": "Author",
                  "example": "Jane Doe"
                },
                "image": {
                  "type": "string",
                  "title": "Image URL",
                  "example": "https://exa.ai/og-image.png"
                },
                "favicon": {
                  "type": "string",
                  "title": "Favicon URL",
                  "example": "https://exa.ai/favicon.ico"
                },
                "text": {
                  "type": "string",
                  "title": "Page Text",
                  "example": "Exa is a search engine built for AI."
                }
              }
            }
          },
          "citationsCount": {
            "type": "integer",
            "title": "Citations Count",
            "example": 5
          },
          "costDollars": {
            "type": "number",
            "title": "Cost (USD)",
            "example": 0.005
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
