Google Patents metadata fetcher — command-line tool
Project description
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
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
# 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
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 |
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
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 google_patent_cli-0.1.4.tar.gz.
File metadata
- Download URL: google_patent_cli-0.1.4.tar.gz
- Upload date:
- Size: 40.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc259e77b82c10c3100d9052297cba20b021d7246fa31c720125df94c0befa15
|
|
| MD5 |
015da0628954bd1474d3bfc3cc0b271d
|
|
| BLAKE2b-256 |
ed1ae51503bb3c2b0212bc9275cf904cde486e33330e0e004b334e89fa6f64e4
|
File details
Details for the file google_patent_cli-0.1.4-py3-none-any.whl.
File metadata
- Download URL: google_patent_cli-0.1.4-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63069c4d66c326676421fdd663bed1371366434181b582ae7c57c253b7233742
|
|
| MD5 |
eea4790156a13473cb17c149b788e6a5
|
|
| BLAKE2b-256 |
9dce06c76e55b86308214b4c054a266af2816c4569b1f7d7dc96df0f8813270b
|