patentgrepDocs

PatentsView-compatible

Patents

Query granted patents with PatentsView's PatentSearch syntax. Same parameters, operators and field names as search.patentsview.org, so existing code keeps working.

POST/api/v1/patent/

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

132 of 133 PatentsView fields are served; inventors.inventor_gender_code is not, because PatentsView infers gender from first names. Entity IDs such as inventor_id are our own. All differences

Try itDemo key
POST /api/v1/patent/
Response200Recorded 11 Oct 2026
{
  "error": false,
  "count": 2,
  "total_hits": 99,
  "patents": [
    {
      "patent_id": "12756010",
      "patent_title": "Method for manufacturing polymer solid electrolyte",
      "patent_date": "2026-10-06"
    },
    {
      "patent_id": "12756009",
      "patent_title": "Electrolyte material including oxygen-containing neutral electrophilic…",
      "patent_date": "2026-10-06"
    }
  ]
}

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.
curl https://api.patentgrep.com/api/v1/patent/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {
      "_and": [
        {"_text_all": {"patent_title": "solid electrolyte"}},
        {"_gte": {"patent_date": "2026-01-01"}}
      ]
    },
    "f": ["patent_id", "patent_title", "patent_date"],
    "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
    "o": {"size": 2}
  }'
import os, requests

resp = requests.post(
    "https://api.patentgrep.com/api/v1/patent/",
    headers={"X-Api-Key": os.environ["PATENTGREP_KEY"]},
    json={
          "q": {
            "_and": [
              {"_text_all": {"patent_title": "solid electrolyte"}},
              {"_gte": {"patent_date": "2026-01-01"}}
            ]
          },
          "f": ["patent_id", "patent_title", "patent_date"],
          "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
          "o": {"size": 2}
        },
)
resp.raise_for_status()
data = resp.json()
print(data)
const res = await fetch("https://api.patentgrep.com/api/v1/patent/", {
  headers: {
    "X-Api-Key": process.env.PATENTGREP_KEY,
    "Content-Type": "application/json",
  },
  method: "POST",
  body: JSON.stringify({
    "q": {
      "_and": [
        {"_text_all": {"patent_title": "solid electrolyte"}},
        {"_gte": {"patent_date": "2026-01-01"}}
      ]
    },
    "f": ["patent_id", "patent_title", "patent_date"],
    "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
    "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": {
	    "_and": [
	      {"_text_all": {"patent_title": "solid electrolyte"}},
	      {"_gte": {"patent_date": "2026-01-01"}}
	    ]
	  },
	  "f": ["patent_id", "patent_title", "patent_date"],
	  "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
	  "o": {"size": 2}
	}`)

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

req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = ENV.fetch("PATENTGREP_KEY")
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
  {
    "q": {
      "_and": [
        {"_text_all": {"patent_title": "solid electrolyte"}},
        {"_gte": {"patent_date": "2026-01-01"}}
      ]
    },
    "f": ["patent_id", "patent_title", "patent_date"],
    "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
    "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
Count only200o.size = 0
{
  "error": false,
  "count": 0,
  "total_hits": 602,
  "patents": []
}

Operators

OperatorMatchesFields
_eq _neqEqual or not equal. A bare value means _eq.All
_gt _gte _lt _lteGreater or less thanDates, numbers
_beginsWords starting with the valueText, names, keywords
_containsWords containing the valueText, names, keywords
_text_allEvery word, any orderText, names
_text_anyAt least one wordText, names
_text_phraseThe exact phraseText, names
_and _or _notCombine or negate clauses

A list of values matches any of them: {"patent_type": ["utility", "design"]}.

Combining clauses
{"q": {"_and": [
  {"cpc_current.cpc_subclass_id": "H01M"},
  {"_text_phrase":
    {"patent_abstract": "solid electrolyte"}},
  {"_not": {"patent_type": "design"}},
  {"_gte": {"patent_date": "2020-01-01"}}
]}}

/api/v1/patent/

POST/api/v1/patent/

Rows come back in patents. Without f you get patent_id, patent_title, patent_date. One record by id: GET /api/v1/patent/{patent_id}/.

132 fields
FieldTypeSortDescription
patent_idstringYesPatent number.
patent_titlestringNoTitle of patent.
patent_abstractstringNoThe abstract text of the patent.
patent_datedateYesDate when patent was granted.
patent_yearintegerYesYear when patent was granted.
patent_typestringNoCategory of patent. e.g. "utility", "design", etc.
wipo_kindstringNoWIPO document kind codes (http://www.uspto.gov/learning-and-resources/support-centers/electronic-business-center/kind-codes-included-uspto-patent).
withdrawnbooleanNoWhether a patent has been withdrawn or not.
gov_interest_statementstringNoText of declaration of government interest.
patent_detail_desc_lengthintegerYesThe Length of the description text in characters.
patent_earliest_application_datedateYesThe earliest filing date among all applications from which the patent claims priority.
patent_num_us_patents_citedintegerYesNumber of U.S. patents referenced (cited) by this patent.
curl https://api.patentgrep.com/api/v1/patent/ \
  -H "X-Api-Key: $PATENTGREP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": {"patent_id": "10000000"},
    "f": ["patent_id", "patent_title", "patent_date"],
    "s": [{"patent_id": "asc"}],
    "o": {"size": 25}
  }'
import os, requests

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

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

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", "patent_title", "patent_date"],
    "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

Paging with a cursor

Cursors stay fast however deep you page, and don't skip or repeat rows.

  1. Sort by the fields you want, ending with patent_id so ties are broken.
  2. Take the last row's values for those fields, in sort order.
  3. Send the same q and s with those values in o.after.
  4. Stop when a page has fewer rows than o.size.
Page 2 request
{
  "q": {"_gte": {"patent_date": "2026-01-01"}},
  "s": [{"patent_date": "desc"}, {"patent_id": "desc"}],
  "o": {"size": 2, "after": ["2026-10-06", "12756009"]}
}