Google Scholar Automation Setup
Google Scholar Automation Setup
This site can fetch citation counts from Google Scholar through SerpApi and publish the generated JSON files to the google-scholar-stats branch.
Required repository secrets
Add these secrets in Settings -> Secrets and variables -> Actions:
GOOGLE_SCHOLAR_ID: your Google Scholar user id, for exampleru2ps-0AAAAJSERPAPI_KEY: your SerpApi API key
Required config fields
Set these fields in _config.yml:
repository: must matchOWNER/REPOgoogle_scholar_stats_use_cdn: set tofalsefor raw GitHub, ortrueto use jsDelivr caching
Mapping publication citations
For any publication that should display a citation count, add:
google_scholar_citation_id: "YOUR_SCHOLAR_CITATION_ID"
You can get this id from the publication URL on Google Scholar:
citation_for_view=USER_ID:CITATION_ID
Use the full combined value, for example:
google_scholar_citation_id: "ru2ps-0AAAAJ:L8Ckcad2t8MC"
Automation flow
- GitHub Actions runs on push, manual dispatch, or the daily schedule.
google_scholar_crawler/main.pyfetches the author profile and article citations through SerpApi.- The workflow force-pushes
gs_data.jsonandgs_data_shieldsio.jsonto thegoogle-scholar-statsbranch. - The frontend loads that JSON and fills:
#total_cit.show_paper_citations[data="..."]
