Patent search query builder
Enter concepts and synonyms once. Get the query written for each patent database’s own syntax, with proximity, truncation and classes.
One search, four databases
Describe the invention as groups of synonyms. The builder writes the query for USPTO Patent Public Search, Espacenet, Google Patents and The Lens, and says what it had to change for each.
Try an example
The same feature, four syntaxes
| Feature | Patent Public Search | Espacenet | Google Patents | The Lens |
|---|---|---|---|---|
| Title / abstract / claims | x.ti. x.ab. x.clm. | ti= ab= claims= (ta, ctxt) | TI= AB= CL= | title: abstract: claim: |
| Full text | no field code | ftxt= | no prefix | full_text: |
| Any characters | $ or * | * (3+ letters first) | * or $ | * |
| One character | ? | # (? = zero or one) | # (? = zero or one) | ? |
| Phrase | a ADJ b | "a b" | "a b" | "a b" |
| Within n words | NEARn (≤ 450), ADJn ordered | prox/distance<=n (n ≤ 10) | NEAR/n — ranking only | "a b"~n, word pairs |
| CPC with subgroups | H01M50/$.cpc. | cpc=H01M50 | CPC=H01M50/low | class_cpc.symbol:H01M50\/* |
| Date range | @pd>=20150101<=20201231 | pd within "20150101,20201231" | Search fields (link) | date_published:[2015-01-01 TO 2020-12-31] |
How the query builder works
You describe a search once, as concept groups: each group holds the synonyms and phrases for one idea of the invention, one per line. Terms inside a group are joined with OR, and the groups are joined with AND. A group can instead be marked exclude; all excluded groups go into one NOT at the end. You can then ask for two groups to appear within a number of words of each other, choose the fields to search, add CPC classes, a date range, countries and granted patents or applications.
The builder writes the same search in the syntax of four databases, side by side: USPTO Patent Public Search, Espacenet, Google Patents and The Lens. Each query has a copy button, and an open button for the three databases that take a query in their web address. Under each query, the notes say what the builder had to change because that database works differently: those notes are the point of the tool. A query that silently means something else in another database is worse than no query.
The three example searches checked on December 3, 2026 returned results in Espacenet, Google Patents and The Lens through the links the builder writes. Patent Public Search has no search address, so its query has to be pasted.
How the four databases differ
| Patent Public Search | Espacenet | Google Patents | The Lens | |
|---|---|---|---|---|
| Fields | .ti. .ab. .clm.; no code = whole document | ti ab claims ta ctxt ftxt | TI= AB= CL= | title abstract claim full_text |
| Truncation | $ or * any number, ? one character, $n up to n | * (at least 3 characters before it), ? zero or one, # exactly one | * or $, ? zero or one, # exactly one, single words only | * and ?, not stemmed |
| Proximity | NEARn (any order), ADJn (in order), n up to 450 | prox/distance<=n, n from 1 to 10, /ordered | NEAR/n, ADJ/n — ranking only | "a b"~n between words, no wildcards inside |
| CPC | H01M50/40.cpc. | cpc=H01M50, subgroup with /low | CPC=H01M50/low | class_cpc.symbol: |
| Dates | @pd>=20150101<=20201231 | pd within "2015,2020" (publication only) | Search fields, set by the link | date_published:[… TO …] |
| Countries | US documents only | pn any "US EP" | Search fields, set by the link | jurisdiction:(US OR EP) |
What the builder does about each difference:
- Proximity in Espacenet. Espacenet's proximity operator takes two terms, and the distance must be 1 to 10 words (proximity operator). A test with OR lists inside a proximity clause returned no documents, so the builder writes one clause per pair of terms and joins them with OR. Above 40 pairs, or above 10 words, it falls back to a plain AND (or to 10 words) and says so.
- Proximity in Google Patents. Google's help page says proximity operators only change the ranking of results, not which documents are found (Google Patents search help). The builder still writes
NEAR/n, because the closest matches come first, and warns that the count is the same as with AND. - Proximity in The Lens. The Lens writes proximity as a quoted phrase with a slop,
"a b"~n; wildcards do not work inside a phrase (Lens search syntax). The builder writes one phrase per pair of terms and drops the wildcards inside them. The Lens has no ordered proximity, so "in this order" is not kept there. - Truncation. Espacenet needs at least three characters before
*and has no left truncation (truncation); a shorter stem is searched without the wildcard. In Espacenet and Google,?means zero or one character, so the builder writes#for exactly one. In Patent Public Search the builder writes$for any number of characters, as the USPTO's quick reference guide shows (Advanced Search overview). - Phrases in Patent Public Search. Patent Public Search has no quoted phrases; words written next to each other are joined by ADJ, its default operator, so
"motion sensor"becomes(motion ADJ sensor). Words such as and, or or near inside a phrase would be read as operators, so they are dropped, with a note. - NOT in Espacenet. Espacenet allows NOT only once per query and evaluates operators from left to right (Boolean operators), so all excluded groups share one NOT at the end, and every group is wrapped in parentheses.
- CPC classes. A subclass or main group is searched with everything below it:
H01M50/$.cpc.in Patent Public Search (the guide shows the same$truncation for US classes),cpc=H01M50in Espacenet (classes are searched with their subgroups automatically),CPC=H01M50/lowin Google Patents andH01M50\/*in The Lens. A subgroup such as H01M50/40 is searched as that exact subgroup, except in Espacenet, where/lowadds the subgroups below it (low operator). Class suggestions are the subclasses and main groups whose CPC 2026.08 title uses your words, ranked by how many of your groups they match; check them before you rely on them. - Dates. Espacenet's Smart search filters on the publication date, the earliest publication of each document (dates); a filing or priority date is replaced with the publication date, with a warning. Patent Public Search has a publication index (
.pd.) and an application date index (.ad.) but no documented priority-date index, so a priority date is written as the application date (searchable indexes). Google Patents keeps dates, countries and status in its Search Fields rather than the query box, so the link sets them; if you paste the query, set them by hand. - Countries. Patent Public Search holds US documents only (USPAT, US-PGPUB and USOCR). For "granted only" the builder tells you which database to tick there; in Espacenet it adds the kind B to each country (
pn any "USB EPB"); in The Lens it addspublication_type:("GRANTED_PATENT").
Limits
- Google Patents adds plurals and close synonyms to every word, and The Lens can stem words, so the same query can find different documents in each database. Run it in each, and compare.
- Patent Public Search may refuse a date range inside a longer statement; run the range as its own line and combine the line numbers (L1 AND L2).
- The URL parameters that carry Google's dates, countries and status are what the site's own Search Fields write into the address bar. They are not documented on the help page and may change.
- A query only finds documents that use your words. Concepts written in other words, other languages, or only in drawings are missed; classification searching narrows that gap but does not close it.
- This tool writes search strings. It does not search, and it is not a patentability, validity or freedom-to-operate opinion. For decisions, have a registered patent practitioner run and review the search.
Sources
- USPTO, Advanced Search overview, Patent Public Search quick reference guide and searchable indexes.
- EPO, Espacenet help: query syntax, searchable fields, comparison operators, proximity, truncation, low operator, dates.
- Google, Google Patents search help.
- The Lens, search syntax and patent field definitions.
Need a CPC symbol first? The CPC classification lookup searches the class titles by keyword.
Frequently asked questions
Which patent databases does the query builder write for?
USPTO Patent Public Search, Espacenet, Google Patents and The Lens. The same search is written in each one's syntax, side by side, with a copy button for each and an open link for the three that accept a query in their web address.
Why does the Espacenet query repeat the same words so many times?
Espacenet's proximity operator works between two terms, and a test with OR lists inside it returned nothing. So the builder writes one clause for each pair of terms and joins them with OR. Above 40 pairs it falls back to a plain AND and says so.
Does NEAR work in Google Patents?
Google's own help page says proximity operators only change the ranking of the results, not which documents are found. The builder writes NEAR/n anyway, so the closest matches come first, and warns that the number of results is the same as with AND.
Can I search by priority date?
In The Lens and Google Patents, yes. Patent Public Search has no documented priority-date index, so the builder uses the application date there, and Espacenet's Smart search filters on the publication date, so it uses that. Each query says when it made the change.
How are CPC classes searched?
A subclass or main group is searched together with everything below it, in each database's own way. A subgroup is searched as that exact code, except in Espacenet, where the low operator adds the subgroups below it. Suggested classes come from the CPC 2026.08 titles and should be checked.
Is the result a complete prior art search?
No. It writes search strings and does not search. A query only finds documents that use its words, and each database stems and expands words differently. For a decision, a registered patent practitioner should run and review the search.