Page contents
exa/contentsFetch and clean the content of a set of pages.
- call
- $0.002
- Exa
- 5 min
Overview
Given up to a hundred URLs, or document ids from an earlier search, returns readable extracted text rather than raw markup, served from cache or crawled fresh depending on the age tolerance given. Beyond text it can return query-relevant highlights with relevance scores, a written summary, and extras such as outbound links, images, and code blocks. A per-URL status array reports which pages were served from cache, which were crawled, and which failed, so a partial failure stays visible.
One entry per URL with its text, highlights, and summary, plus a status list saying how each page was obtained.
Input
These go in the input object of the run request.
| Field | Type | Required | Description |
|---|---|---|---|
| urls | array | Yes | The pages to fetch, up to 100. |
| text | object | No | Return extracted page text; the object form caps its length. |
| highlights | object | No | Return the passages most relevant to a query. |
| summary | object | No | Return a written summary of each page. |
| maxAgeHours | integer | No | How stale a cached copy may be; 0 forces a fresh crawl. |
Requests up to 1 MB.
Example
A call that works, with your own key.
curl https://gateway.agentsky.dev/v1/run \
-H "authorization: Bearer $AGENTSKY_API_KEY" \
-H "content-type: application/json" \
-d '{"provider":"exa","endpoint":"contents","input":{"urls":["https://example.com"],"text":{"maxCharacters":2000},"maxAgeHours":24}}'Pricing
$0.002 per call on the default plan. Every run carries its price in the response.
