谷歌学术 API
实时获取来自 Google Scholar 的学术论文检索结果。设置 engine=google_scholar,并在 q 中传入主题或论文标题,即可获得包含作者、引用数和 PDF 链接的结构化出版物列表。
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=google_scholar&api_key=YOUR_API_KEY
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | 您的 SERP API 密钥 |
engine | string | yes | 必须为 google_scholar |
q | string | yes | 搜索查询 |
lr | string | no | 语言限制,格式为 lang_xx |
hl | string | no | 界面语言代码 |
start | int | no | 用于分页的结果偏移量 |
num | int | no | 每页结果数量 |
as_vis | int | no | 1 表示排除引用,0 表示包含引用 |
safe | string | no | active 或 off |
cites | string | no | 文章唯一 ID,用于触发被引用搜索 |
as_ylo | int | no | 纳入结果的最早年份 |
as_yhi | int | no | 纳入结果的最晚年份 |
scisbd | int | no | 1 表示仅摘要,0 表示所有结果 |
Example request
Section titled “Example request”curl "https://serp.shifter.io/v1?engine=google_scholar&api_key=YOUR_API_KEY&q=python"import requests
params = { "engine": "google_scholar", "api_key": "YOUR_API_KEY", "q": "python",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google_scholar', api_key: 'YOUR_API_KEY', q: 'python',});const data = await (await fetch(url)).json();Example response
Section titled “Example response”{ "search_parameters": { "engine": "google_scholar", "q": "python" }, "organic_results": [ { "position": 1, "title": "Python for data analysis", "result_id": "FDc6HiktlqEJ", "link": "https://example.com/paper.pdf", "snippet": "This book is concerned with the nuts and bolts of manipulating...", "publication_info": { "summary": "W McKinney - 2012 - oreilly.com" }, "inline_links": { "cited_by": { "total": 12000, "cites_id": "11234567" } } } ]}