我正在研究一个具有文献搜索功能的研究出版物和合作项目。Google Scholar 似乎可以工作,因为它是一个开源工具,但是当我研究 Google Scholar 时,我找不到任何关于它有 API 的信息。
请让我知道是否有任何适用于 Google Scholar 的 API。
TIA。
我正在研究一个具有文献搜索功能的研究出版物和合作项目。Google Scholar 似乎可以工作,因为它是一个开源工具,但是当我研究 Google Scholar 时,我找不到任何关于它有 API 的信息。
请让我知道是否有任何适用于 Google Scholar 的 API。
TIA。
快速搜索显示其他人正在尝试实现此类 API,但 Google 没有提供。目前尚不清楚这是否合法,例如 ,如果需要,请参阅如何从 Google 获得使用 Google Scholar Data 的许可?.
没有官方的 Google Scholar API。有第三方解决方案,例如支持profile、author、cite结果但不支持有机结果的免费scholarly
Python 包,或者来自 SerpApi 的Google Scholar API,这是一个付费 API,具有支持organic、cite、profile、author结果的免费计划并绕过 SerpApi 后端的所有块。
scholarly
使用using方法解析配置文件结果的示例代码search_by_keyword
:
import json
from scholarly import scholarly
# will paginate to the next page by default
authors = scholarly.search_keyword("biology")
for author in authors:
print(json.dumps(author, indent=2))
# part of the output:
'''
{
"container_type": "Author",
"filled": [],
"source": "SEARCH_AUTHOR_SNIPPETS",
"scholar_id": "LXVfPc8AAAAJ",
"url_picture": "https://scholar.google.com/citations?view_op=medium_photo&user=LXVfPc8AAAAJ",
"name": "Eric Lander",
"affiliation": "Broad Institute",
"email_domain": "",
"interests": [
"Biology",
"Genomics",
"Genetics",
"Bioinformatics",
"Mathematics"
],
"citedby": 552013
}
... other author results
'''
使用来自 SerpApi 的Google Scholar Profile Results API解析有机结果的示例代码:
import json
from serpapi import GoogleScholarSearch
# search parameters
params = {
"api_key": "Your SerpApi API key",
"engine": "google_scholar_profiles",
"hl": "en", # language
"mauthors": "biology" # search query
}
search = GoogleScholarSearch(params)
results = search.get_dict()
# only first page results
for result in results["profiles"]:
print(json.dumps(result, indent=2))
# part of the output:
'''
{
"name": "Masatoshi Nei",
"link": "https://scholar.google.com/citations?hl=en&user=VxOmZDgAAAAJ",
"serpapi_link": "https://serpapi.com/search.json?author_id=VxOmZDgAAAAJ&engine=google_scholar_author&hl=en",
"author_id": "VxOmZDgAAAAJ",
"affiliations": "Laura Carnell Professor of Biology, Temple University",
"email": "Verified email at temple.edu",
"cited_by": 384074,
"interests": [
{
"title": "Evolution",
"serpapi_link": "https://serpapi.com/search.json?engine=google_scholar_profiles&hl=en&mauthors=label%3Aevolution",
"link": "https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=label:evolution"
},
{
"title": "Evolutionary biology",
"serpapi_link": "https://serpapi.com/search.json?engine=google_scholar_profiles&hl=en&mauthors=label%3Aevolutionary_biology",
"link": "https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=label:evolutionary_biology"
},
{
"title": "Molecular evolution",
"serpapi_link": "https://serpapi.com/search.json?engine=google_scholar_profiles&hl=en&mauthors=label%3Amolecular_evolution",
"link": "https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=label:molecular_evolution"
},
{
"title": "Population genetics",
"serpapi_link": "https://serpapi.com/search.json?engine=google_scholar_profiles&hl=en&mauthors=label%3Apopulation_genetics",
"link": "https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=label:population_genetics"
},
{
"title": "Phylogenetics",
"serpapi_link": "https://serpapi.com/search.json?engine=google_scholar_profiles&hl=en&mauthors=label%3Aphylogenetics",
"link": "https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=label:phylogenetics"
}
],
"thumbnail": "https://scholar.googleusercontent.com/citations?view_op=small_photo&user=VxOmZDgAAAAJ&citpid=3"
}
... other results
'''
使用我在 SerpApi 上的 Python博客文章有一个专门的 Scrape 历史 Google Scholar 结果,其中展示了如何将历史 2017-2021 Organic、Cite Google Scholar 结果抓取到 CSV、SQLite。
免责声明,我为 SeprApi 工作