Getting started overview
PatentsView offers free, programmatic access to United States patent data, supporting a range of applications from academic research to public policy analysis. The platform, established in 2015, aggregates and harmonizes patent information primarily from the United States Patent and Trademark Office (USPTO). Unlike many other APIs, PatentsView does not require API keys or authentication for access, simplifying the initial setup process. This allows developers and researchers to directly integrate the API into their projects to retrieve patent data, inventor information, and assignee details without an explicit registration step. Data is typically returned in JSON format, facilitating parsing and integration into various programming environments.
The API is designed for ease of use, providing a RESTful interface where data can be queried using URL parameters. This guide focuses on enabling a quick start, detailing how to construct a basic request and interpret the returned data. While the API is free to use, understanding its query structure and rate limits is essential for efficient data retrieval and to avoid potential service interruptions. Developers should consult the official PatentsView API documentation for comprehensive details on all available endpoints and query options.
Quick Reference Steps:
| Step | What to Do | Where |
|---|---|---|
| 1. Review Documentation | Understand API structure and endpoints. | PatentsView API Reference |
| 2. Formulate Query | Construct a URL with desired parameters. | Your code editor or browser |
| 3. Make Request | Send an HTTP GET request to the API endpoint. | curl, Postman, or your preferred programming language's HTTP client |
| 4. Process Response | Parse the JSON data returned by the API. | Your application logic |
Create an account and get keys
A notable aspect of the PatentsView API is its public accessibility: it does not require an account or API keys for general use. This streamlines the onboarding process significantly, as there is no registration, signup, or credential management step. Users can begin making requests immediately after understanding the API's structure. This approach is consistent with its mission to provide open access to patent data for public good and research.
While no keys are needed, users should still be mindful of the API's usage guidelines and rate limits. Although not explicitly documented as strict per-user limits, excessive or abusive requests can lead to temporary IP blocking to maintain service stability for all users. Best practices include implementing reasonable delays between requests and designing queries to retrieve only necessary data, which aligns with standard API crawl budget management.
For those interested in bulk data downloads, PatentsView also offers direct file downloads which do not require API interaction. These are available through the PatentsView data page and can be a more efficient method for large-scale data ingestion than repeated API calls.
Your first request
Making your first request to the PatentsView API involves constructing a URL that specifies the data you want to retrieve and sending an HTTP GET request to that URL. The API base URL is https://api.patentsview.org/. You will typically interact with endpoints like /patents, /inventors, or /assignees.
Let's construct a simple request to retrieve information about a specific patent. We'll use the /patents endpoint and filter by a patent number.
Example: Fetching a specific patent by number
To fetch data for a patent with the number PP31100 (a plant patent for a rose), you would use the following URL:
GET https://api.patentsview.org/patents?q={"patent_number":"PP31100"}
You can execute this request directly in your web browser, using command-line tools like curl, or within a programming language.
Using curl:
curl "https://api.patentsview.org/patents?q={"patent_number":"PP31100"}"
Expected JSON Response (partial):
{
"patents": [
{
"patent_id": "PP31100",
"patent_number": "PP31100",
"patent_title": "Rosa plant named 'WEKFUNNEL'",
"patent_date": "2019-11-05",
"patent_abstract": "A new and distinct cultivar of rose plant is provided which originated from the cross of the unpatented seed parent 'WEKjujubella' and the unpatented pollen parent 'WEKjujubella'.",
// ... other fields
"inventors": [
{
"inventor_id": "inventor_id_example",
"inventor_first_name": "Tom",
"inventor_last_name": "Carruth"
}
],
"assignees": [
{
"assignee_id": "assignee_id_example",
"assignee_organization": "Weeks Wholesale Rose Grower, Inc."
}
]
}
],
"number_of_pages": 1,
"total_patent_count": 1
}
This response structure demonstrates how PatentsView returns relevant data, including patent metadata, associated inventors, and assignees. The q parameter is central to filtering requests, allowing for complex queries using JSON-like syntax within the URL.
Example: Searching for patents by keyword
To find patents containing a specific keyword in their title or abstract, you can use the _text_any operator. Let's search for patents related to "blockchain":
GET https://api.patentsview.org/patents/query?q={"_text_any":{"patent_title":"blockchain"}}&f=["patent_title","patent_number","patent_date"]
In this example, _text_any allows for a full-text search, and f is used to specify the fields you want returned, which can help in reducing response size and improving query efficiency. More advanced filtering and field selection options are detailed in the PatentsView API documentation.
Common next steps
After successfully making your first request, several common next steps can enhance your use of the PatentsView API:
-
Explore Advanced Querying: The API supports complex queries, including filtering by date ranges, geographic locations of inventors/assignees, and specific classifications. Review the PatentsView query language documentation to learn about operators like
_and,_or,_gte(greater than or equal), and_lte(less than or equal) for more refined data retrieval. -
Pagination and Sorting: For queries that return a large number of results, implement pagination using the
pageandper_pageparameters. You can also sort results by various fields using theoparameter to specify sorting order (e.g.,o={"field":"patent_date","direction":"desc"}). Understanding pagination is crucial for retrieving comprehensive datasets without hitting implicit return limits. -
Field Selection: Optimize your requests by explicitly specifying the fields you need using the
fparameter. This reduces the amount of data transferred and processed, making your applications more efficient. For example,f=["patent_title","inventor_first_name"]will only return these two fields for each patent. -
Integrate into an Application: Begin integrating the API calls into your preferred programming language (Python, R, JavaScript, etc.). Most languages have robust HTTP client libraries (e.g., Python's
requestslibrary) that simplify making requests and parsing JSON responses. For example, a Python script could automate the retrieval of patent data for a list of keywords. -
Handle Rate Limiting (Implicit): While no explicit rate limits are published, implement strategies like exponential backoff or token bucket algorithms in your application to manage request frequency. This helps prevent your IP from being temporarily blocked due to an excessive number of rapid requests, ensuring consistent access to the data. For general guidance on managing API requests, consult resources like Mozilla's guide to HTTP 429 Too Many Requests.
-
Explore Other Endpoints: Beyond
/patents, investigate the/inventors,/assignees, and/locationsendpoints to access different facets of the patent ecosystem. Each endpoint offers unique data points and filtering capabilities, allowing for a holistic view of innovation trends. -
Utilize Bulk Data: For very large datasets or frequent access to the same large dataset, consider downloading the bulk data files provided by PatentsView. This can be more efficient than repeated API calls for extensive analytical projects.
Troubleshooting the first call
Encountering issues during your first API call is common. Here are some troubleshooting steps for PatentsView:
-
Check URL Syntax: Ensure your URL is correctly formed. Pay close attention to quotation marks, brackets, and parameter separation (
&). Incorrect JSON syntax within theqparameter is a frequent source of errors.# Correct: notice escaped quotes for JSON within URL GET https://api.patentsview.org/patents?q={"patent_number":"PP31100"} # Incorrect: missing quotes or incorrect escaping GET https://api.patentsview.org/patents?q={patent_number:PP31100} -
Verify Endpoint Path: Double-check that you are using the correct endpoint (e.g.,
/patents,/patents/query,/inventors). A common mistake is using a base URL without an endpoint or an incorrect endpoint name. -
Review Query Parameters: Ensure that the field names you are querying (e.g.,
patent_number,patent_title) are valid and match those specified in the PatentsView API documentation. Typos in field names will result in no data or an error. -
Inspect Network Response: Use browser developer tools (Network tab) or your HTTP client's logging to inspect the full HTTP response, including status codes and response body. A
400 Bad Requestoften indicates a malformed query, while a200 OKwith an empty data array might mean your query returned no matching results. -
Start Simple: If a complex query isn't working, simplify it. Try fetching all patents (
https://api.patentsview.org/patents) or a very broad search, then gradually add filters until the error reappears. This helps isolate the problematic part of your query. -
Check for Rate Limiting: If requests start failing after many successful ones, or if you receive a
429 Too Many Requests(though not explicitly documented by PatentsView, it's a standard HTTP status for rate limits), you might be temporarily blocked. Wait a few minutes and try again, or implement delays between your requests. -
Consult Official Documentation: The PatentsView documentation is the authoritative source for all API details, including specific examples and error explanations. Referencing it directly can resolve many common issues.