What am I trying to do ?
I am trying to use SerpApi's Google Scholar API for fetching articles of the publishers and was expecting all article titles to store in the array $title
but it limits only to the first 100 articles.
Any Help Would be really appreciated, code :
title.py
from serpapi import GoogleSearch
import sys
id = sys.argv[1]
key = sys.argv[2]
params = {
"engine": "google_scholar_author",
"author_id": id,
"api_key": key,
"sort":"pubdate",
"num":10000
}
search = GoogleSearch(params)
results = search.get_dict()
articles = results["articles"]
res = [ sub['title'] for sub in articles ]
print(res)
Controller
$title = shell_exec("python publicationScripts/title.py $gscID $key");
dd($title);
Output
The output shows only 100 articles but there are more than 200 articles
Thank you to Dmitriy for clarification. You can get more than 100 by using pagination.