100 free credits. No credit card required. Get a key

Google Scholar API

Google Scholar results for a query: title, link, authors and venue, snippet, year, cited-by count and PDF link.

GET /v1/google/search/scholarBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/google/search/scholar?q=transformer%20attention",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"searchParameters": {
"q": "transformer attention",
"type": "scholar",
"engine": "google",
"gl": "us",
"hl": "en",
"num": 10,
"page": 1
},
"organic": [
{
"title": "Analyzing the structure of attention in a transformer language model",
"link": "https://aclanthology.org/W19-4808/",
"publicationInfo": "J Vig, Y Belinkov - Proceedings of the 2019 ACL workshop …, 2019 - aclanthology.org",
"snippet": "… In this section, we present three visualizations of attention in the Transformer model: the attentionhead view, the mo…",
"year": 2019,
"citedBy": 660,
"pdfUrl": "https://aclanthology.org/W19-4808.pdf",
"id": "eTwV8Gym-v8J",
"position": 1
},
{
"title": "Attentionviz: A global view of transformer attention",
"link": "https://ieeexplore.ieee.org/abstract/document/10297591/",
"publicationInfo": "C Yeh, Y Chen, A Wu, C Chen, F Viégas… - … on Visualization and …, 2023 - ieeexplore.ieee.org",
"snippet": "… comprehending how transformers operate. (We include a brief introduction to transformers in Sec. 2.) The target of our…",
"year": 2023,
"citedBy": 211,
"pdfUrl": "https://arxiv.org/pdf/2305.03210",
"id": "mGmdDY3CZ8QJ",
"position": 2
},
"… 8 more"
]
}

Parameters

NameTypeDescription
qquery · requiredstringThe search, as typed into Google (operators work). Example: coffee.
glquerystringCountry to search from, default us. Example: gb.
hlquerystringInterface language, default en. Example: de.
pagequeryintegerPage, from 1.
Status codes
StatusMeaning
200The papers.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No Google Maps place matches that reference.
429Too many requests. Wait for Retry-After seconds.
503Google is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Paging?

page, 10 results each.

Google is a trademark of Google LLC. We are not affiliated with or endorsed by Google.