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

# Exa Contents

This document describes the Exa passthrough endpoints exposed by the platform gateway. It is based on Exa's Search, Get Contents, and Answer APIs, with platform route prefixes applied.

Base URL example: `https://api.novita.ai`

Retrieve page content, summaries, metadata, and fetch statuses for URLs or Exa document IDs.

## Request Headers

All endpoints require platform API authentication.

<ParamField header="Content-Type" type="string" required={true}>
  Use `application/json`.
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Platform API key, formatted as `Bearer <api_key>`.
</ParamField>

## Request Body

<ParamField body="urls" type="string[]" required={true}>
  URLs to retrieve. This field is also backwards compatible with values previously supplied through `ids`. Range is `1` to `100` entries; each URL may be up to 2048 characters.
</ParamField>

<ParamField body="ids" type="string[]" required={false}>
  Exa document IDs to retrieve. Range is `1` to `100` entries; each ID may be up to 2048 characters.
</ParamField>

<ParamField body="compliance" type="string" required={false}>
  Enterprise compliance mode, such as `hipaa`.
</ParamField>

<ParamField body="text" type="boolean | object" required={false}>
  Text extraction options. See [Contents Text Options](#contents-text-options). Default is `false`.
</ParamField>

<ParamField body="highlights" type="boolean | object" required={false}>
  Highlight extraction options. See [Contents Highlight Options](#contents-highlight-options). Default is `false`.
</ParamField>

<ParamField body="summary" type="object" required={false}>
  Summary generation options. See [Contents Summary Options](#contents-summary-options).
</ParamField>

<ParamField body="extras" type="object" required={false}>
  Extra outputs to return from each page. See [Contents Extras Options](#contents-extras-options).
</ParamField>

<ParamField body="livecrawlTimeout" type="integer" required={false}>
  Live crawl timeout in milliseconds. Range is greater than `0` and up to `90000`; default is `10000`.
</ParamField>

<ParamField body="maxAgeHours" type="integer" required={false}>
  Maximum cache age in hours. Use `0` for fresh content and `-1` to always use cache. Range is `-1` to `720`.
</ParamField>

<ParamField body="subpages" type="integer" required={false}>
  Number of subpages to crawl. Range is `0` to `100`; default is `0`.
</ParamField>

<ParamField body="subpageTarget" type="string | string[]" required={false}>
  Term or terms used to find targeted subpages. String values are limited to 100 characters.
</ParamField>

### Contents Text Options

<ParamField body="maxCharacters" type="integer" required={false}>
  Maximum number of text characters to return. Range is `1` to `10000`.
</ParamField>

<ParamField body="includeHtmlTags" type="boolean" required={false}>
  Include lightweight HTML tags instead of plain text.
</ParamField>

<ParamField body="verbosity" type="string" required={false}>
  Requested text verbosity.
</ParamField>

<ParamField body="includeSections" type="string[]" required={false}>
  Semantic page sections to include.
</ParamField>

<ParamField body="excludeSections" type="string[]" required={false}>
  Semantic page sections to exclude.
</ParamField>

### Contents Highlight Options

<ParamField body="query" type="string" required={false}>
  Custom query used to select highlights.
</ParamField>

<ParamField body="maxCharacters" type="integer" required={false}>
  Maximum characters to return for highlights. Range is `1` to `10000`.
</ParamField>

### Contents Summary Options

<ParamField body="query" type="string" required={false}>
  Custom instruction for summary generation.
</ParamField>

<ParamField body="schema" type="object" required={false}>
  Optional JSON schema for structured summary output.
</ParamField>

### Contents Extras Options

<ParamField body="links" type="integer" required={false}>
  Number of links to return. Range is `0` to `1000`.
</ParamField>

<ParamField body="imageLinks" type="integer" required={false}>
  Number of image links to return. Range is `0` to `1000`.
</ParamField>

<ParamField body="richImageLinks" type="integer" required={false}>
  Number of rich image links to return. Range is `0` to `1000`.
</ParamField>

<ParamField body="richLinks" type="integer" required={false}>
  Number of rich links to return. Range is `0` to `1000`.
</ParamField>

<ParamField body="codeBlocks" type="integer" required={false}>
  Number of code blocks to return. Range is `0` to `1000`.
</ParamField>

## Request Example

```bash theme={"system"}
curl -X POST 'https://api.novita.ai/v3/exa/contents' \
  -H 'Authorization: Bearer <api_key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "urls": ["https://arxiv.org/abs/2307.06435"],
    "text": {
      "maxCharacters": 4000
    },
    "highlights": true,
    "summary": {
      "query": "Summarize the key points"
    },
    "extras": {
      "links": 10,
      "imageLinks": 5
    }
  }'
```

## Response

<ResponseField name="requestId" type="string" required={false}>
  Unique request identifier.
</ResponseField>

<ResponseField name="results" type="object[]" required={false}>
  Content results.
</ResponseField>

<ResponseField name="statuses" type="object[]" required={false}>
  Fetch status for each requested URL or document ID.
</ResponseField>

### Content Result Object

<ResponseField name="title" type="string" required={false}>
  Page title.
</ResponseField>

<ResponseField name="url" type="string" required={false}>
  Page URL.
</ResponseField>

<ResponseField name="publishedDate" type="string" required={false}>
  Published date when available.
</ResponseField>

<ResponseField name="author" type="string" required={false}>
  Author when available.
</ResponseField>

<ResponseField name="id" type="string" required={false}>
  Exa document ID.
</ResponseField>

<ResponseField name="image" type="string" required={false}>
  Associated image URL.
</ResponseField>

<ResponseField name="favicon" type="string" required={false}>
  Site favicon URL.
</ResponseField>

<ResponseField name="text" type="string" required={false}>
  Extracted text when requested.
</ResponseField>

<ResponseField name="highlights" type="string[]" required={false}>
  Highlight snippets when requested.
</ResponseField>

<ResponseField name="highlightScores" type="number[]" required={false}>
  Scores for returned highlights.
</ResponseField>

<ResponseField name="summary" type="string" required={false}>
  Generated summary when requested.
</ResponseField>

<ResponseField name="subpages" type="object[]" required={false}>
  Subpage results when requested. See [Contents Subpage Object](#contents-subpage-object).
</ResponseField>

<ResponseField name="extras" type="object" required={false}>
  Extra outputs when requested. See [Contents Response Extras Object](#contents-response-extras-object).
</ResponseField>

### Contents Subpage Object

<ResponseField name="title" type="string" required={false}>
  Subpage title.
</ResponseField>

<ResponseField name="url" type="string" required={false}>
  Subpage URL.
</ResponseField>

<ResponseField name="id" type="string" required={false}>
  Exa document ID when available.
</ResponseField>

<ResponseField name="text" type="string" required={false}>
  Extracted text when requested.
</ResponseField>

<ResponseField name="summary" type="string" required={false}>
  Generated summary when requested.
</ResponseField>

<ResponseField name="highlights" type="string[]" required={false}>
  Highlight snippets when requested.
</ResponseField>

### Contents Response Extras Object

<ResponseField name="links" type="string[] | object[]" required={false}>
  Links found on the page.
</ResponseField>

<ResponseField name="imageLinks" type="string[] | object[]" required={false}>
  Image links found on the page.
</ResponseField>

<ResponseField name="richImageLinks" type="object[]" required={false}>
  Image links with additional metadata.
</ResponseField>

<ResponseField name="richLinks" type="object[]" required={false}>
  Links with additional metadata.
</ResponseField>

<ResponseField name="codeBlocks" type="object[]" required={false}>
  Code blocks found on the page.
</ResponseField>

### Status Object

<ResponseField name="id" type="string" required={false}>
  Requested URL or document ID.
</ResponseField>

<ResponseField name="status" type="string" required={false}>
  Fetch status, such as `success` or `error`.
</ResponseField>

<ResponseField name="source" type="string" required={false}>
  Content source, such as `cached` or `crawled`.
</ResponseField>

<ResponseField name="error" type="object" required={false}>
  Error details when retrieval fails. See [Contents Error Detail Object](#contents-error-detail-object).
</ResponseField>

### Contents Error Detail Object

<ResponseField name="tag" type="string" required={false}>
  Error tag, such as `CRAWL_NOT_FOUND`.
</ResponseField>

<ResponseField name="httpStatusCode" type="integer | null" required={false}>
  HTTP-like status code, such as `404`.
</ResponseField>

## Errors

The platform may return standard HTTP errors before forwarding the request, and Exa may return upstream errors after forwarding.

<ResponseField name="400" type="status" required={false}>
  Invalid request body or unsupported parameter value.
</ResponseField>

<ResponseField name="401" type="status" required={false}>
  Missing or invalid API key.
</ResponseField>

<ResponseField name="403" type="status" required={false}>
  Access denied by platform or upstream provider.
</ResponseField>

<ResponseField name="404" type="status" required={false}>
  Route or requested resource not found.
</ResponseField>

<ResponseField name="429" type="status" required={false}>
  Rate limit exceeded.
</ResponseField>

<ResponseField name="500" type="status" required={false}>
  Internal server error.
</ResponseField>

<ResponseField name="502" type="status" required={false}>
  Upstream provider error.
</ResponseField>

<ResponseField name="503" type="status" required={false}>
  Service unavailable.
</ResponseField>

## Notes

* All request bodies are JSON.
* Extra Exa parameters not listed here may be passed through.
* Response shapes can vary depending on request options.
* This document intentionally omits billing-related fields.

## References

For more details, see the [Exa Contents API reference](https://exa.ai/docs/reference/get-contents).
