Skip to main content

A lightweight scraper for Google Scholar

Project description

Scholr

PyPI version Python License Stars Issues


Overview

Scholr is a lightweight, developer-friendly Python library for extracting structured academic data from Google Scholar.
It provides an easy way to retrieve:

  • Author profile information (name, affiliation, research interests, photo)
  • Citation statistics (total citations, h-index, i10-index)
  • Complete publication lists
  • Publication details (title, date, citations, url)

Scholr is designed for simplicity, speed, and ease of integration into scripts or pipelines.


Installation

pip install scholr

Usage

Fetch an author profile

from scholr import get_scholar_profile

user_id = "EXAMPLE_ID"

profile = get_scholar_profile(user_id)

print("Profile info:")
print(profile)

Example output:

{
  "name": "John Doe",
  "affiliation": "Department of Computer Science, Example University",
  "interests": ["machine learning", "data mining"],
  "photo_url": "https://scholar.googleusercontent.com/photos/example.jpg",
  "citations_all": "1234",
  "citations_since_2019": "987",
  "h_index_all": "15",
  "h_index_since_2019": "12",
  "i10_index_all": "10",
  "i10_index_since_2019": "8",
  "publications": [
    {"title": "A Study on Machine Learning", "url": "https://scholar.google.com/..." },
    {"title": "Data Mining Techniques", "url": "https://scholar.google.com/..."}
  ]
}

Fetch publication details

from scholr import get_publication_details

publication_url = "https://scholar.google.com/citations?view_op=view_citation&user=EXAMPLE_ID&citation_for_view=EXAMPLE_CITATION"

publication = get_publication_details(publication_url)

print("Publication details:")
print(publication)

Example output:

{
  "title": "A Study on Machine Learning",
  "url": "https://scholar.google.com/...",
  "date": "2020/5/15",
  "citations": "45"
}

Example Test Script

from scholr import get_scholar_profile, get_publication_details

profile_url = "https://scholar.google.com/citations?user=EXAMPLE_ID"

profile = get_scholar_profile(profile_url)
print("Profile info:", profile)

for pub in profile.get("publications", []):
    publication = get_publication_details(pub.get("url"))
    print("Publication details:", publication)

Notes

  • Scholr fetches all publications of a profile automatically using pagination.
  • Rate-limiting may occur if too many requests are sent in a short time.
  • This library uses only BeautifulSoup; no browser automation is required.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scholr-0.2.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scholr-0.2.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file scholr-0.2.2.tar.gz.

File metadata

  • Download URL: scholr-0.2.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for scholr-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a53661939133ab56f86901e1916b3a38a5fae211b3a57757eae81ea33f795739
MD5 63f3201239559ca37c2c2a8adbe426ee
BLAKE2b-256 02eb9194049fb403b3f5c697d555591baaa65172d2f7fb7a1c6d2459c76f4aa7

See more details on using hashes here.

File details

Details for the file scholr-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: scholr-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for scholr-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a3c4463441797debd6e8da33dafca13c1a8d135f56690d7872877bde27aecaf
MD5 7aceb001af3798ec6ef98a32434db5e2
BLAKE2b-256 ebdf4a3e2997ce9f2629d7f7e7b39af726bd0e89d24fcf4bbb2e731975506aa9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page