执行神经语义网页搜索。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "latest evaluation frameworks for AI agents",
"type": "auto",
"numResults": 10,
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"startPublishedDate": "2023-11-07T05:31:56Z",
"endPublishedDate": "2023-11-07T05:31:56Z",
"contents": {
"text": true,
"highlights": true,
"summary": true
},
"outputSchema": {},
"systemPrompt": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/search"
payload = {
"query": "latest evaluation frameworks for AI agents",
"type": "auto",
"numResults": 10,
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"startPublishedDate": "2023-11-07T05:31:56Z",
"endPublishedDate": "2023-11-07T05:31:56Z",
"contents": {
"text": True,
"highlights": True,
"summary": True
},
"outputSchema": {},
"systemPrompt": "<string>"
}
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({
query: 'latest evaluation frameworks for AI agents',
type: 'auto',
numResults: 10,
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
startPublishedDate: '2023-11-07T05:31:56Z',
endPublishedDate: '2023-11-07T05:31:56Z',
contents: {text: true, highlights: true, summary: true},
outputSchema: {},
systemPrompt: '<string>'
})
};
fetch('https://api.aisa.one/apis/v1/exa/search', 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/search",
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([
'query' => 'latest evaluation frameworks for AI agents',
'type' => 'auto',
'numResults' => 10,
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'startPublishedDate' => '2023-11-07T05:31:56Z',
'endPublishedDate' => '2023-11-07T05:31:56Z',
'contents' => [
'text' => true,
'highlights' => true,
'summary' => true
],
'outputSchema' => [
],
'systemPrompt' => '<string>'
]),
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/search"
payload := strings.NewReader("{\n \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/search")
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 \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"publishedDate": "<string>",
"author": "<string>",
"id": "<string>"
}
],
"output": "<unknown>",
"costDollars": "<unknown>"
}搜索 API
Exa Search
用自然语言查询执行神经语义网页搜索,返回最相关的结果。
POST
https://api.aisa.one/apis/v1
/
exa
/
search
执行神经语义网页搜索。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "latest evaluation frameworks for AI agents",
"type": "auto",
"numResults": 10,
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"startPublishedDate": "2023-11-07T05:31:56Z",
"endPublishedDate": "2023-11-07T05:31:56Z",
"contents": {
"text": true,
"highlights": true,
"summary": true
},
"outputSchema": {},
"systemPrompt": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/search"
payload = {
"query": "latest evaluation frameworks for AI agents",
"type": "auto",
"numResults": 10,
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"startPublishedDate": "2023-11-07T05:31:56Z",
"endPublishedDate": "2023-11-07T05:31:56Z",
"contents": {
"text": True,
"highlights": True,
"summary": True
},
"outputSchema": {},
"systemPrompt": "<string>"
}
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({
query: 'latest evaluation frameworks for AI agents',
type: 'auto',
numResults: 10,
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
startPublishedDate: '2023-11-07T05:31:56Z',
endPublishedDate: '2023-11-07T05:31:56Z',
contents: {text: true, highlights: true, summary: true},
outputSchema: {},
systemPrompt: '<string>'
})
};
fetch('https://api.aisa.one/apis/v1/exa/search', 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/search",
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([
'query' => 'latest evaluation frameworks for AI agents',
'type' => 'auto',
'numResults' => 10,
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'startPublishedDate' => '2023-11-07T05:31:56Z',
'endPublishedDate' => '2023-11-07T05:31:56Z',
'contents' => [
'text' => true,
'highlights' => true,
'summary' => true
],
'outputSchema' => [
],
'systemPrompt' => '<string>'
]),
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/search"
payload := strings.NewReader("{\n \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/search")
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 \"query\": \"latest evaluation frameworks for AI agents\",\n \"type\": \"auto\",\n \"numResults\": 10,\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"startPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"endPublishedDate\": \"2023-11-07T05:31:56Z\",\n \"contents\": {\n \"text\": true,\n \"highlights\": true,\n \"summary\": true\n },\n \"outputSchema\": {},\n \"systemPrompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"publishedDate": "<string>",
"author": "<string>",
"id": "<string>"
}
],
"output": "<unknown>",
"costDollars": "<unknown>"
}用自然语言
query 搜索公开网页,返回最相关的结果,按语义相关性而非关键词排序。可用 type(从 fast 到 deep-reasoning)调节检索方式,用 numResults(1–100,默认 10)限制结果数量,并用 category、includeDomains/excludeDomains 或发布日期区间收窄范围。
设置 contents 可在每条结果中内联返回页面 text、highlights 或 AI summary;提供 outputSchema(可搭配 systemPrompt)可让 Exa 合成结构化的 output。每次成功请求固定计费 $0.08;上游 4xx 响应不计费。如果你已经知道确切要看哪些页面,post_exa-contents 可以直接获取它们的全文。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
自然语言搜索查询。
示例:
"latest evaluation frameworks for AI agents"
搜索模式。auto 让 Exa 自行选择;deep 模式以更高延迟换取更高质量的检索。
可用选项:
auto, fast, instant, deep-lite, deep, deep-reasoning 返回的结果数量。
必填范围:
1 <= x <= 100关于优先抓取哪类页面的可选提示。
可用选项:
company, research paper, news, personal site, financial report, people 只返回来自这些域名的结果。
排除来自这些域名的结果。
仅返回在该 ISO 8601 日期当天或之后发布的结果。
仅返回在该 ISO 8601 日期当天或之前发布的结果。
随每条结果一并返回的内容选项。
Show child attributes
Show child attributes
用于从结果中合成结构化输出的 JSON Schema。
用于引导结构化输出如何生成的指令。
⌘I