Page contents

by Exa

exa/contents

Fetch and clean the content of a set of pages.

Billed per
call
Price
$0.002
Provider
Exa
Timeout
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.

FieldTypeRequiredDescription
urlsarrayYesThe pages to fetch, up to 100.
textobjectNoReturn extracted page text; the object form caps its length.
highlightsobjectNoReturn the passages most relevant to a query.
summaryobjectNoReturn a written summary of each page.
maxAgeHoursintegerNoHow 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.

Questions

Page contents — AgentSky