Skip to main content

A Python SDK for downloading patents from Google Patents with MCP support

Project description

Patent Downloader SDK

A Python SDK for downloading patents from Google Patents with MCP support.

Features

  • Download patent PDFs from Google Patents
  • Get patent information (title, inventors, assignee, etc.)
  • MCP server support
  • Command-line interface
  • Simple API with error handling
  • Support for batch downloading from files (TXT/CSV)

Installation

# Using uv (recommended)
uv add patent-downloader
uv add "patent-downloader[mcp]"

# Using pip
pip install patent-downloader
pip install "patent-downloader[mcp]"

Quick Start

Python API

from patent_downloader import PatentDownloader

# Download a patent
downloader = PatentDownloader()
success = downloader.download_patent("WO2013078254A1", "./patents")

# Get patent info
info = downloader.get_patent_info("WO2013078254A1")
print(f"Title: {info.title}")

# Download multiple patents
results = downloader.download_patents(["WO2013078254A1", "US20130123448A1"])

# Download patents from file
results = downloader.download_patents_from_file("patents.txt", has_header=False)

Command Line

# Download patents
patent-downloader download WO2013078254A1
patent-downloader download WO2013078254A1 US20130123448A1 --output-dir ./patents

# Download patents from file
patent-downloader download --file patents.txt
patent-downloader download --file patents.csv --has-header

# Get patent info
patent-downloader info WO2013078254A1

# Start MCP server
patent-downloader mcp-server

MCP Server

The MCP server provides these functions:

  • download_patent: Download a single patent
  • download_patents: Download multiple patents
  • get_patent_info: Get patent information
# Start server
patent-downloader mcp-server

# Using uvx to run without installation (specify MCP dependencies):
uvx --with mcp patent-downloader mcp-server

API

PatentDownloader

# Download patent
downloader.download_patent(patent_number, output_dir=".")

# Download multiple patents
downloader.download_patents(patent_numbers, output_dir=".")

# Download patents from file
downloader.download_patents_from_file(file_path, has_header=False, output_dir=".")

# Get patent info
downloader.get_patent_info(patent_number)

PatentInfo

@dataclass
class PatentInfo:
    patent_number: str
    title: str
    inventors: List[str]
    assignee: str
    publication_date: str
    abstract: str
    url: Optional[str] = None

File Format Support

The SDK supports reading patent numbers from both TXT and CSV files:

TXT Files

  • One patent number per line
  • Optional header row (use --has-header flag)
  • Example:
    WO2013078254A1
    US20130123448A1
    EP1234567A1
    

CSV Files

  • Single column of patent numbers
  • Optional header row (use --has-header flag)
  • Example:
    patent_number
    WO2013078254A1
    US20130123448A1
    EP1234567A1
    

License

MIT License

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

patent_downloader-0.2.0.tar.gz (77.1 kB view details)

Uploaded Source

Built Distribution

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

patent_downloader-0.2.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file patent_downloader-0.2.0.tar.gz.

File metadata

  • Download URL: patent_downloader-0.2.0.tar.gz
  • Upload date:
  • Size: 77.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for patent_downloader-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7e4c07800f2262345572ceab4540d64c1f0331880132206eb797f1388166f8c8
MD5 65a6a0f40a23f5319a000bbf332a452b
BLAKE2b-256 23dae5bbb97f538cc9b29643b4a0308ad8d9d6b8b5093ad3be9e9185735c1fad

See more details on using hashes here.

Provenance

The following attestation bundles were made for patent_downloader-0.2.0.tar.gz:

Publisher: python-publish.yml on Edison-A-N/patent_downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file patent_downloader-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for patent_downloader-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af56ac723e55a2f2e278e3704635c1f467d148941522840e439030a6aeb43420
MD5 24006017b91b4738e9d9ee2d072dc787
BLAKE2b-256 d8acef4f598b302174a6b4e6962ef255d69fc302fdfacdb98702e85969227199

See more details on using hashes here.

Provenance

The following attestation bundles were made for patent_downloader-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on Edison-A-N/patent_downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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