Skip to main content

google-patent-cli

A command-line tool to fetch patent metadata from Google Patents.

Installation

# pipx (recommended — isolated environment)
pipx install google-patent-cli

# uv
uv tool install google-patent-cli

# pip
pip install google-patent-cli

Windows users: If the gpc command is not recognized after installation, run pipx ensurepath and restart your terminal.

Update

# pipx
pipx upgrade google-patent-cli

# uv
uv tool upgrade google-patent-cli

# pip
pip install --upgrade google-patent-cli

Usage

Fetch a patent

# Default output (JSON)
gpc lookup US20250350789

# WO (PCT) patent
gpc lookup WO2022208645A1

# Text format
gpc lookup US12514139B2 --format text

# TSV format
gpc lookup US20250350789 --format tsv

# Single field
gpc lookup US20250350789 --field title

# Multiple fields
gpc lookup US20250350789 --fields title,assignee,filing_date

# Save to file
gpc lookup US12514139B2 --output-dir ./output
gpc lookup US12514139B2 --format text --output-dir ./output

Download patent PDF

# Save to current directory as US9735861B2.pdf
gpc download US9735861

# Save to a specific directory
gpc download US9735861 --output-dir ./pdfs

Download figure images

Downloads high-resolution figure images (fig01.png, fig02.png, ...).

# Save to current directory
gpc images US11125686B2

# Save to a specific directory
gpc images KR102355140B1 --output-dir ./figs

Works with US, KR, JP, EP, CN, and WO patents.

List available fields

gpc fields
Field Description
publication_number Publication number (e.g. US12514139B2)
number_without_kind Publication number without kind code
application_number Application number
kind_code Kind code (e.g. B2, A1)
country Country code
title Title of the invention
abstract Abstract
inventors List of inventors
assignee Assignee / applicant
filing_date Filing date
publication_date Publication date
cpc_codes CPC classification codes
claims List of claims
description Full description text
pdf_url PDF download URL
patent_url Google Patents page URL (with kind code)
backward_citations Patent Citations — patents cited by this patent. Each entry includes publication_number, priority_date, publication_date, assignee, title, cited_by_examiner (*), cited_by_third_party (†)
backward_citations_family Family to Family Citations — same structure as backward_citations
non_patent_citations Non-Patent Citations — each entry includes title, cited_by_examiner, cited_by_third_party
forward_citations Cited By — patents that cite this patent. Same structure as backward_citations
forward_citations_family Cited By (Family) — same structure as backward_citations
similar_documents Similar Documents — each entry includes publication_number, publication_date, title
family_applications Worldwide Applications — each entry includes filing_date, country_code, application_number, patent_number, legal_status_cat, legal_status

Proxy / SSL configuration

For corporate networks or proxy environments:

gpc configure

Settings are saved to ~/.patent-cli.toml:

[proxy]
https = "http://proxy.example.com:8080"
http  = "http://proxy.example.com:8080"

[ssl]
ca_bundle = "/path/to/ca-bundle.crt"

Options

gpc lookup --help

Options:
  -f, --format [json|text|tsv]  Output format (default: json)
  --field FIELD                  Print a single field value
  --fields F1,F2,...             Comma-separated list of fields to include
  -t, --timeout INTEGER          HTTP timeout in seconds (default: 15)
  -o, --output-dir DIR           Directory to save output file
  -v, --verbose                  Print debug logs to stderr

Uninstall

# pipx
pipx uninstall google-patent-cli

# uv
uv tool uninstall google-patent-cli

# pip
pip uninstall google-patent-cli

Run as a module

python -m google_patent_cli lookup US12514139B2

Disclaimer

This tool scrapes Google Patents public web pages. Please comply with Google's Terms of Service. Excessive requests may result in IP blocking.

License

MIT

Metadata

Release files for google-patent-cli 0.1.11

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

Source distribution (sdist)

Source distribution for google-patent-cli 0.1.11
File Size Uploaded Provenance Actions
google_patent_cli-0.1.11.tar.gz 56.5 kB Without provenance Details for google_patent_cli-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-patent-cli 0.1.11
File Interpreter ABI Platform Actions
google_patent_cli-0.1.11-py3-none-any.whl Python 3 none any Details for google_patent_cli-0.1.11-py3-none-any.whl

Total release size: 74.1 kB

Release files / google_patent_cli-0.1.11.tar.gz

Download URL google_patent_cli-0.1.11.tar.gz
Size 56.5 kB
Tags Source
SHA-256 checksum
How to use checksums
401a6bdba6f78c43c81c166a2817ef4530965d2343cc7705b35b0152c0d73e81
BLAKE2b-256 checksum
How to use checksums
644c044d57bba8a41ff23cd6fc86ad109b121890be35ec854ea17fa2bf09c70c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / google_patent_cli-0.1.11-py3-none-any.whl

Download URL google_patent_cli-0.1.11-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3bd7a5bea38b1e66e780b0aa3dca831b9a6a8774e825773e3a24747c4e57de2
BLAKE2b-256 checksum
How to use checksums
dafa34a46f1b60002dc23ba41d315004119bf5334262fb053aad989c5e4f7352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for google-patent-cli 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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