DEV Community

carrierone
carrierone

Posted on

USPTO Patent and Trademark Data via REST API

USPTO Patent and Trademark Data via REST API

As developers building patent search tools, IP analytics, and prior art searches, having access to accurate and up-to-date patent data is crucial. The United States Patent and Trademark Office (USPTO) provides a wealth of information through its RESTful API, which can be accessed via api.verilexdata.com/api/v1/patents/sample.

Problem

One common challenge when building these tools is ensuring the data freshness and accuracy. The USPTO grants over 1.6 million patents annually, but keeping track of all changes manually is impractical. Moreover, different inventors, assignees, and technologies require specific filtering to meet unique project requirements.

Python Code Example

Here's a simple Python script using requests library to fetch patent data from the USPTO API:


python
import requests

def get_patent_data(keyword):
    url = "https://api.verilexdata.com/api/v1/patents/sample"

    params = {
        'keyword': keyword,
        'fields': 'patentNumber,title,assignee'
    }

    response = requests.get(url, params=params)
    if response.status_code == 200:
        return response.json()
    else:
        raise Exception(f"Request failed with status: {response.status_code}")

#
Enter fullscreen mode Exit fullscreen mode

Top comments (0)