PatentRef

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

/api/v1/location/

Upstream view LocationList (index locations, response key locations). Any field may be null where the bulk data has no value. Default fields (f): location_id, location_name, location_state, location_country. Default sort (s): [{"location_id": "asc"}]. 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/location/ GET POST /api/v1/location/{pk}/
Response key
locations
Default f
location_id, location_name, location_state, location_country
Default s
[{"location_id": "asc"}]
Default o
{}
q
required on the list route
Detail key
location_id in the path; a "/" in a key is written ":"

Example

curl -s -G -H "X-Api-Key: $KEY" https://patentref.io/api/v1/location/ \
  --data-urlencode 'q={"location_country": "US"}'
import json, os, requests

base_url = "https://patentref.io"
headers = {"X-Api-Key": os.environ["PATENTREF_KEY"]}
params = {"q": {"location_country": "US"}}
r = requests.get(base_url + "/api/v1/location/", 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["locations"][: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
location_idstringkeywordyes
location_namestringtext with a keyword formyes
location_countystringtext with a keyword formyes
location_county_fipsstringkeywordyes
location_statestringtext with a keyword formyes
location_state_fipsstringkeywordyes
location_countrystringtext with a keyword formyesAn ISO 3166-1 alpha-2 country code in capitals, as PatentsView gives it: the United Kingdom is "GB", and "UK" matches nothing.
location_place_typestringkeywordyes
location_latitudenumbernumberyes
location_longitudenumbernumberyes
location_num_assigneesnumbernumberyes
location_num_patentsnumbernumberyes
location_num_inventorsnumbernumberyes

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