Loading...
Loading...
Call Exa Contents directly with cURL or raw HTTP. Use when an agent already has URLs and needs POST /contents without an SDK for extracted text, highlights, summaries, links, image links, subpages, freshness-controlled crawling, or per-URL status handling.
npx skill4agent add exa-labs/agent-skills exa-contentsRequires API key: Get one at https://dashboard.exa.ai/api-keysHeader:x-api-key: $EXA_API_KEY
POST https://api.exa.ai/contentshighlightstextsummarycurl -sS -X POST "https://api.exa.ai/contents" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"urls": ["https://example.com"],
"text": true
}'curl -sS -X POST "https://api.exa.ai/contents" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"urls": ["https://arxiv.org/abs/2307.06435"],
"highlights": {
"query": "methodology and results"
},
"maxAgeHours": 24,
"livecrawlTimeout": 12000
}'POST https://api.exa.ai/contentsx-api-key: <API_KEY>Authorization: Bearer <API_KEY>x-api-keyPOST /search| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string[] | Yes | - | URLs to extract content from. Use this for known URLs. |
| boolean or object | No | - | Return full page text as markdown. Object form supports |
| boolean or object | No | - | Return key excerpts. Prefer |
| boolean or object | No | - | Return per-page LLM summaries. Use when the caller wants Exa-side compression or structured extraction. |
| integer | No | - | Freshness control. |
| integer | No | | Timeout for live crawling in milliseconds. Use |
| integer | No | | Number of linked subpages to crawl from each URL. |
| string or string[] | No | - | Terms used to prioritize which subpages matter, such as |
| integer | No | | Number of links to extract from each page. |
| integer | No | | Number of image URLs to extract from each page. |
| string | No | - | Enterprise-only compliance mode, such as |
| Parameter | Type | Default | Description |
|---|---|---|---|
| integer | - | Character limit for returned text. Use this instead of |
| boolean | | Preserve HTML tags in output. |
| string | | |
| string[] | - | Only include selected sections: |
| string[] | - | Exclude selected sections from the same section list. |
highlights: true| Parameter | Type | Default | Description |
|---|---|---|---|
| string | - | Custom query guiding which excerpts are returned. |
| integer | - | Cap highlight characters per URL. Omit unless the caller has a strict budget. |
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | - | Custom query for the summary. |
| object | - | JSON Schema for structured per-page summaries. |
/contentstexthighlightssummary| Mode | Best for | Notes |
|---|---|---|
| Deep analysis and broad page context | Use |
| Agent workflows and factual lookups | Most token-efficient default. Excerpts are grounded in the source page. |
| Compression or structured per-page extraction | Adds Exa-side synthesis per page. |
maxAgeHours| Value | Behavior |
|---|---|
| omitted | Use default cache-first behavior with crawl fallback when needed. |
| positive integer | Use cache if it is less than N hours old, otherwise live crawl. |
| Always live crawl. Highest freshness, higher latency. |
| Cache only. Fastest, but fails if no cached content exists. |
livecrawlTimeoutsubpagessubpageTargetcurl -sS -X POST "https://api.exa.ai/contents" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"urls": ["https://docs.example.com"],
"text": {
"maxCharacters": 5000
},
"subpages": 10,
"subpageTarget": ["api", "reference", "guide"],
"extras": {
"links": 10,
"imageLinks": 5
}
}'subpages510statusescurl -sS -X POST "https://api.exa.ai/contents" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"urls": ["https://example.com", "https://failed-url.example.com"],
"highlights": true
}' | jq '{results, statuses}'| Field | Type | Description |
|---|---|---|
| string | Unique request identifier. |
| array | Extracted content result objects. |
| string | Page title. |
| string | Page URL. |
| string or null | Estimated publication date when available. |
| string or null | Author when available. |
| string | Returned when |
| string[] | Returned when |
| number[] | Similarity scores for highlights. |
| string | Returned when |
| array | Nested result objects from subpage crawling. |
| string[] | Extracted links when requested. |
| array | Per-URL success or error states. Always inspect this field. |
| string | Requested URL. |
| string | |
| string | Error type for failed URLs. |
| integer or null | HTTP code associated with a per-URL failure. |
| number | Total request cost when returned. |
CRAWL_NOT_FOUNDCRAWL_TIMEOUTCRAWL_LIVECRAWL_TIMEOUTSOURCE_NOT_AVAILABLEUNSUPPORTED_URLCRAWL_UNKNOWN_ERRORtexthighlightssummary/contentscontents/searchstatusesstream: true/contentstokensNumtext.maxCharactersuseAutopromptnumSentenceshighlightsPerUrllivecrawlmaxAgeHourslivecrawlTimeoutsubpageTargetsubpageshighlightstextsummary