DEV Community

carrierone
carrierone

Posted on

USPTO Patent and Trademark Data via REST API

USPTO Patent and Trademark Data via REST API for Developers

If you're a developer looking to build tools that leverage patent data for research, analytics, prior art searches, or trademark monitoring, the United States Patent and Trademark Office (USPTO) offers an excellent resource: their RESTful API. This API provides access to over 1.6 million USPTO grants through endpoints like api.verilexdata.com/api/v1/patents/sample.

Problem: Building a Comprehensive IP Search Tool

Imagine creating a tool that not only indexes the vast repository of patents but also allows users to search based on specific keywords, inventor names, or assignee details. The challenge here is finding an efficient way to integrate and process such large datasets.

Solution with Python

To demonstrate how you can interact with this API in Python, let's write a simple script that fetches patent data using the requests library:


python
import requests

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

    # Constructing the query string to filter by keyword
    params = {
        'keyword': keyword,
        'limit': 50,  # Limit results for demonstration purposes
        'sort_by': 'relevance'
    }

    response = requests.get(url
Enter fullscreen mode Exit fullscreen mode

Top comments (0)