Claim counts
PatentRef's addition to the grammar: counts of one granted patent's claims, in the spirit of the USPTO Patent Claims Research Dataset, whose files stop at grants of 2014. Every field is a count, or the least, mean or most of counts, and names the USPTO variable it follows. A count describes the text as printed; nothing here is a legal conclusion.
- Route
GET/api/v1/structure/counts/{patent_id}/(the trailing slash is optional)- Key
X-Api-Key, as every data path; it counts toward the monthly allowance- Built
- when it is asked for, from the patent's claim tree, by the same deterministic parser (no language model)
- Versions
counts_version,structure_version,data_version(X-Data-Version) andtext_data_version(X-Text-Data-Version)- Machine-readable
- the operation in openapi.json (operationId
StructureCounts, schemasClaimCounts,ClaimCountsPatentandClaimCountsClaim)
Example
curl -s -H "X-Api-Key: $KEY" https://patentref.io/api/v1/structure/counts/10034028/
import os, requests
base_url = "https://patentref.io"
headers = {"X-Api-Key": os.environ["PATENTREF_KEY"]}
r = requests.get(base_url + "/api/v1/structure/counts/10034028/", headers=headers)
r.raise_for_status()
counts = r.json()["counts"]
print(counts["claims"], counts["independent_claims"], counts["words_independent_min"])
# the USPTO dataset counts a claim that names another claim anywhere as dependent:
uspto_independent = counts["claims"] - counts["claims_citing_other_claims"]
How the counts are read
- GET /structure/counts/{patent_id}/ (the trailing slash is optional): the claim counts of one granted patent, {"error": false, "patent_id", "patent_unit_id", "counts_version", "structure_version", "generator", "data_version", "text_data_version", "as_of", "counts": {...}, "claim_counts": [...]}, in the spirit of the USPTO Patent Claims Research Dataset (the USPTO Office of the Chief Economist's claims data for grants of 1976 to 2014), for any grant the long-text file holds. They are counted when asked for, from the claim tree /structure/claims/ builds from the same claims: no language model, nothing stored. The answer carries X-Data-Version and X-Text-Data-Version.
- counts, in this order (the columns of the claim counts snapshot after patent_id): {"claims", "independent_claims", "dependent_claims", "claims_citing_other_claims", "multiple_dependent_claims", "cancelled_claims", "words", "words_first_claim", "words_independent_total", "words_independent_min", "words_independent_mean", "words_independent_max", "words_dependent_total", "words_dependent_min", "words_dependent_mean", "characters", "elements_independent_min", "elements_independent_mean", "elements_independent_max", "dependency_depth_max", "consisting_words", "or_words", "selected_from_phrases"}. Every field is a count, or the least, mean (to two decimals) or most of counts; a least, mean or most is null when the patent has no claim of that kind.
- claim_counts: one entry per claim, in claim order: {"number", "sequence", "words", "characters", "elements", "wherein_clauses", "parent_claims", "cited_claims", "dependency_depth", "consisting_words", "or_words", "selected_from_phrases", "cancelled"}.
- The rules: independent_claims and dependent_claims follow the claim tree, so a claim that names another claim only in its body ("a system that performs the method of claim 1") stays independent; claims_citing_other_claims follows the USPTO dataset's rule (a claim whose text names another claim anywhere is dependent), so the USPTO's independent count is claims minus claims_citing_other_claims. Words and characters are counted after a claim's number prefix. A word is a run of characters between white space with at least one letter or digit, so a comma or bracket the long text sets off with spaces is not a word; characters count each run of white space as one space and no space before a comma, semicolon, colon, full stop or closing bracket or after an opening bracket. A claim whose whole text is a cancellation note ("(canceled)") counts only in cancelled_claims. dependency_depth is 0 for an independent claim and 1 more than the deepest claim it depends on. consisting_words, or_words and selected_from_phrases count those words as the USPTO dataset's cns_ct, or_ct and sf_ct do. Each field and the USPTO variable it follows: https://patentref.io/docs/claim-counts.html and the ClaimCountsPatent and ClaimCountsClaim schemas of openapi.json.
- Checked against the USPTO files (BigQuery patents-public-data.uspto_oce_claims) on 1,000 random grants of 1976 to 2014, of which the files hold 898 (they hold no design or plant patents): the claims of a patent are equal for 99.8 percent of patents; the USPTO rule's independent and dependent counts are equal for 98.9 and 99.1 percent of patents; a claim's words are within 2 words or 2 percent of the USPTO count for 93.0 percent of claims (97.7 percent for grants from 2002), and the shortest independent claim is within 2 words or 5 percent for 92.1 percent of patents. For grants from 2002 on the USPTO files count a claim's number ("1.") as a word when their claim text starts with it, and the comparison takes that word off their counts first; their texts of 1976 to 2001 often run two words together at a comma, semicolon or colon, so their word counts for those years run lower than these.
- counts_version names the fields and their rules ("1") and goes up when either changes. Cache an answer under counts_version, structure_version, data_version and text_data_version together.
- Limits and errors are the claim tree's: a claim set over 1,000 claim rows or 1,000,000 characters, or a read over 5 s, answers 500 ERR_ES; a string that is not a patent number is 400 ERR_Q; a patent the data in service does not have, and one without claim text in the long-text file, answer 404 {"error": true} with X-Status-Reason-Code NOT_FOUND and X-Status-Reason saying which; with no long-text file in service the path answers 501 ERR_NOT_IMPLEMENTED.
- Example: GET /structure/counts/10034028/ with X-Api-Key. Its counts:
{"claims": 18, "independent_claims": 3, "dependent_claims": 15, "claims_citing_other_claims": 16, "multiple_dependent_claims": 0, "cancelled_claims": 0, "words": 1245, "words_first_claim": 262, "words_independent_total": 575, "words_independent_min": 153, "words_independent_mean": 191.67, "words_independent_max": 262, "words_dependent_total": 670, "words_dependent_min": 15, "words_dependent_mean": 44.67, "characters": 7381, "elements_independent_min": 4, "elements_independent_mean": 5.33, "elements_independent_max": 8, "dependency_depth_max": 4, "consisting_words": 0, "or_words": 13, "selected_from_phrases": 0}
The patent's counts
| Field | Type | What it counts | USPTO dataset variable |
|---|---|---|---|
claims | integer | Claims of the patent in the long-text file, a claim whose whole text is a cancellation note left out. It is independent_claims plus dependent_claims. | pat_clm_ct plus pat_dep_clm_ct (document_stats) |
independent_claims | integer | Claims with no dependency in the claim tree: no claim named in the preamble, and none in the dependent field of the long text either. A claim that names another claim only in its body ("a system that performs the method of claim 1") counts here. | pat_clm_ct, which counts a claim as independent only when its text names no other claim anywhere; that count is claims minus claims_citing_other_claims |
dependent_claims | integer | Claims with a dependency in the claim tree: parent_claims of 1 or more. | pat_dep_clm_ct (see claims_citing_other_claims) |
claims_citing_other_claims | integer | Claims whose text names at least one other claim, in the preamble or in the body. This is the rule the USPTO dataset uses to call a claim dependent. | pat_dep_clm_ct |
multiple_dependent_claims | integer | Claims that depend on more than one claim. | no counterpart |
cancelled_claims | integer | Claims whose whole text is a cancellation note, such as "(canceled)"; they are left out of every other count. | none for grants; the USPTO dataset leaves cancelled claims out of its counts |
words | integer | Words of the claims, each claim counted after its number prefix. A word is a run of characters between white space with at least one letter or digit: a comma or bracket set off by spaces is not a word. | the sum of word_ct over the claims (claims_stats); for grants from 2002 on the USPTO files also count the claim's number ("1.") as a word when their claim text starts with it |
words_first_claim | integer | Words of the first claim in claim order; null when the patent has no claim. | word_ct of the first claim (claims_stats) |
words_independent_total | integer | Words of the independent claims together. | pat_wrd_ct |
words_independent_min | integer | Words of the shortest independent claim; null without an independent claim. | pat_wrd_min (the length of the shortest independent claim) |
words_independent_mean | number | Mean words per independent claim, to two decimals; null without an independent claim. | pat_wrd_avg |
words_independent_max | integer | Words of the longest independent claim; null without an independent claim. | no counterpart |
words_dependent_total | integer | Words of the dependent claims together, each counted on its own text: the words of the claims it refers to are not added. | pat_dep_wrd_ct, which also counts a dependent claim's own words only |
words_dependent_min | integer | Words of the shortest dependent claim; null without a dependent claim. | pat_dep_wrd_min |
words_dependent_mean | number | Mean words per dependent claim, to two decimals; null without a dependent claim. | pat_dep_wrd_avg |
characters | integer | Characters of the claims, each claim counted after its number prefix with its spacing made regular: each run of white space counts as one space, and no space counts before a comma, semicolon, colon, full stop or closing bracket or after an opening bracket. | the sum of char_ct over the claims (claims_stats; the USPTO codebook does not define char_ct further, and for grants from 2002 on it also counts the claim's number and its full stop when the claim text starts with them) |
elements_independent_min | integer | Elements of the independent claim with the fewest. An element is a part of the body after the transition word, split at semicolons and colons as the claim tree splits it; wherein clauses are not elements. Null without an independent claim. | no counterpart |
elements_independent_mean | number | Mean elements per independent claim, to two decimals; null without an independent claim. | no counterpart |
elements_independent_max | integer | Elements of the independent claim with the most; null without an independent claim. | no counterpart |
dependency_depth_max | integer | The longest chain of dependencies: 0 when every claim is independent, 1 when every dependent claim depends directly on an independent claim, 2 when one depends on a claim at depth 1, and so on. | no counterpart |
consisting_words | integer | Times the word "consisting" appears in the claims. | the sum of cns_ct over the claims |
or_words | integer | Times the word "or" appears in the claims. | the sum of or_ct over the claims |
selected_from_phrases | integer | Times the words "selected from" appear together in the claims. | the sum of sf_ct over the claims |
A claim's counts
| Field | Type | What it counts | USPTO dataset variable |
|---|---|---|---|
number | integer | The claim's number, as the claim tree gives it. | claim_no |
sequence | integer | The claim's place in the long text, from 0. | no counterpart |
words | integer | Words of the claim after its number prefix (see the patent's words). | word_ct |
characters | integer | Characters of the claim after its number prefix, its spacing made regular (see the patent's characters). | char_ct |
elements | integer | Elements of the claim (see elements_independent_min). | no counterpart |
wherein_clauses | integer | Wherein clauses of the claim, the parts of the body the claim tree reads as one. | no counterpart |
parent_claims | integer | Claims this claim depends on in the claim tree; 0 for an independent claim. | no counterpart |
cited_claims | integer | Other claims the claim's text names, in the preamble or the body. | the claims in dependencies (claims_fulltext); ind_flg is 1 when there are none |
dependency_depth | integer | The claim's place in the longest chain of dependencies above it: 0 for an independent claim, 1 for a claim that depends on one, and so on. | no counterpart |
consisting_words | integer | Times the word "consisting" appears in the claim. | cns_ct |
or_words | integer | Times the word "or" appears in the claim. | or_ct |
selected_from_phrases | integer | Times the words "selected from" appear together in the claim. | sf_ct |
cancelled | integer | 1 when the claim's whole text is a cancellation note, else 0; a cancelled claim is in no patent count but cancelled_claims. | no counterpart |
Checked against the USPTO files
The USPTO Patent Claims Research Dataset is in BigQuery's public patents data as patents-public-data.uspto_oce_claims. On 1,000 grants of 1976 to 2014 drawn at random from the data in service (data version 20261027.2, long-text file 20261006.4), the USPTO files hold 898; they hold no design or plant patents. The tolerance was set on an earlier sample of 1,000 and checked on this one. For grants from 2002 on, the USPTO files count a claim's number as a word, and as characters, when their claim text starts with it, and the comparison takes it off their counts first. Their texts of 1976 to 2001 often run two words together at a comma, semicolon or colon, so their word counts for those years run lower than these.
| Count | Compared per | Agreement | Stated tolerance | Measured |
|---|---|---|---|---|
| The claims of a patent (pat_clm_ct plus pat_dep_clm_ct) | patent | equal | 99 percent | 99.78 percent |
| Claims that name no other claim (pat_clm_ct) | patent | equal | 97 percent | 98.89 percent |
| Claims that name another claim (pat_dep_clm_ct) | patent | equal | 97 percent | 99.11 percent |
| A claim names no other claim (ind_flg) | claim | equal | 99 percent | 99.95 percent |
| Words of a claim (word_ct) | claim | within 2 words or 2 percent | 90 percent | 92.96 percent |
| Words of a claim, grants of 2002 to 2014 | claim | within 2 words or 2 percent | 95 percent | 97.66 percent |
| Characters of a claim (char_ct) | claim | within 2 or 2 percent | 90 percent | 97.73 percent |
| Times "or" appears in a claim (or_ct) | claim | equal | 98 percent | 98.95 percent |
| Times "consisting" appears in a claim (cns_ct) | claim | equal | 98 percent | 100 percent |
| Times "selected from" appears in a claim (sf_ct) | claim | equal | 98 percent | 99.96 percent |
| Words of the shortest independent claim (pat_wrd_min) | patent | within 2 words or 5 percent | 85 percent | 92.09 percent |
| The same, grants of 2002 to 2014 | patent | within 2 words or 2 percent | 90 percent | 93.16 percent |
| Mean words per independent claim (pat_wrd_avg) | patent | within 2 words or 5 percent | 85 percent | 93.1 percent |
Errors keep the upstream form, with X-Status-Reason and X-Status-Reason-Code; send Accept: application/problem+json for RFC 9457 problem details. The codes are on the keys, limits and errors page and at /docs/errors/NOT_FOUND.