curl --request POST \
--url https://api.aisa.one/apis/v1/querit/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"count": 123,
"chunksPerDoc": 1,
"highlights": true,
"needContent": false,
"filters": {
"sites": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
},
"timeRange": {
"date": "<string>"
},
"geo": {
"countries": {
"include": []
}
},
"languages": {
"include": []
}
}
}
'import requests
url = "https://api.aisa.one/apis/v1/querit/search"
payload = {
"query": "<string>",
"count": 123,
"chunksPerDoc": 1,
"highlights": True,
"needContent": False,
"filters": {
"sites": {
"include": ["<string>"],
"exclude": ["<string>"]
},
"timeRange": { "date": "<string>" },
"geo": { "countries": { "include": [] } },
"languages": { "include": [] }
}
}
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: '<string>',
count: 123,
chunksPerDoc: 1,
highlights: true,
needContent: false,
filters: {
sites: {include: ['<string>'], exclude: ['<string>']},
timeRange: {date: '<string>'},
geo: {countries: {include: []}},
languages: {include: []}
}
})
};
fetch('https://api.aisa.one/apis/v1/querit/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/querit/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' => '<string>',
'count' => 123,
'chunksPerDoc' => 1,
'highlights' => true,
'needContent' => false,
'filters' => [
'sites' => [
'include' => [
'<string>'
],
'exclude' => [
'<string>'
]
],
'timeRange' => [
'date' => '<string>'
],
'geo' => [
'countries' => [
'include' => [
]
]
],
'languages' => [
'include' => [
]
]
]
]),
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/querit/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\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/querit/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/querit/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\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"took": "<string>",
"error_code": 123,
"error_msg": "<string>",
"search_id": 123,
"query_context": {
"query": "<string>"
},
"results": {
"result": [
{}
]
}
}Search AI Data
Perform a search query using AI to retrieve relevant information based on the provided criteria.
curl --request POST \
--url https://api.aisa.one/apis/v1/querit/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"count": 123,
"chunksPerDoc": 1,
"highlights": true,
"needContent": false,
"filters": {
"sites": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
},
"timeRange": {
"date": "<string>"
},
"geo": {
"countries": {
"include": []
}
},
"languages": {
"include": []
}
}
}
'import requests
url = "https://api.aisa.one/apis/v1/querit/search"
payload = {
"query": "<string>",
"count": 123,
"chunksPerDoc": 1,
"highlights": True,
"needContent": False,
"filters": {
"sites": {
"include": ["<string>"],
"exclude": ["<string>"]
},
"timeRange": { "date": "<string>" },
"geo": { "countries": { "include": [] } },
"languages": { "include": [] }
}
}
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: '<string>',
count: 123,
chunksPerDoc: 1,
highlights: true,
needContent: false,
filters: {
sites: {include: ['<string>'], exclude: ['<string>']},
timeRange: {date: '<string>'},
geo: {countries: {include: []}},
languages: {include: []}
}
})
};
fetch('https://api.aisa.one/apis/v1/querit/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/querit/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' => '<string>',
'count' => 123,
'chunksPerDoc' => 1,
'highlights' => true,
'needContent' => false,
'filters' => [
'sites' => [
'include' => [
'<string>'
],
'exclude' => [
'<string>'
]
],
'timeRange' => [
'date' => '<string>'
],
'geo' => [
'countries' => [
'include' => [
]
]
],
'languages' => [
'include' => [
]
]
]
]),
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/querit/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\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/querit/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/querit/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\": \"<string>\",\n \"count\": 123,\n \"chunksPerDoc\": 1,\n \"highlights\": true,\n \"needContent\": false,\n \"filters\": {\n \"sites\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n },\n \"timeRange\": {\n \"date\": \"<string>\"\n },\n \"geo\": {\n \"countries\": {\n \"include\": []\n }\n },\n \"languages\": {\n \"include\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"took": "<string>",
"error_code": 123,
"error_msg": "<string>",
"search_id": 123,
"query_context": {
"query": "<string>"
},
"results": {
"result": [
{}
]
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
Top-level parameters: highlights object form: filters sub-object: timeRange.date syntax: d[n] / w[n] / m[n] / y[n]: last n days / weeks / months / years, e.g. d7, m3 YYYY-MM-DDtoYYYY-MM-DD: a range, e.g. 2022-04-01to2022-07-30; a single day uses the same to form geo.countries.include allowed values: argentina, australia, brazil, canada, colombia, france, germany, india, indonesia, japan, mexico, nigeria, philippines, south korea, spain, united kingdom, united states. languages.include allowed values: english, japanese, korean, german, french, spanish, portuguese. vertical allowed values: code, finance. Lowercase and strictly enumerated; omit the field for universal search.
Search term. Supports long natural-language descriptions
Maximum number of results returned. Default: server default (value unspecified).
Summary chunks per document. Free / PAYG support up to 1; Enterprise up to 3. Deprecated — still available, but migrate to highlights
Request relevant fragments from the body text. true extracts against the original query at the length the model judges best; the object form takes query and maxCharacters, see below
Whether to return body text. When true, body text lands in each result's sentence field (sentence array)
Filter conditions, see below
Show child attributes
Show child attributes
响应
Official response table. Fields on each results.result[] item: url, title, snippet, page_age (plaintext UTC+0 time), site_name, site_icon, sentence (string[], present only when needContent: true and body text is available), highlights (string[], present only when highlights is set on the request and body text is available). Every result field is optional. Some results in the same response may have no sentence or highlights. Treat a missing field as "body text unavailable," not as an error.
Server-side processing time
Error code, consistent with the HTTP status code; 200 on success
Error detail
Unique request identifier; give it to support when reporting an issue
Show child attributes
Show child attributes
Show child attributes
Show child attributes