PatentsView-compatible
Classification
CPC classes, subclasses and groups, IPC, USPC main classes and subclasses, and WIPO fields, each with titles and patent counts.
Send q, f, s and o as one JSON body with POST, or as JSON-encoded query parameters with GET.
{
"error": false,
"count": 1,
"total_hits": 1,
"cpc_subclasses": [
{
"cpc_subclass_id": "H01M",
"cpc_subclass_title": "PROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMI…",
"cpc_subclass_num_patents": 108332
}
]
}Request body
The query. A field and value matches exactly; combine clauses with _and, _or and _not. Dates use YYYY-MM-DD.
Fields to return. Name a group such as assignees to get all of its fields, or one field such as assignees.assignee_organization.
Sort order, for example [{"patent_date": "desc"}]. Only sortable fields are allowed; end with a unique field to keep paging stable.
sizeRows per page. Default 100, up to 1,000. 0 returns only the count.afterCursor: the last row's sort values, in sort order.offsetSkip rows. Don't combine with after.Operators and cursor paging work as on Patents.
curl https://api.patentgrep.com/api/v1/cpc_subclass/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"cpc_subclass_id": "H01M"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_subclass_num_patents"
]
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/cpc_subclass/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"cpc_subclass_id": "H01M"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_subclass_num_patents"
]
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/cpc_subclass/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"cpc_subclass_id": "H01M"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_subclass_num_patents"
]
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"cpc_subclass_id": "H01M"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_subclass_num_patents"
]
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/cpc_subclass/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/cpc_subclass/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"cpc_subclass_id": "H01M"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_subclass_num_patents"
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/cpc_class/
Rows come back in cpc_classes. Without f you get cpc_class_id, cpc_class_title, cpc_class_first_seen_date. One record by id: GET /api/v1/cpc_class/{cpc_class_id}/.
| Field | Type | Sort | Description |
|---|---|---|---|
cpc_class_id | string | Yes | The three-character symbol for this Cooperative Patent Classification (CPC) Class. |
cpc_class_title | string | No | The descriptive title for this CPC Class. |
cpc_class_first_seen_date | date | Yes | The publication date for the first patent to be assigned this class. |
cpc_class_last_seen_date | date | Yes | The publication date for the most recent patent to be assigned this class. |
cpc_class_years_active | integer | Yes | The length of time in years over which this class has been in use. |
cpc_class_num_patents | integer | Yes | The number of patents to which this class is assigned. |
cpc_class_num_assignees | integer | Yes | The number of unique assignees that appear on patents assigned this class. |
cpc_class_num_inventors | integer | Yes | The number of unique inventors that appear on patents assigned this class. |
curl https://api.patentgrep.com/api/v1/cpc_class/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"cpc_class_id": "example-id"},
"f": [
"cpc_class_id",
"cpc_class_title",
"cpc_class_first_seen_date"
],
"s": [{"cpc_class_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/cpc_class/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"cpc_class_id": "example-id"},
"f": [
"cpc_class_id",
"cpc_class_title",
"cpc_class_first_seen_date"
],
"s": [{"cpc_class_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/cpc_class/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"cpc_class_id": "example-id"},
"f": [
"cpc_class_id",
"cpc_class_title",
"cpc_class_first_seen_date"
],
"s": [{"cpc_class_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"cpc_class_id": "example-id"},
"f": [
"cpc_class_id",
"cpc_class_title",
"cpc_class_first_seen_date"
],
"s": [{"cpc_class_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/cpc_class/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/cpc_class/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"cpc_class_id": "example-id"},
"f": [
"cpc_class_id",
"cpc_class_title",
"cpc_class_first_seen_date"
],
"s": [{"cpc_class_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/cpc_subclass/
Rows come back in cpc_subclasses. Without f you get cpc_subclass_id, cpc_subclass_title, cpc_class_id. One record by id: GET /api/v1/cpc_subclass/{cpc_subclass_id}/.
| Field | Type | Sort | Description |
|---|---|---|---|
cpc_subclass_id | string | Yes | ID for the CPC subclass. |
cpc_subclass_title | string | No | Title or description of the CPC subclass. |
cpc_class_id | string | No | CPC “class” symbol. |
cpc_class | string | No | Name or description of the CPC class. |
cpc_subclass_first_seen_date | date | Yes | Date when the CPC subclass was first recorded. |
cpc_subclass_last_seen_date | date | Yes | Date when the CPC subclass was last recorded. |
cpc_subclass_years_active | integer | Yes | Number of years the CPC subclass has been active. |
cpc_subclass_num_patents | integer | Yes | Number of patents associated with the CPC subclass. |
cpc_subclass_num_assignees | integer | Yes | Number of assignees associated with the CPC subclass. |
cpc_subclass_num_inventors | integer | Yes | Number of inventors associated with the CPC subclass. |
curl https://api.patentgrep.com/api/v1/cpc_subclass/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"cpc_subclass_id": "example-id"},
"f": ["cpc_subclass_id", "cpc_subclass_title", "cpc_class_id"],
"s": [{"cpc_subclass_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/cpc_subclass/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"cpc_subclass_id": "example-id"},
"f": [
"cpc_subclass_id",
"cpc_subclass_title",
"cpc_class_id"
],
"s": [{"cpc_subclass_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/cpc_subclass/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"cpc_subclass_id": "example-id"},
"f": ["cpc_subclass_id", "cpc_subclass_title", "cpc_class_id"],
"s": [{"cpc_subclass_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"cpc_subclass_id": "example-id"},
"f": ["cpc_subclass_id", "cpc_subclass_title", "cpc_class_id"],
"s": [{"cpc_subclass_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/cpc_subclass/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/cpc_subclass/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"cpc_subclass_id": "example-id"},
"f": ["cpc_subclass_id", "cpc_subclass_title", "cpc_class_id"],
"s": [{"cpc_subclass_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/cpc_group/
Rows come back in cpc_groups. Without f you get cpc_group_id, cpc_group_title, cpc_subclass_id. One record by id: GET /api/v1/cpc_group/{cpc_group_id}/, writing / in the id as :.
| Field | Type | Sort | Description |
|---|---|---|---|
cpc_group_id | string | Yes | Unique identifier for the CPC group. |
cpc_group_title | string | No | Title or description of the CPC group. |
cpc_subclass_id | string | No | CPC "subclass" symbol to which the group belongs. |
cpc_subclass | string | No | Name or description of the CPC subclass to which the group belongs. |
cpc_class_id | string | No | CPC "class" symbol to which the group belongs. |
cpc_class | string | No | Name or description of the CPC class. |
curl https://api.patentgrep.com/api/v1/cpc_group/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"cpc_group_id": "example-id"},
"f": ["cpc_group_id", "cpc_group_title", "cpc_subclass_id"],
"s": [{"cpc_group_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/cpc_group/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"cpc_group_id": "example-id"},
"f": [
"cpc_group_id",
"cpc_group_title",
"cpc_subclass_id"
],
"s": [{"cpc_group_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/cpc_group/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"cpc_group_id": "example-id"},
"f": ["cpc_group_id", "cpc_group_title", "cpc_subclass_id"],
"s": [{"cpc_group_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"cpc_group_id": "example-id"},
"f": ["cpc_group_id", "cpc_group_title", "cpc_subclass_id"],
"s": [{"cpc_group_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/cpc_group/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/cpc_group/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"cpc_group_id": "example-id"},
"f": ["cpc_group_id", "cpc_group_title", "cpc_subclass_id"],
"s": [{"cpc_group_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/ipc/
Rows come back in ipcr. Without f you get ipc_id, ipc_section, ipc_class. One record by id: GET /api/v1/ipc/{ipc_id}/.
| Field | Type | Sort | Description |
|---|---|---|---|
ipc_id | string | Yes | PatentsView-internal ID for the IPC entry. |
ipc_section | string | No | Top-level IPC section (A–H). |
ipc_class | string | No | Class portion of the International Patent Classification. |
ipc_subclass | string | No | Specific subclass symbol within the section (e.g., G06). |
curl https://api.patentgrep.com/api/v1/ipc/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"ipc_id": "example-id"},
"f": ["ipc_id", "ipc_section", "ipc_class"],
"s": [{"ipc_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/ipc/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"ipc_id": "example-id"},
"f": ["ipc_id", "ipc_section", "ipc_class"],
"s": [{"ipc_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/ipc/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"ipc_id": "example-id"},
"f": ["ipc_id", "ipc_section", "ipc_class"],
"s": [{"ipc_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"ipc_id": "example-id"},
"f": ["ipc_id", "ipc_section", "ipc_class"],
"s": [{"ipc_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/ipc/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/ipc/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"ipc_id": "example-id"},
"f": ["ipc_id", "ipc_section", "ipc_class"],
"s": [{"ipc_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/uspc_mainclass/
Rows come back in uspc_mainclasses. Without f you get uspc_mainclass_id, uspc_mainclass_title, uspc_mainclass_first_seen_date. One record by id: GET /api/v1/uspc_mainclass/{uspc_mainclass_id}/.
| Field | Type | Sort | Description |
|---|---|---|---|
uspc_mainclass_id | string | Yes | ID for the main U.S. classification at issue. |
uspc_mainclass_title | string | No | Description of uspc mainclass. |
uspc_mainclass_first_seen_date | date | Yes | Date when the main U.S. classification was first recorded. |
uspc_mainclass_last_seen_date | date | Yes | Date when the main U.S. classification was last recorded. |
uspc_mainclass_years_active | integer | Yes | Number of years the main U.S. classification has been active. |
uspc_mainclass_num_patents | integer | Yes | Number of patents associated with the main U.S. classification. |
uspc_mainclass_num_assignees | integer | Yes | Number of assignees associated with the main U.S. classification. |
uspc_mainclass_num_inventors | integer | Yes | Number of inventors associated with the main U.S. classification. |
curl https://api.patentgrep.com/api/v1/uspc_mainclass/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"uspc_mainclass_id": "example-id"},
"f": [
"uspc_mainclass_id",
"uspc_mainclass_title",
"uspc_mainclass_first_seen_date"
],
"s": [{"uspc_mainclass_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/uspc_mainclass/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"uspc_mainclass_id": "example-id"},
"f": [
"uspc_mainclass_id",
"uspc_mainclass_title",
"uspc_mainclass_first_seen_date"
],
"s": [{"uspc_mainclass_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/uspc_mainclass/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"uspc_mainclass_id": "example-id"},
"f": [
"uspc_mainclass_id",
"uspc_mainclass_title",
"uspc_mainclass_first_seen_date"
],
"s": [{"uspc_mainclass_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"uspc_mainclass_id": "example-id"},
"f": [
"uspc_mainclass_id",
"uspc_mainclass_title",
"uspc_mainclass_first_seen_date"
],
"s": [{"uspc_mainclass_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/uspc_mainclass/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/uspc_mainclass/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"uspc_mainclass_id": "example-id"},
"f": [
"uspc_mainclass_id",
"uspc_mainclass_title",
"uspc_mainclass_first_seen_date"
],
"s": [{"uspc_mainclass_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/uspc_subclass/
Rows come back in uspc_subclasses. Without f you get uspc_subclass_id, uspc_subclass_title, uspc_mainclass_id. One record by id: GET /api/v1/uspc_subclass/{uspc_subclass_id}/, writing / in the id as :.
| Field | Type | Sort | Description |
|---|---|---|---|
uspc_subclass_id | string | Yes | ID for the subclass. |
uspc_subclass_title | string | No | The description of the uspc subclass. |
uspc_mainclass_id | string | No | ID for the main U.S. classification at issue. |
uspc_mainclass | string | No | The main U.S. classification (class) at issue. |
curl https://api.patentgrep.com/api/v1/uspc_subclass/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"uspc_subclass_id": "example-id"},
"f": [
"uspc_subclass_id",
"uspc_subclass_title",
"uspc_mainclass_id"
],
"s": [{"uspc_subclass_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/uspc_subclass/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"uspc_subclass_id": "example-id"},
"f": [
"uspc_subclass_id",
"uspc_subclass_title",
"uspc_mainclass_id"
],
"s": [{"uspc_subclass_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/uspc_subclass/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"uspc_subclass_id": "example-id"},
"f": [
"uspc_subclass_id",
"uspc_subclass_title",
"uspc_mainclass_id"
],
"s": [{"uspc_subclass_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"uspc_subclass_id": "example-id"},
"f": [
"uspc_subclass_id",
"uspc_subclass_title",
"uspc_mainclass_id"
],
"s": [{"uspc_subclass_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/uspc_subclass/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/uspc_subclass/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"uspc_subclass_id": "example-id"},
"f": [
"uspc_subclass_id",
"uspc_subclass_title",
"uspc_mainclass_id"
],
"s": [{"uspc_subclass_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data/api/v1/wipo/
Rows come back in wipo. Without f you get wipo_id, sector_title, field_title. One record by id: GET /api/v1/wipo/{wipo_id}/.
| Field | Type | Sort | Description |
|---|---|---|---|
wipo_id | string | Yes | Unique identifier for the WIPO entry. |
sector_title | string | No | WIPO technology sector title. |
field_title | string | No | WIPO technology field title. |
curl https://api.patentgrep.com/api/v1/wipo/ \
-H "X-Api-Key: $PATENTGREP_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": {"wipo_id": "example-id"},
"f": ["wipo_id", "sector_title", "field_title"],
"s": [{"wipo_id": "asc"}],
"o": {"size": 25}
}'import os, requests
resp = requests.post(
"https://api.patentgrep.com/api/v1/wipo/",
headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
json={
"q": {"wipo_id": "example-id"},
"f": ["wipo_id", "sector_title", "field_title"],
"s": [{"wipo_id": "asc"}],
"o": {"size": 25}
},
)
resp.raise_for_status()
data = resp.json()
print(data)const res = await fetch("https://api.patentgrep.com/api/v1/wipo/", {
headers: {
"X-Api-Key": process.env.PATENTGREP_KEY,
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
"q": {"wipo_id": "example-id"},
"f": ["wipo_id", "sector_title", "field_title"],
"s": [{"wipo_id": "asc"}],
"o": {"size": 25}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"q": {"wipo_id": "example-id"},
"f": ["wipo_id", "sector_title", "field_title"],
"s": [{"wipo_id": "asc"}],
"o": {"size": 25}
}`)
req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/wipo/", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", os.Getenv("PATENTGREP_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode != http.StatusOK {
panic(fmt.Sprintf("%s: %s", res.Status, data))
}
fmt.Println(string(data))
}require "json"
require "net/http"
uri = URI("https://api.patentgrep.com/api/v1/wipo/")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"q": {"wipo_id": "example-id"},
"f": ["wipo_id", "sector_title", "field_title"],
"s": [{"wipo_id": "asc"}],
"o": {"size": 25}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "#{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
data = JSON.parse(res.body)
p data