为一组 URL 提取完整页面内容。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/contents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"https://example.com/article"
],
"text": true,
"highlights": true,
"summary": true,
"subpages": 123
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/contents"
payload = {
"ids": ["https://example.com/article"],
"text": True,
"highlights": True,
"summary": True,
"subpages": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['https://example.com/article'],
text: true,
highlights: true,
summary: true,
subpages: 123
})
};
fetch('https://api.aisa.one/apis/v1/exa/contents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/exa/contents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'https://example.com/article'
],
'text' => true,
'highlights' => true,
'summary' => true,
'subpages' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/contents"
payload := strings.NewReader("{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/exa/contents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/contents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"publishedDate": "<string>",
"author": "<string>",
"id": "<string>",
"text": "<string>",
"highlights": [
"<string>"
],
"summary": "<string>"
}
]
}搜索 API
Exa Contents
为一组 URL 提取完整页面文本、摘要和元数据。
POST
https://api.aisa.one/apis/v1
/
exa
/
contents
为一组 URL 提取完整页面内容。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/contents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"https://example.com/article"
],
"text": true,
"highlights": true,
"summary": true,
"subpages": 123
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/contents"
payload = {
"ids": ["https://example.com/article"],
"text": True,
"highlights": True,
"summary": True,
"subpages": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['https://example.com/article'],
text: true,
highlights: true,
summary: true,
subpages: 123
})
};
fetch('https://api.aisa.one/apis/v1/exa/contents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/exa/contents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'https://example.com/article'
],
'text' => true,
'highlights' => true,
'summary' => true,
'subpages' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/contents"
payload := strings.NewReader("{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/exa/contents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/contents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"https://example.com/article\"\n ],\n \"text\": true,\n \"highlights\": true,\n \"summary\": true,\n \"subpages\": 123\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"publishedDate": "<string>",
"author": "<string>",
"id": "<string>",
"text": "<string>",
"highlights": [
"<string>"
],
"summary": "<string>"
}
]
}获取
ids 中传入的一组 URL(或 Exa 结果 id)的完整页面内容。用 text(完整页面正文)、highlights(相关片段)和 summary(AI 生成的摘要)选择返回内容,并用 subpages 一并拉取链接的子页面。
优先返回缓存的即时结果;livecrawl 控制新鲜度——always 强制实时抓取,fallback 仅在缓存未命中时实时抓取,never 只返回缓存内容。每次成功请求固定计费 $0.08;上游 4xx 响应不计费。如需先找到这些 URL,请从 post_exa-search 开始。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
⌘I