Google Scholar citation analysis tool for identifying high-impact citations, influential authors, and notable peers for grant applications and CV building.
Project description
WhoCitedMe
WhoCitedMe is a powerful Python library and CLI tool designed for researchers and academics. It automates the process of scraping Google Scholar citations, identifying who is citing your work, and analyzing the impact of those citations.
It goes beyond simple citation counts by enriching author data, matching missing Scholar IDs, and identifying the "top scholar" (highest-cited author) for each citing paper.
๐ Key Features
- ๐ Citing Papers Scraper: Automatically scrape all papers citing a specific Google Scholar profile within a given year range.
- ๐งฉ Author Enricher: Handles truncated author lists (e.g., "J Smith, A Doe...") by parsing full citation data.
- ๐ Author Info Fetcher: High-performance, parallelized fetching of author metrics (Citation Count, h-index, Fellow status).
- ๐ ID Matcher: Uses fuzzy matching logic to resolve missing Google Scholar IDs for citing authors.
- ๐ Top Scholar Finder: Identifies the most influential author on every citing paper to help you understand who is citing you.
๐ฏ Use Cases
- Grant Applications: Demonstrate impact by listing high-profile researchers who cite your work.
- Tenure & Promotion: Provide detailed metrics on the quality of your citations, not just the quantity.
- Networking: Identify potential collaborators who are already building on your research.
๐ ๏ธ Installation
Prerequisites
- Python 3.8 or higher.
- Google Chrome installed (required for Selenium scraping).
๐ฆ From PyPI (Recommended)
pip install whocitedme
๐ป Local Development (using uv)
We use uv for fast dependency management.
-
Clone the repository:
git clone https://github.com/KyanChen/WhoCitedMe.git cd WhoCitedMe
-
Setup environment with uv:
# Install uv (if not installed) pip install uv # Create virtual environment uv venv # Activate virtual environment source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install in editable mode:
uv pip install -e .
๐ Usage
You can use WhoCitedMe either via the command line interface (CLI) or as a Python library.
Command Line Interface (CLI)
The easiest way to run the tool is using the pipeline command, which runs all steps in order.
# Run the full analysis pipeline
whocitedme pipeline --user-id "YOUR_SCHOLAR_ID" --start-year 2018 --end-year 2024
# With custom output directory and worker count
whocitedme pipeline -u "YOUR_SCHOLAR_ID" -s 2018 -e 2024 -o my_output --workers 32
# Run in headless mode with proxy support
whocitedme pipeline -u "YOUR_SCHOLAR_ID" -s 2018 -e 2024 --headless --proxy http://127.0.0.1:7890
Individual Steps
If you prefer to run steps individually:
-
Scrape Citing Papers:
whocitedme scrape --user-id "YOUR_SCHOLAR_ID" --start-year 2020 --end-year 2024 --output output/citations.csv # Run in headless mode (no visible browser window) whocitedme scrape -u "YOUR_SCHOLAR_ID" -s 2020 -e 2024 --headless
-
Enrich Author Data:
whocitedme enrich --input output/citations.csv --output output/citations_enriched.csv # Start fresh (disable resume from previous run) whocitedme enrich -i output/citations.csv -o output/citations_enriched.csv --no-resume
-
Fetch Author Metrics (Parallelized):
whocitedme fetch-authors --input output/citations_enriched.csv --output output/scholar_database.csv --workers 16 # With proxy support whocitedme fetch-authors -i output/citations_enriched.csv --proxy http://127.0.0.1:7890
-
Match Missing IDs:
whocitedme match-ids --citing output/citations_enriched.csv --scholars output/scholar_database.csv --output output/citations_verified.csv # With custom matching threshold (0-1, default: 0.7) whocitedme match-ids -c output/citations_enriched.csv -s output/scholar_database.csv --threshold 0.8
-
Find Top Scholars:
whocitedme top-scholar --input output/citations_verified.csv --scholars output/scholar_database.csv --output output/citations_final.csv
Python API
For custom workflows, import the classes directly:
from whocitedme import (
CitingPapersScraper,
AuthorEnricher,
AuthorInfoFetcher,
IDMatcher,
TopScholarProcessor,
)
# Step 1: Scrape citing papers
scraper = CitingPapersScraper(
user_id="YOUR_SCHOLAR_ID",
start_year=2020,
end_year=2024,
output_file="output/citations.csv",
headless=False, # Set True for headless browser
)
scraper.run()
scraper.close()
# Step 2: Enrich truncated author information
enricher = AuthorEnricher(
input_file="output/citations.csv",
output_file="output/citations_enriched.csv",
)
enricher.run(resume=True) # Resume from previous run if interrupted
enricher.close()
# Step 3: Fetch author metrics (parallelized)
fetcher = AuthorInfoFetcher(
input_file="output/citations_enriched.csv",
output_file="output/scholar_database.csv",
)
fetcher.run(max_workers=16)
# Step 4: Match missing Scholar IDs
matcher = IDMatcher(
citing_file="output/citations_enriched.csv",
scholar_file="output/scholar_database.csv",
output_file="output/citations_verified.csv",
match_threshold=0.7,
)
matcher.run()
# Step 5: Find top scholars for each citation
processor = TopScholarProcessor(
main_file="output/citations_verified.csv",
scholar_file="output/scholar_database.csv",
output_file="output/citations_final.csv",
)
processor.run()
See examples/basic_usage.py for a complete runnable script.
๐ Project Structure
WhoCitedMe/
โโโ whocitedme/
โ โโโ __init__.py # Package exports
โ โโโ cli.py # Command-line entry point
โ โโโ scrapers/ # Web scrapers using Selenium
โ โ โโโ citing_papers.py # CitingPapersScraper
โ โ โโโ author_enricher.py # AuthorEnricher
โ โ โโโ author_info.py # AuthorInfoFetcher
โ โโโ processors/ # Data processing logic
โ โ โโโ id_matcher.py # IDMatcher
โ โ โโโ top_scholar.py # TopScholarProcessor
โ โโโ utils/ # Helper utilities
โ โโโ browser.py # Browser driver creation
โ โโโ captcha.py # CAPTCHA handling & random sleep
โโโ examples/ # Usage examples
โ โโโ basic_usage.py
โโโ output/ # Default output directory (git-ignored)
โโโ pyproject.toml # Project configuration and dependencies
โโโ LICENSE # MIT License
โโโ README.md # This file
โ ๏ธ Troubleshooting & Limits
- Google Scholar Rate Limits: If you scrape too fast, Google will block your IP.
- Solution: The tool has built-in delays, but for massive jobs, consider using a VPN or proxy.
- CAPTCHA: If the scraper gets stuck, check the opened Chrome window. You may need to manually solve a CAPTCHA.
- Chrome Version: Ensure your installed Chrome browser matches the ChromeDriver version (usually handled automatically by
undetected-chromedriver).
๐ค Contributing
Contributions are welcome!
- Fork the repo.
- Create a feature branch (
git checkout -b feature/amazing-feature). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
๐ License
Distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whocitedme-0.1.2.tar.gz.
File metadata
- Download URL: whocitedme-0.1.2.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
953d02099a251b750497c01839db7d067ec05b0429dbe3ac01543536232738df
|
|
| MD5 |
d7a19bfa68e0439edfb08cd8f482cbb2
|
|
| BLAKE2b-256 |
f999ee1eb9c43dd3923c8af08ad5e6f628ae50e46925ef98c51051992e96bd2d
|
File details
Details for the file whocitedme-0.1.2-py3-none-any.whl.
File metadata
- Download URL: whocitedme-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97e78799952accd7bac427c53fd09fdb1ecd9fe7940bfca9b949df54c9304ffd
|
|
| MD5 |
fb5ba3436250d5e840b936c5e163593f
|
|
| BLAKE2b-256 |
30be79e11f3e3c48cde2c480e87b9f1359451e208094466b792f92e4d6517da5
|