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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scholr-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 31dde492b74490ef71afe19cdaeea696ce1fd2595858812f7b546049413cd293
MD5 f6122ecb57d9f8f5a98897a999b53d28
BLAKE2b-256 b65e53667bdff13ae8daae46fbcc83edb7e5d688f3db726483bb7d553f76aeb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scholr-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 006db27c0bf20820bf7ed527b1e31c9497aae08acd4156d31cb3074459465c5b
MD5 bb204c8e920730341356efad73a513b0
BLAKE2b-256 ebe83d520e4405599405a04d924b184594bcb761364351583276b090b08c6a13

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