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, link)

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.0.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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scholr-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b61dcd68669a42a94bf5f9febf74bddfca5b33389beb5b04642460d0c182e22b
MD5 edc9f253b57e0cf13ab7e0a383dcb6a8
BLAKE2b-256 491c841a869539229f606f264fe9ccc291c0cb101d31a10204c1a5ef10e03856

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scholr-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68d5a649ba44ec3ff8071d694b7a7c21d3803c33ef141ab396c7f1deca7634d3
MD5 06723ecc5dca7cf59990e9c83c469dce
BLAKE2b-256 e74064c490f4367d8633f96dfbaa7003d292a892334f325d8d24c53509ac324f

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