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.1.tar.gz (5.2 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.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scholr-0.2.1.tar.gz
  • Upload date:
  • Size: 5.2 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.1.tar.gz
Algorithm Hash digest
SHA256 b5ba03fca65a4b3812c76c35bf94b14fa0641eb6b4c1a3544365235fd585914e
MD5 49e6295ab9849fba6b0aefb90dd60781
BLAKE2b-256 fe35df0c1ffaaa6aa474d4f0dbe707f0526975757b280c8377048aa296909405

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scholr-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abbd89fdcbac3a953cf4df14d38c14a9f014ddf0669428ca5d2bcefeea2b0aef
MD5 e0cb8af18168e67aaa1f1d3a1cf7c4a8
BLAKE2b-256 06eae7c4c0145b9faa27741d121d87f26b8d7273c61cae8be13a827914ebe15a

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