Spaces:
Running
Running
Google Scholar API | |
build | |
754 examples, 0 failures | |
Our Google Scholar API allows you to scrape SERP results from a Google Scholar search query. The API is accessed through the following endpoint: /search?engine=google_scholar. A user may query the following: https://serpapi.com/search?engine=google_scholar utilizing a GET request. Head to the playground for a live and interactive demo. | |
API Parameters | |
Search Query | |
q | |
Required | |
Parameter defines the query you want to search. You can also use helpers in your query such as: author:, or source:. | |
Usage of cites parameter makes q optional. Usage of cites together with q triggers search within citing articles. | |
Usage of cluster together with q and cites parameters is prohibited. Use cluster parameter only. | |
Advanced Google Scholar Parameters | |
cites | |
Optional | |
Parameter defines unique ID for an article to trigger Cited By searches. Usage of cites will bring up a list of citing documents in Google Scholar. Example value: cites=1275980731835430123. Usage of cites and q parameters triggers search within citing articles. | |
as_ylo | |
Optional | |
Parameter defines the year from which you want the results to be included. (e.g. if you set as_ylo parameter to the year 2018, the results before that year will be omitted.). This parameter can be combined with the as_yhi parameter. | |
as_yhi | |
Optional | |
Parameter defines the year until which you want the results to be included. (e.g. if you set as_yhi parameter to the year 2018, the results after that year will be omitted.). This parameter can be combined with the as_ylo parameter. | |
scisbd | |
Optional | |
Parameter defines articles added in the last year, sorted by date. It can be set to 1 to include only abstracts, or 2 to include everything. The default value is 0 which means that the articles are sorted by relevance. | |
cluster | |
Optional | |
Parameter defines unique ID for an article to trigger All Versions searches. Example value: cluster=1275980731835430123. Usage of cluster together with q and cites parameters is prohibited. Use cluster parameter only. | |
Localization | |
hl | |
Optional | |
Parameter defines the language to use for the Google Scholar search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French). Head to the Google languages page for a full list of supported Google languages. | |
lr | |
Optional | |
Parameter defines one or multiple languages to limit the search to. It uses lang_{two-letter language code} to specify languages and | as a delimiter. (e.g., lang_fr|lang_de will only search French and German pages). Head to the Google lr languages for a full list of supported languages. | |
Pagination | |
start | |
Optional | |
Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.). | |
num | |
Optional | |
Parameter defines the maximum number of results to return, limited to 20. (e.g., 10 (default) returns 10 results, 20 returns 20 results). | |
Search Type | |
as_sdt | |
Optional | |
Parameter can be used either as a search type or a filter. | |
As a Filter (only works when searching articles): | |
0 - exclude patents (default). | |
7 - include patents. | |
As a Search Type: | |
4 - Select case law (US courts only). This will select all the State and Federal courts. | |
e.g. as_sdt=4 - Selects case law (all courts) | |
To select specific courts, see the full list of supported Google Scholar courts. | |
e.g. as_sdt=4,33,192 - 4 is the required value and should always be in the first position, 33 selects all New York courts and 192 selects Tax Court. | |
Values have to be separated by comma (,) | |
Advanced Filters | |
safe | |
Optional | |
Parameter defines the level of filtering for adult content. It can be set to active, or off (default). | |
filter | |
Optional | |
Parameter defines if the filters for 'Similar Results' and 'Omitted Results' are on or off. It can be set to 1 (default) to enable these filters, or 0 to disable these filters. | |
as_vis | |
Optional | |
Parameter defines whether you would like to include citations or not. It can be set to 1 to exclude these results, or 0 (default) to include them. | |
Serpapi Parameters | |
engine | |
Required | |
Set parameter to google_scholar to use the Google Scholar API engine. | |
no_cache | |
Optional | |
Parameter will force SerpApi to fetch the Google Scholar results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together. | |
async | |
Optional | |
Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled. | |
api_key | |
Required | |
Parameter defines the SerpApi private key to use. | |
output | |
Optional | |
Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved. | |
API Results | |
JSON Results | |
JSON output includes structured data for organic results. | |
A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi. | |
HTML Results | |
HTML output is useful to debug JSON results or support features not supported yet by SerpApi. | |
HTML output gives you the raw HTML results from Google. |