Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dimitryzub/dd2c05078a6b8f8505538da9e8028ab8 to your computer and use it in GitHub Desktop.
Save dimitryzub/dd2c05078a6b8f8505538da9e8028ab8 to your computer and use it in GitHub Desktop.
Scrape Google Scholar Author Co-Authors Results with SerpApi
from serpapi import GoogleSearch
import os
params = {
"api_key": os.getenv("API_KEY"),
"engine": "google_scholar_author",
"author_id": "m8dFEawAAAAJ",
"hl": "en",
}
search = GoogleSearch(params)
results = search.get_dict()
for authors in results['co_authors']:
author_name = authors['name']
author_affiliations = authors['affiliations']
author_link = authors['link']
print(f'{author_name}\n{author_affiliations}\n{author_link}\n')
# Part of the output:
'''
Christoph Benzmüller
Professor, FU Berlin
https://scholar.google.com/citations?user=zD0vtfwAAAAJ&hl=en
Pascal Fontaine
LORIA, INRIA, Université de Lorraine, Nancy, France
https://scholar.google.com/citations?user=gHe6EF8AAAAJ&hl=en
Stephan Merz
Senior Researcher, INRIA
https://scholar.google.com/citations?user=jaO3Z3wAAAAJ&hl=en
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment