PatentRef

Data version 20261027.2, as of 2026-10-27: the build these pages were checked against. API version 1.21.0.

/api/v1/uspc_mainclass/

In data version 20261027.2 this endpoint answers 501 ERR_NOT_IMPLEMENTED: uspc_mainclasses: /api/v1/uspc_mainclass/ (each patent's USPC main classes come in its uspc_at_issue group).

Upstream view USPCMainclassList (index uspc_mainclasses, response key uspc_mainclasses). Any field may be null where the bulk data has no value. Default fields (f): uspc_mainclass_id, uspc_mainclass_title. Default sort (s): [{"uspc_mainclass_id": "asc"}]. A lookup endpoint: q may be omitted to list every record. When the build in service does not carry this endpoint's data set it answers 501 with X-Status-Reason-Code ERR_NOT_IMPLEMENTED and X-Status-Reason naming the data set.

Routes
GET POST /api/v1/uspc_mainclass/ GET POST /api/v1/uspc_mainclass/{pk}/
Response key
uspc_mainclasses
Default f
uspc_mainclass_id, uspc_mainclass_title
Default s
[{"uspc_mainclass_id": "asc"}]
Default o
{}
q
may be omitted (a lookup endpoint lists every record)
Detail key
uspc_mainclass_id in the path; a "/" in a key is written ":"

Example

curl -s -G -H "X-Api-Key: $KEY" https://patentref.io/api/v1/uspc_mainclass/ \
  --data-urlencode 'o={"size": 10}'
import json, os, requests

base_url = "https://patentref.io"
headers = {"X-Api-Key": os.environ["PATENTREF_KEY"]}
params = {"o": {"size": 10}}
r = requests.get(base_url + "/api/v1/uspc_mainclass/", headers=headers,
                 params={k: json.dumps(v) for k, v in params.items()})
r.raise_for_status()
data = r.json()
print(data["total_hits"], data["uspc_mainclasses"][:3])

Fields

Kind is how q treats the field (grammar, Field kinds). Sortable fields go in s. Nested fields are named with a dot in q and f; naming the group returns its upstream fields, and a field whose note says it is present only when f names it comes back only then. The rows of a group come in the order of their source (grammar, the response and paging).

FieldTypeKindSortableNote
uspc_mainclass_idstringkeywordyes
uspc_mainclass_titlestringtext
uspc_mainclass_first_seen_datestringdateyes
uspc_mainclass_last_seen_datestringdateyes
uspc_mainclass_years_activeintegernumberyes
uspc_mainclass_num_patentsintegernumberyes
uspc_mainclass_num_assigneesintegernumberyes
uspc_mainclass_num_inventorsintegernumberyes

Machine-readable: this page's data as JSON, and the operation in openapi.json (operationId USPCMainclassList).