/api/v1/cpc_group/
Upstream view CPCGroupList (index cpc_groups, response key cpc_groups). Any field may be null where the bulk data has no value. Default fields (f): cpc_group_id, cpc_group_title, cpc_class_id, cpc_subclass_id. Default sort (s): [{"cpc_group_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
GETPOST/api/v1/cpc_group/GETPOST/api/v1/cpc_group/{pk}/- Response key
cpc_groups- Default f
cpc_group_id,cpc_group_title,cpc_class_id,cpc_subclass_id- Default s
[{"cpc_group_id": "asc"}]- Default o
{}- q
- may be omitted (a lookup endpoint lists every record)
- Detail key
cpc_group_idin the path; a "/" in a key is written ":"
Example
curl -s -G -H "X-Api-Key: $KEY" https://patentref.io/api/v1/cpc_group/ \
--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/cpc_group/", 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["cpc_groups"][: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).
| Field | Type | Kind | Sortable | Note |
|---|---|---|---|---|
cpc_group_id | string | keyword | yes | |
cpc_group_title | string | text | ||
cpc_class_id | string | keyword | yes | |
cpc_class | string (URL) | keyword | Link to the detail record: https://patentref.io/api/v1/cpc_class/<id>/, with a "/" in the id written ":"; null when the id is null. Kind: keyword: in q this name matches the id behind the link (for example "H01" for cpc_current.cpc_class), not the URL. | |
cpc_subclass_id | string | keyword | yes | |
cpc_subclass | string (URL) | keyword | Link to the detail record: https://patentref.io/api/v1/cpc_subclass/<id>/, with a "/" in the id written ":"; null when the id is null. Kind: keyword: in q this name matches the id behind the link (for example "H01" for cpc_current.cpc_class), not the URL. |
Machine-readable: this page's data as JSON, and the operation in openapi.json (operationId CPCGroupList).