- About
- Methods & Sources
- Community
API Endpoints menu
USPC Beta Endpoints
GET /api/v1/uspc_mainclass/?
POST /api/v1/uspc_mainclass/
GET /api/v1/uspc_mainclass/{uspc_mainclass_id}/
GET /api/v1/uspc_subclass/?
POST /api/v1/uspc_subclass/
GET /api/v1/uspc_subclass/{uspc_subclass_id}/
This will search for USPC mainclasses or USPC subclasses matching the query string (q) and returning the data fields listed in the field string (f) sorted by the fields in the sort string (s) using options provided in the option string (o).
Either the HTTP GET, or POST method can be used; however, when the query parameters exceed a reasonable size (around 2,000 characters), then the POST method may be preferable. When using the POST method, the query parameters should be embedded within a JSON string within the request body.
Requests using the lookup version of the GET endpoint must include a single USPC mainclass ID or USPC subclass ID and will use the default f, s, and o options.
A request may be submitted with an empty query string. This will return all records
Name | Description | Defaults | Details |
---|---|---|---|
q | JSON formatted object containing the query parameters. See below for details on formatting this object. Note that when using the GET method, in order to form a valid URL, the slash in the USPC subclass ID should be replaced by a colon. |
String, required |
|
f | JSON formatted array of fields to include in the results. | If not provided, USPC mainclass defaults to uspc_mainclass_id and uspc_mainclass_title, and USPC subclass defaults to uspc_subclass_id, uspc_subclass_title, and uspc_mainclass_id. |
String, optional |
s | JSON formatted array of objects to sort the results. | If not provided, USPC mainclass defaults to uspc_mainclass_id, and USPC subclass defaults to uspc_subclass_id. |
String, optional |
o |
JSON formatted object of options to modify the results. Use these to page through results. Available options are: |
Size: Defaults to 100. Offset: Defaults to 0. |
String, optional |
Examples of complete API calls using the GET verb:
https://search.patentsview.org/api/v1/uspc_mainclass/?q={"uspc_mainclass_id":"100"}&f=["uspc_mainclass_id", "uspc_mainclass_title", "uspc_mainclass_num_patents"]
https://search.patentsview.org/api/v1/uspc_subclass/?q={"uspc_subclass_id":"100/1"}&f=["uspc_subclass_id", "uspc_subclass_title"]
Examples of the equivalent API calls using the POST verb:
https://search.patentsview.org/api/v1/uspc_mainclass/
https://search.patentsview.org/api/v1/uspc_subclass/
with the bodies containing, respectively:
{"q":{"uspc_mainclass_id":"100"},"f":["uspc_mainclass_id", "uspc_mainclass_title", "uspc_mainclass_num_patents"]}
{"q":{"uspc_subclass_id":"100/1"},"f":["uspc_subclass_id", "uspc_subclass_title"]}
Example of API calls using the lookup endpoint:
https://search.patentsview.org/api/v1/uspc_mainclass/100/
https://search.patentsview.org/api/v1/uspc_subclass/100:1/
Examples
Return the USPC mainclass title and number of patents for mainclasses that were last seen before 2015:
https://search.patentsview.org/api/v1/uspc_mainclass/?q={"_lte":{"uspc_mainclass_last_seen_date":"2015-01-01"}}&f= ["uspc_mainclass_title", "uspc_mainclass_num_patents"]
Return the id and title of all subclasses under a given USPC mainclass:
https://search.patentsview.org/api/v1/uspc_subclass/?q={"uspc_mainclass_id":"984"}&f=["uspc_subclass_id", "uspc_subclass_title"]
USPC Mainclass and Subclass Field Lists
The endpoint's field list can be viewed at the bottom of the webpage on the API's Swagger interface.