Citation Search API
Search Google Scholar and retrieve authoritative citation formats (MLA, APA, Chicago, Harvard, Vancouver) for each result. Citations come directly from Google Scholar.
POST
/v1/cite/search引文检索
POST
/v1/cite/search两步流程:先搜索 Google Scholar 查找论文,再获取每篇论文的权威引用格式。每篇论文返回最多 5 种引用格式。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 必填 | 搜索关键词 |
results | integer | 可选 (默认: 10) | 每页结果数(最多 20,默认 10) |
page | integer | 可选 (默认: 0) | 页码(默认 0) |
country | string | 可选 (默认: us) | 国家过滤(默认 'us') |
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 必填 | 搜索关键词 |
results | integer | 可选 (默认: 10) | 每页结果数(最多 20) |
page | integer | 可选 (默认: 0) | 页码(从 0 开始) |
country | string | 可选 (默认: us) | 国家过滤(如 'us') |
响应
Response
{
"success": true,
"message": "Found 10 papers with citations",
"data": {
"total_found": 156000,
"citation_count": 10,
"page": 0,
"has_more": true,
"papers": [
{
"index": 1,
"title": "Attention Is All You Need",
"source_url": "https://proceedings.neurips.cc/...",
"cited_by": 120000,
"citations": {
"MLA": "Vaswani, Ashish, et al. \"Attention is all you need.\" NeurIPS 30 (2017).",
"APA": "Vaswani, A., Shazeer, N., ... (2017). Attention is all you need. NeurIPS, 30.",
"Chicago": "Vaswani, Ashish, et al. \"Attention is all you need.\" NeurIPS 30 (2017).",
"Harvard": "Vaswani, A., Shazeer, N., ... 2017. Attention is all you need. NeurIPS, 30.",
"Vancouver": "Vaswani A, Shazeer N, ... Attention is all you need. NeurIPS. 2017;30."
}
}
]
}
}示例
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.qinyanai.com"
# Search citations
response = requests.post(
f"{BASE_URL}/v1/cite/search",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"query": "attention is all you need",
"results": 5,
"page": 0,
"country": "us"
}
)
data = response.json()
for paper in data["data"]["papers"]:
print(f"Title: {paper['title']}")
print(f"APA: {paper['citations']['APA']}")
print()