idsarraybắt buộc
The URLs (or Exa result ids) to fetch contents for.
https://api.sandbase.ai/v1/api/exa/contentsExtract clean page contents for a list of URLs: full text, highlights, AI summaries and metadata, from cache or with a live crawl.
{
"costDollars": {
"contents": {
"text": 0.001
},
"total": 0.001
},
"requestId": "ec080d1037c5ec88affbcae836c0df5d",
"results": [
{
"author": null,
"favicon": "https://adk.dev/assets/agent-development-kit.png",
"id": "https://adk.dev/",
"image": "https://adk.dev/assets/adk-social-card.png",
"text": "Agent Development Kit (ADK) - Agent Development Kit (ADK) Agent Development Kit (ADK)\n\n# Build production agents, not prototypes.\n\nADK is the open-source agent development framework that lets you build, debug, and deploy reliable AI agents at enterprise scale. Available in Python, TypeScript, Go, Java, and Kotlin.\n\nPython\n\nTypeScript\n\nGo\n\nJava\n\nKotlin\n\n```\nfrom google.adk import Agent\nfrom google.adk.tools import google_search\n\nagent = Agent(\n name=\"researcher\",\n model=\"gemini-flash-latest\",\n instruction=\"You help users research topics thoroughly.\",\n tools=[google_search],\n)\n```\n\n`…",
"title": "Agent Development Kit (ADK) - Agent Development Kit (ADK)",
"url": "https://adk.dev/"
}
],
"searchTime": 8.82960500009358,
"statuses": [
{
"id": "https://adk.dev/",
"source": "cached",
"status": "success"
}
]
}Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
Fetch the content of web pages by URL with Exa: full text, highlighted snippets most relevant to a query, or an AI summary, plus title, author, publish date and image. Pages are served from Exa's cache or crawled live.
highlights.curl -X POST "https://api.sandbase.ai/v1/api/exa/contents" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids": ["https://developers.openai.com/codex"], "highlights": true}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | The URLs (or Exa result ids) to fetch contents for. |
highlights | boolean | No | Return highlighted relevant snippets. |
livecrawl | string | No | Freshness policy: always live-crawl, fall back to live crawl on cache miss, or never live-crawl. |
subpages | integer | No | Number of linked subpages to also fetch. |
summary | boolean | No | Return an AI-generated summary of the page. |
text | boolean | No | Return the full page text. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"requestId": "5b59ba53e260d94b59baf3c1436137f1",
"results": [
{
"author": null,
"highlights": [
"ChatGPT | ChatGPT Learn\n\n### Suggested\n\nresponses createreasoning_effortrealtime…"
],
"id": "https://developers.openai.com/codex",
"image": "https://learn.chatgpt.com/og/docs.png",
"title": "ChatGPT | ChatGPT Learn",
"url": "https://developers.openai.com/codex"
}
],
"searchTime": 33.52916099992581,
"statuses": [
{
"id": "https://developers.openai.com/codex",
"source": "cached",
"status": "success"
}
]
}
| Field | Meaning |
|---|---|
results[] | One entry per URL: url, title, author, publishedDate, image, and text, highlights or summary as requested. |
statuses[] | Per-URL status: success or an error, and source (cached or live). |
searchTime | Time spent in milliseconds. |
ids. Use livecrawl to force a fresh crawl of pages that change often.statuses with an error.$0.0045 per successful call. Failed calls, including lookups whose target does not exist, are not charged.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/exa/contents" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"https://static.sandbase.ai/examples/a0ad9eef-966a-46c6-8f69-4c42f972fe58/input/31c6cd46-ab5b-48a4-97da-a0a5d9b01220.bin"
],
"text": true
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
idsarraybắt buộcThe URLs (or Exa result ids) to fetch contents for.
textbooleanReturn the full page text.
highlightsbooleanReturn highlighted relevant snippets.
summarybooleanReturn an AI-generated summary of the page.
subpagesintegerNumber of linked subpages to also fetch.
livecrawlstringFreshness policy: always live-crawl, fall back to live crawl on cache miss, or never live-crawl.
Giá trị có thể dùng: always, fallback, never
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
{
"costDollars": {
"contents": {
"text": 0.001
},
"total": 0.001
},
"requestId": "ec080d1037c5ec88affbcae836c0df5d",
"results": [
{
"author": null,
"favicon": "https://adk.dev/assets/agent-development-kit.png",
"id": "https://adk.dev/",
"image": "https://adk.dev/assets/adk-social-card.png",
"text": "Agent Development Kit (ADK) - Agent Development Kit (ADK) Agent Development Kit (ADK)\n\n# Build production agents, not prototypes.\n\nADK is the open-source agent development framework that lets you build, debug, and deploy reliable AI agents at enterprise scale. Available in Python, TypeScript, Go, Java, and Kotlin.\n\nPython\n\nTypeScript\n\nGo\n\nJava\n\nKotlin\n\n```\nfrom google.adk import Agent\nfrom google.adk.tools import google_search\n\nagent = Agent(\n name=\"researcher\",\n model=\"gemini-flash-latest\",\n instruction=\"You help users research topics thoroughly.\",\n tools=[google_search],\n)\n```\n\n`…",
"title": "Agent Development Kit (ADK) - Agent Development Kit (ADK)",
"url": "https://adk.dev/"
}
],
"searchTime": 8.82960500009358,
"statuses": [
{
"id": "https://adk.dev/",
"source": "cached",
"status": "success"
}
]
}Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Exa ContentsAPI này Exa | $0.0045 mỗi lần gọi | JSON |
Exa | $0.0075 mỗi lần gọi | JSON |
Exa | $0.0105 mỗi lần gọi | JSON |
Hướng dẫn:Exa alternatives: compare Tavily and Firecrawl searchExa vs Tavily vs Firecrawl for AI agents
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/exa/contents với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.0045 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: ids (array). Tùy chọn: text (boolean), highlights (boolean), summary (boolean), subpages (integer) và livecrawl (một trong số always, fallback, never). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Exa Contents chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Exa.