Skip to main content

gscholar

Query Google Scholar using Python.

Requirements

  • Python
  • pdftotext (command line tool)

Installing

$ pip install gscholar

##Using gscholar as a command line tool

gscholar provides a command line tool, to use it, just call gscholar like:

$ gscholar "albert einstein"

or

$ python3 -m gscholar "albert einstein"

Making a simple lookup:

$ gscholar "some author or title"

will return the first result from Google Scholar matching this query.

Getting more results:

$ gscholar --all "some author or title"

Same as above but returns up to 10 bibtex items. (Use with caution Google will assume you're a bot an ban you're IP temporarily)

Querying using a pdf:

$ gscholar /path/to/pdf

Will read the pdf to generate a Google Scholar query. It uses this query to show the first bibtex result as above.

Renaming a pdf:

$ gscholar --rename /path/to/pdf

Will do the same as above but asks you if it should rename the file according to the bibtex result. You have to answer with "y", default answer is no.

Getting help:

$ gscholar --help

Using gscholar as a python library

Install the gscholar package with pip install as described above or copy the package somewhere Python can find it.

import gscholar

gscholar.query("some author or title")

will return a list of bibtex items.

Metadata

Release files for gscholar 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gscholar 2.1.0
File Size Uploaded
gscholar-2.1.0.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gscholar 2.1.0
File Interpreter ABI Platform
gscholar-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / gscholar-2.1.0.tar.gz

Download URL gscholar-2.1.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f11d0462269fbec501849809c3f2574761a9a9e47dcbb5dc271e93242aa8387a
BLAKE2b-256 checksum
How to use checksums
09886bdec2f1d6fe742a9ace3482055324c61a9360b4be54411d2375b0fbfdb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / gscholar-2.1.0-py3-none-any.whl

Download URL gscholar-2.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87a2146b09319229b709723ea81326c92de513205d9b0ab321052fefc411dd15
BLAKE2b-256 checksum
How to use checksums
5f653b014a801fe972b8348b48b3aee815d32331f4c8a49820a572d0356c487a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.6.1

2 release files

1.6.0

1 release file

1.5.1

2 release files

1.5.0

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page