结合网页和学术结果的智能搜索
curl --request POST \
--url https://api.aisa.one/apis/v1/scholar/search/mixed \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/scholar/search/mixed"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/scholar/search/mixed', 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/scholar/search/mixed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/scholar/search/mixed"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/scholar/search/mixed")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/scholar/search/mixed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"results": [
{
"title": "<string>",
"link": "<string>",
"snippet": "<string>",
"authors": [
"<string>"
],
"number_of_citations": 1,
"relevance_score": 0.5
}
]
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}学术搜索 API
智能搜索
结合网页和学术结果的智能搜索
POST
https://api.aisa.one/apis/v1
/
scholar
/
search
/
mixed
结合网页和学术结果的智能搜索
curl --request POST \
--url https://api.aisa.one/apis/v1/scholar/search/mixed \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/scholar/search/mixed"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/scholar/search/mixed', 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/scholar/search/mixed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/scholar/search/mixed"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/scholar/search/mixed")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/scholar/search/mixed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"results": [
{
"title": "<string>",
"link": "<string>",
"snippet": "<string>",
"authors": [
"<string>"
],
"number_of_citations": 1,
"relevance_score": 0.5
}
]
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}{
"error": "<string>",
"code": 123,
"details": "<string>"
}运行可在一个响应中结合网络结果和学术结果的混合搜索。
最适合: 同时需要学术论文和更广泛网络背景的研究任务。
Scholar 搜索端点使用
POST,参数位于查询字符串中。请勿将 query 或 max_num_results 作为 JSON 或表单请求正文发送。示例
curl -X POST "https://api.aisa.one/apis/v1/scholar/search/mixed?query=self-correcting%20agent%20frameworks&max_num_results=5" \
-H "Authorization: Bearer ${AISA_API_KEY}"
响应
返回一个搜索id 和一个 results 数组。根据所选来源,结果对象可能包含网络字段、学术字段或同时包含两者。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
学术资料搜索查询
示例:
"machine learning"
返回的搜索结果最大数量,最多 100 条
必填范围:
1 <= x <= 100出版年份下限
必填范围:
1900 <= x <= 2030出版年份上限
必填范围:
1900 <= x <= 2030⌘I