Skip to main content

Search and retrieve USPTO patent data

Project description

pypatent

Search for and retrieve US Patent and Trademark Office Patent Data

PyPI page

Requirements

Python 3, BeautifulSoup, requests, re

Installation

pip install pypatent

Searching for Patents

The search function works similarly to the Advanced Search at the USPTO

def search(string=None, results_limit=50, pn=None, isd=None, ttl=None, abst=None, aclm=None, spec=None, ccl=None, cpc=None, cpcl=None, icl=None, apn=None, apd=None, apt=None, govt=None, fmid=None, parn=None, rlap=None, rlfd=None, prir=None, prad=None, pct=None, ptad=None, pt3d=None, pppd=None, reis=None, rpaf=None, afff=None, afft=None, in_=None, ic=None, is_=None, icn=None, aanm=None, aaci=None, aast=None, aaco=None, aaat=None, lrep=None, an=None, ac=None, as_=None, acn=None, exp=None, exa=None, ref=None, fref=None, oref=None, cofc=None, reex=None, ptab=None, sec=None, ilrn=None, ilrd=None, ilpd=None, ilfd=None)

You may specify just the string argument to search for a certain string in all fields. For example:

search('microsoft') # Will return results matching 'microsoft' in any field

You may also use the string argument to specify complex search criteria as demonstrated on the USPTO site. For example:

search('TTL/(tennis AND (racquet OR racket))')

Alternatively (or in conjunction with the string criteria as described below), you can specify one or more Field Code arguments to search within the specified fields. Multiple Field Code arguments will create a search with AND logic. OR logic can be used within a single argument. For more complex logic, use a custom string.

search(pn='adobe', ttl='software') # Equivalent to search('PN/adobe AND TTL/software')
search(pn=('adobe or macromedia'), ttl='software') # Equivalent to search('PN/(adobe or macromedia) AND TTL/software')

String criteria can be used in conjunction with Field Code arguments:

search('acrobat', pn='adobe', ttl='software') # Equivalent to search('acrobat AND PN/adobe AND TTL/software')

The Field Code arguments have the same meaning as on the USPTO site.

The results_limit argument lets you change how many patent results are retrieved. The default is 50, equivalent to one page of results.

Search results are returned as a list of patent numbers, patent titles, and links:

[[patent_number_1, patent_title_1, patent_link_1], ..., [patent_number_n, patent_title_n, patent_link_n]]

Retrieving Patent Details: The patent Class

Use the patent class to retrieve patent details for a given patent URL.

this_patent = patent('http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&r=4&p=1&f=G&l=50&d=PTXT&S1=aaa&OS=aaa&RS=aaa')

The following attributes are retrieved:

  • patent_num: Patent Number
  • patent_date: Issue Date
  • abstract: Abstract
  • inventors: List of Names of Inventors and Their Locations
  • applicant_name: Applicant Name
  • applicant_city: Applicant City
  • applicant_state: Applicant State
  • applicant_country: Applicant Country
  • assignee_name: Assignee Name
  • assignee_loc: Assignee Location
  • family_id: Family ID
  • applicant_num: Applicant Number
  • file_date: Filing date
  • claims: Claims Description (as a list)
  • description: Patent Description (as a list)

Field Code Arguments for Search Function

  • PN: Patent Number
  • ISD: Issue Date
  • TTL: Title
  • ABST: Abstract
  • ACLM: Claim(s)
  • SPEC: Description/Specification
  • CCL: Current US Classification
  • CPC: Current CPC Classification
  • CPCL: Current CPC Classification Class
  • ICL: International Classification
  • APN: Application Serial Number
  • APD: Application Date
  • APT: Application Type
  • GOVT: Government Interest
  • FMID: Patent Family ID
  • PARN: Parent Case Information
  • RLAP: Related US App. Data
  • RLFD: Related Application Filing Date
  • PRIR: Foreign Priority
  • PRAD: Priority Filing Date
  • PCT: PCT Information
  • PTAD: PCT Filing Date
  • PT3D: PCT 371 Date
  • PPPD: Prior Published Document Date
  • REIS: Reissue Data
  • RPAF Reissued Patent Application Filing Date
  • AFFF: 130(b) Affirmation Flag
  • AFFT: 130(b) Affirmation Statement
  • IN: Inventor Name
  • IC: Inventor City
  • IS: Inventor State
  • ICN: Inventor Country
  • AANM: Applicant Name
  • AACI: Applicant City
  • AAST: Applicant State
  • AACO: Applicant Country
  • AAAT: Applicant Type
  • LREP: Attorney or agent
  • AN: Assignee Name
  • AC: Assignee City
  • AS: Assignee State
  • ACN: Assignee Country
  • EXP: Primary Examiner
  • EXA: Assistant Examiner
  • REF: Referenced By
  • FREF: Foreign References
  • OREF: Other References
  • COFC: Certificate of Correction
  • REEX: Re-Examination Certificate
  • PTAB: PTAB Trial Certificate
  • SEC: Supplemental Exam Certificate
  • ILRN: International Registration Number
  • ILRD: International Registration Date
  • ILPD: International Registration Publication Date
  • ILFD: Hague International Filing Date

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

pypatent-1.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

pypatent-1.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pypatent-1.0.2.tar.gz.

File metadata

  • Download URL: pypatent-1.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pypatent-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6dd5747a590af81badb115adbdf73413c437b895a1191573949c64752e1f8ec8
MD5 448f2e2583e015f311bd48369bdce422
BLAKE2b-256 a1cbeefbbee73845fae94231235771abbfadbd075f4c51691c0ec7992d1006a2

See more details on using hashes here.

File details

Details for the file pypatent-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pypatent-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7406bbbeac264b5b1e0000613839be04cc8e89e5c88170132ddf136080a62f
MD5 9e53d9b70a48755573866fc9a817dae0
BLAKE2b-256 3f4356b35d69074de4ee298f565f6be6e1cc26c3070e021810cd90ab1af6acab

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