Skip to main content

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

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

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_patent_cli-0.1.3.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

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

google_patent_cli-0.1.3-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file google_patent_cli-0.1.3.tar.gz.

File metadata

  • Download URL: google_patent_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for google_patent_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 770dd64961c445a66c17d4e8fcfdfcc38881285e3f58e38af004d0aab25444bb
MD5 f1601673c48cb9e84690358d213a3f53
BLAKE2b-256 44be9768794997bd387f9c42a43981352236a4d9117168fad8421063144f40c7

See more details on using hashes here.

File details

Details for the file google_patent_cli-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for google_patent_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a00e3c621674b0a2af1f9f31e3c25e8fd477a3a31db005c1afbacfaed23495f
MD5 4d1c5b8598826185167aeb641e92946e
BLAKE2b-256 065c1217ef9fdc87749973b91c77a2aa1b372d2a2608af77b594982cf333d91c

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