Skip to main content

Fetch citation counts from CrossRef, OpenCitations, and Google Scholar.

Project description

citations_count_lib PyPI - Version

Overview

citations-count is a Python library designed to fetch citation counts for academic publications from multiple sources, including CrossRef, OpenCitations, and Google Scholar.

This library provides a unified interface to retrieve citation counts using DOIs (Digital Object Identifiers).

Features

  • Fetch citation counts from CrossRef, OpenCitations, and Google Scholar.
  • Support for verbose logging to aid in debugging.
  • Handles rate limiting by introducing delays between API calls.

Installation

To install the library, clone the repository and install the dependencies:

git clone https://github.com/ezefranca/citations_count_lib.git
cd citations_count_lib
pip install -r requirements.txt

Usage

from citations_count.core import fetch_multiple_citations

dois = [
    "10.1109/SeGAH.2017.7939283",
    "10.1109/SeGAH.2011.6165447",
    "10.3390/info16030246",
    "10.1038/s41586-020-2649-2"
]
results = fetch_multiple_citations(dois, delay=1.0, verbose=True)
for result in results:
    print(result)

Example output:

[
    {
        "doi": "10.1109/SeGAH.2017.7939283",
        "citations_crossref": 62,
        "citations_opencitations": 64,
        "citations_google_scholar": 160
    },
    {
        "doi": "10.1109/SeGAH.2011.6165447",
        "citations_crossref": 48,
        "citations_opencitations": 48,
        "citations_google_scholar": 116
    },
    {
        "doi": "10.3390/info16030246",
        "citations_crossref": 0,
        "citations_opencitations": 0,
        "citations_google_scholar": 0
    },
    {
        "doi": "10.1038/s41586-020-2649-2",
        "citations_crossref": 14710,
        "citations_opencitations": None,
        "citations_google_scholar": 22393
    }
]

Logging

Verbose logging can be enabled by setting the verbose parameter to True. This will print detailed logs for debugging purposes.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

citations_count-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

citations_count-1.0.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file citations_count-1.0.0.tar.gz.

File metadata

  • Download URL: citations_count-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for citations_count-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1a33f2222885eee2051b6064a3346ea1e652e958e95283df80e5c341cd988eb1
MD5 97bfd574300f0a10914971c8c069b079
BLAKE2b-256 ce776604749f0d8444b9324b4ba80436e6c91326362be4747a5a0218589bedfa

See more details on using hashes here.

File details

Details for the file citations_count-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citations_count-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d5150e4219340903633bdc4f372a32a433a5138714d9a040e5624c3de621776
MD5 23ca34e8082376bce2a3bd9b254ab68a
BLAKE2b-256 d7f11cd08a89441c9aa3da6ee777108cefe6ea5eece7933c615e7050c015bed1

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