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') |
响应字段说明
/v1/cite/search响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.total_found | integer | 本页论文数量。 |
data.citation_count | integer | 生成的参考文献条目数。 |
data.reference_list[] | string[] | 默认格式的带序号参考文献。 |
data.url_list[] | string[] | 与论文顺序对应的 PDF 或来源 URL。 |
data.papers[] | object[] | 论文及引文格式详情。 |
data.papers[].index / title | integer / string | 全局序号和论文标题。 |
data.papers[].source_url / pdf_url | string | null | 来源页面和 PDF 地址。 |
data.papers[].scholar_id / cited_by | string | Scholar 标识和引用量文本。 |
data.papers[].citations | object | MLA、APA、Chicago、Harvard、Vancouver 等格式文本。 |
data.citation_details[] | object[] | 每篇论文的全部可用引文格式。 |
data.page / has_more / index_offset | integer / boolean / integer | 当前页、是否有下一页和全局序号偏移。 |
data.note | string | 结果使用和下一页提示。 |
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
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()