patentgrepDocs

PatentsView-compatible

Claims and text

Claims, brief summaries, detailed descriptions and drawing descriptions, one row per claim or section. g_ endpoints hold granted patents and pg_ endpoints pre-grant publications.

Send q, f, s and o as one JSON body with POST, or as JSON-encoded query parameters with GET.

Try itDemo key
POST /api/v1/g_claim/
Response200Recorded 11 Oct 2026
{
  "error": false,
  "count": 2,
  "total_hits": 18,
  "g_claims": [
    {
      "claim_number": "00001",
      "claim_text": "1. A self-protecting functional separator for a battery cell, the self…"
    },
    {
      "claim_number": "00002",
      "claim_dependent": "1",
      "claim_text": "2. The self-protecting functional separator of claim 1, wherein the na…"
    }
  ]
}

Request body

qobjectRequired

The query. A field and value matches exactly; combine clauses with _and, _or and _not. Dates use YYYY-MM-DD.

farray of stringsDefault: the endpoint's default fields

Fields to return. Name a group such as assignees to get all of its fields, or one field such as assignees.assignee_organization.

sarray of objects

Sort order, for example [{"patent_date": "desc"}]. Only sortable fields are allowed; end with a unique field to keep paging stable.

oobject
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/g_claim/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "12756070"},
    "f": ["claim_number", "claim_dependent", "claim_text"],
    "s": [{"claim_sequence": "asc"}],
    "o": {"size": 2}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/g_claim/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"patent_id": "12756070"},
          "f": ["claim_number", "claim_dependent", "claim_text"],
          "s": [{"claim_sequence": "asc"}],
          "o": {"size": 2}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/g_claim/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"patent_id": "12756070"},
    "f": ["claim_number", "claim_dependent", "claim_text"],
    "s": [{"claim_sequence": "asc"}],
    "o": {"size": 2}
  }),
});
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": {"patent_id": "12756070"},
	  "f": ["claim_number", "claim_dependent", "claim_text"],
	  "s": [{"claim_sequence": "asc"}],
	  "o": {"size": 2}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/g_claim/", 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/g_claim/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"patent_id": "12756070"},
    "f": ["claim_number", "claim_dependent", "claim_text"],
    "s": [{"claim_sequence": "asc"}],
    "o": {"size": 2}
  }
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/g_claim/

POST/api/v1/g_claim/

Rows come back in g_claims. Without f you get patent_id, claim_sequence, claim_number, claim_text, claim_dependent, exemplary.

