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 failureimport 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
| Name | Type | Description |
|---|---|---|
qquery · required | string | The search, as typed into Google (operators work). Example: coffee. |
glquery | string | Country to search from, default us. Example: gb. |
hlquery | string | Interface language, default en. Example: de. |
pagequery | integer | Page, from 1. |
Status codes
| Status | Meaning |
|---|---|
200 | The papers. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Google Maps place matches that reference. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Google 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.