6 fields
FieldTypeSortDescription
patent_idstringYesPatent Number.
claim_sequenceintegerYesOrder in which claims appear in patent file; values for this field begin at 0.
claim_numberstringNoContains claim number of claim formatted as 0-prefixed 5 digit number. This column will have a range of claims if those claims are cancelled.
claim_textstringNoClaim Text.
claim_dependentstringNoSequence number of claim this is dependent on. NULL if independent.
exemplaryintegerYesWhether the claim is one of the exemplary claims of the patent; 1 if exemplary claim, 0 otherwise.
curl https://api.patentgrep.com/api/v1/g_claim/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "10000000"},
    "f": [
      "patent_id",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent",
      "exemplary"
    ],
    "s": [{"patent_id": "asc"}, {"claim_sequence": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/g_claim/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"patent_id": "10000000"},
          "f": [
            "patent_id",
            "claim_sequence",
            "claim_number",
            "claim_text",
            "claim_dependent",
            "exemplary"
          ],
          "s": [{"patent_id": "asc"}, {"claim_sequence": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/g_claim/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"patent_id": "10000000"},
    "f": [
      "patent_id",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent",
      "exemplary"
    ],
    "s": [{"patent_id": "asc"}, {"claim_sequence": "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": {"patent_id": "10000000"},
	  "f": [
	    "patent_id",
	    "claim_sequence",
	    "claim_number",
	    "claim_text",
	    "claim_dependent",
	    "exemplary"
	  ],
	  "s": [{"patent_id": "asc"}, {"claim_sequence": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/g_claim/", 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/g_claim/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"patent_id": "10000000"},
    "f": [
      "patent_id",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent",
      "exemplary"
    ],
    "s": [{"patent_id": "asc"}, {"claim_sequence": "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/pg_claim/

POST/api/v1/pg_claim/

Rows come back in pg_claims. Without f you get document_number, claim_sequence, claim_number, claim_text, claim_dependent.

5 fields
FieldTypeSortDescription
document_numberstringYesUnique identifier for the Claim document.
claim_sequenceintegerYesOrder in which claims appear in patent file; values for this field begin at 0.
claim_numberstringNoContains claim number of claim formatted as 0-prefixed 5 digit number. This column will have a range of claims if those claims are cancelled.
claim_textstringNoClaim Text.
claim_dependentstringNoSequence number of claim this is dependent on. NULL if independent.
curl https://api.patentgrep.com/api/v1/pg_claim/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent"
    ],
    "s": [{"document_number": "asc"}, {"claim_sequence": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/pg_claim/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"document_number": "20180123164"},
          "f": [
            "document_number",
            "claim_sequence",
            "claim_number",
            "claim_text",
            "claim_dependent"
          ],
          "s": [
            {"document_number": "asc"},
            {"claim_sequence": "asc"}
          ],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/pg_claim/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent"
    ],
    "s": [{"document_number": "asc"}, {"claim_sequence": "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": {"document_number": "20180123164"},
	  "f": [
	    "document_number",
	    "claim_sequence",
	    "claim_number",
	    "claim_text",
	    "claim_dependent"
	  ],
	  "s": [{"document_number": "asc"}, {"claim_sequence": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/pg_claim/", 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/pg_claim/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "claim_sequence",
      "claim_number",
      "claim_text",
      "claim_dependent"
    ],
    "s": [{"document_number": "asc"}, {"claim_sequence": "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/g_brf_sum_text/

POST/api/v1/g_brf_sum_text/

Rows come back in g_brf_sum_texts. Without f you get patent_id, summary_text.

2 fields
FieldTypeSortDescription
patent_idstringYesPatent Number.
summary_textstringNoBrief summary text of the patent.
curl https://api.patentgrep.com/api/v1/g_brf_sum_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "summary_text"],
    "s": [{"patent_id": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/g_brf_sum_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"patent_id": "10000000"},
          "f": ["patent_id", "summary_text"],
          "s": [{"patent_id": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/g_brf_sum_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "summary_text"],
    "s": [{"patent_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": {"patent_id": "10000000"},
	  "f": ["patent_id", "summary_text"],
	  "s": [{"patent_id": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/g_brf_sum_text/", 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/g_brf_sum_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "summary_text"],
    "s": [{"patent_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/pg_brf_sum_text/

POST/api/v1/pg_brf_sum_text/

Rows come back in pg_brf_sum_texts. Without f you get document_number, summary_text.

2 fields
FieldTypeSortDescription
document_numberstringYesUnique identifier for the publication document.
summary_textstringNoText of the brief summary itself, excluding headings.
curl https://api.patentgrep.com/api/v1/pg_brf_sum_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"document_number": "20180123164"},
    "f": ["document_number", "summary_text"],
    "s": [{"document_number": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/pg_brf_sum_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"document_number": "20180123164"},
          "f": ["document_number", "summary_text"],
          "s": [{"document_number": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/pg_brf_sum_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"document_number": "20180123164"},
    "f": ["document_number", "summary_text"],
    "s": [{"document_number": "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": {"document_number": "20180123164"},
	  "f": ["document_number", "summary_text"],
	  "s": [{"document_number": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/pg_brf_sum_text/", 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/pg_brf_sum_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"document_number": "20180123164"},
    "f": ["document_number", "summary_text"],
    "s": [{"document_number": "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/g_detail_desc_text/

POST/api/v1/g_detail_desc_text/

Rows come back in g_detail_desc_texts. Without f you get patent_id, description_text, description_length.

3 fields
FieldTypeSortDescription
patent_idstringYesPatent Number.
description_textstringNoText of the description itself, excluding headings.
description_lengthintegerYesLength of the description text.
curl https://api.patentgrep.com/api/v1/g_detail_desc_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "description_text", "description_length"],
    "s": [{"patent_id": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/g_detail_desc_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"patent_id": "10000000"},
          "f": [
            "patent_id",
            "description_text",
            "description_length"
          ],
          "s": [{"patent_id": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/g_detail_desc_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "description_text", "description_length"],
    "s": [{"patent_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": {"patent_id": "10000000"},
	  "f": ["patent_id", "description_text", "description_length"],
	  "s": [{"patent_id": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/g_detail_desc_text/", 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/g_detail_desc_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "description_text", "description_length"],
    "s": [{"patent_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/pg_detail_desc_text/

POST/api/v1/pg_detail_desc_text/

Rows come back in pg_detail_desc_texts. Without f you get document_number, description_text, description_length.

3 fields
FieldTypeSortDescription
document_numberstringYesUnique identifier for the publication document.
description_textstringNoDetailed description text of the publication.
description_lengthintegerYesLength of the detailed description text.
curl https://api.patentgrep.com/api/v1/pg_detail_desc_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "description_text",
      "description_length"
    ],
    "s": [{"document_number": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/pg_detail_desc_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"document_number": "20180123164"},
          "f": [
            "document_number",
            "description_text",
            "description_length"
          ],
          "s": [{"document_number": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/pg_detail_desc_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "description_text",
      "description_length"
    ],
    "s": [{"document_number": "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": {"document_number": "20180123164"},
	  "f": [
	    "document_number",
	    "description_text",
	    "description_length"
	  ],
	  "s": [{"document_number": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/pg_detail_desc_text/", 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/pg_detail_desc_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "description_text",
      "description_length"
    ],
    "s": [{"document_number": "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/g_draw_desc_text/

POST/api/v1/g_draw_desc_text/

Rows come back in g_draw_desc_texts. Without f you get patent_id, draw_desc_sequence, draw_desc_text.

3 fields
FieldTypeSortDescription
patent_idstringYesPatent Number.
draw_desc_sequenceintegerYesOrder in which drawing descriptions appear in patent file, often the same as the figure id; values for this field begin at 1.
draw_desc_textstringNoText of the description itself, excluding headings.
curl https://api.patentgrep.com/api/v1/g_draw_desc_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "draw_desc_sequence", "draw_desc_text"],
    "s": [{"patent_id": "asc"}, {"draw_desc_sequence": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/g_draw_desc_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"patent_id": "10000000"},
          "f": ["patent_id", "draw_desc_sequence", "draw_desc_text"],
          "s": [{"patent_id": "asc"}, {"draw_desc_sequence": "asc"}],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/g_draw_desc_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "draw_desc_sequence", "draw_desc_text"],
    "s": [{"patent_id": "asc"}, {"draw_desc_sequence": "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": {"patent_id": "10000000"},
	  "f": ["patent_id", "draw_desc_sequence", "draw_desc_text"],
	  "s": [{"patent_id": "asc"}, {"draw_desc_sequence": "asc"}],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/g_draw_desc_text/", 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/g_draw_desc_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "draw_desc_sequence", "draw_desc_text"],
    "s": [{"patent_id": "asc"}, {"draw_desc_sequence": "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/pg_draw_desc_text/

POST/api/v1/pg_draw_desc_text/

Rows come back in pg_draw_desc_texts. Without f you get document_number, draw_desc_sequence, draw_desc_text.

3 fields
FieldTypeSortDescription
document_numberstringYesUnique identifier for the publication document.
draw_desc_sequenceintegerYesOrder in which drawing descriptions appear in patent file, often the same as the figure id; values for this field begin at 1.
draw_desc_textstringNoText of the description itself, excluding headings.
curl https://api.patentgrep.com/api/v1/pg_draw_desc_text/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "draw_desc_sequence",
      "draw_desc_text"
    ],
    "s": [
      {"document_number": "asc"},
      {"draw_desc_sequence": "asc"}
    ],
    "o": {"size": 25}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/pg_draw_desc_text/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {"document_number": "20180123164"},
          "f": [
            "document_number",
            "draw_desc_sequence",
            "draw_desc_text"
          ],
          "s": [
            {"document_number": "asc"},
            {"draw_desc_sequence": "asc"}
          ],
          "o": {"size": 25}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/pg_draw_desc_text/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "draw_desc_sequence",
      "draw_desc_text"
    ],
    "s": [
      {"document_number": "asc"},
      {"draw_desc_sequence": "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": {"document_number": "20180123164"},
	  "f": [
	    "document_number",
	    "draw_desc_sequence",
	    "draw_desc_text"
	  ],
	  "s": [
	    {"document_number": "asc"},
	    {"draw_desc_sequence": "asc"}
	  ],
	  "o": {"size": 25}
	}`)

	req, err := http.NewRequest(http.MethodPost, "https://api.patentgrep.com/api/v1/pg_draw_desc_text/", 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/pg_draw_desc_text/")

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {"document_number": "20180123164"},
    "f": [
      "document_number",
      "draw_desc_sequence",
      "draw_desc_text"
    ],
    "s": [
      {"document_number": "asc"},
      {"draw_desc_sequence": "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