Use this repository to query U.S. federal trademarks from Node.js through the USPTO Trademark Scraper. It is one ES module around the official apify-client: send a brand name like PATAGONIA, a batch of serial numbers or a batch of registration numbers, and receive JSON objects with status, classes, goods, owner, attorney and a TSDR link for each mark. Apify does the fetching and the pacing, so your API route, queue worker or serverless function does not need a USPTO key or its own rate limiter. Everything ends up in results.json and results.csv unless you import the call and keep the objects.
Actor: USPTO Trademark Scraper Β· Publisher: Devil Scrapes Β· Also in Python: uspto-trademark-scraper-python
- Three ways in, one row format: a phrase searched against mark wording and owner names, a list of 8-digit application serial numbers, and a list of registration numbers can all go into the same run.
- Forgiving number input: anything that is not a digit is stripped, so
88/148,890and88148890are the same request. - The prosecution essentials per mark: current status text and its date, filing, publication and registration dates, register, Nice classes, goods and services wording, first-use dates, filing basis, owner, owner address and attorney of record.
- Readable codes: filing basis comes back as words like
USE_IN_COMMERCE,INTENT_TO_USEorMADRID_PROTOCOLinstead of1(a)and66(a), and classes are zero-padded strings such as025. - Live/dead filter:
statusFilterkeeps only marks whose status wording does or does not mention abandonment, cancellation or expiry. - A deep link for every row:
tsdr_urlopens the mark's official case-status record, which is the page an attorney will ask for. - Polite by default: number lookups are spaced about a second apart and throttling responses are retried with back-off, so long dockets finish without manual babysitting.
Store each client's serial numbers, run them nightly from a job queue and upsert the rows by serial_number. Your matter pages then show current status, register and registration date pulled from USPTO data rather than typed in by staff.
Diff today's status per serial against yesterday's and post the differences to Slack, Teams or a webhook. A move to an abandonment or cancellation status is the kind of event an IP team wants to hear about the same day.
When a user proposes a brand name, call the Actor with that phrase and a small maxResults, then show which live U.S. marks already use the wording and in which classes. Label it as a preliminary check and link each row's tsdr_url for the official record.
Search the company names already in your CRM and attach the number of live marks and the classes they cover. Sales and partnership teams get a quick signal of how brand-active an account is.
You need an Apify account and an API token from Console β Settings β Integrations. Apify's free plan includes monthly usage credit; this Actor's event prices are listed under Pricing below.
git clone https://github.com/devilscrapes/uspto-trademark-scraper-javascript.git
cd uspto-trademark-scraper-javascript
npm install
export APIFY_TOKEN=your_token_here
node index.js # uses input.json
node index.js my-input.json --out data --max-charge 2The script starts the USPTO Trademark Scraper, waits for it to finish, prints a link to the run in Apify Console and saves every result to results.json and results.csv. It exits with code 1 and the run's status message if the run fails.
Underneath the CLI wrapper, the whole job is a client, one call() that waits for the run and one listItems() that reads the result rows.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('DevilScrapes/uspto-trademark-scraper').call({"query": "PATAGONIA", "statusFilter": "any", "maxResults": 10, "proxyConfiguration": {"useApifyProxy": false}});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);index.js sends input.json as is. The sample looks up PATAGONIA and stops at ten hits in any status, enough to see real rows for a few cents. Because the phrase is compared with both mark wording and owner names, expect an occasional row from another company and filter it in code. Number lists are always processed in full and ignore maxResults.
{
"query": "PATAGONIA",
"statusFilter": "any",
"maxResults": 10,
"proxyConfiguration": {
"useApifyProxy": false
}
}| Field | Type | Required | Default | Allowed values |
|---|---|---|---|---|
query |
string | no | "BLINKING NAILS" |
β |
serialNumbers |
array | no | ["88148890"] |
β |
registrationNumbers |
array | no | ["5912174"] |
β |
statusFilter |
string | no | "any" |
any, live, dead |
maxResults |
integer | no | 20 |
β |
proxyConfiguration |
object | no | {"useApifyProxy": false} |
β |
Every object is one trademark application. Dates are ISO strings, international_classes and filing_basis are arrays, and anything the source record leaves blank is null. Treat serial_number as the primary key: the same mark can show up twice when it is reached by number and by phrase in one run.
| Field | Type | Always present |
|---|---|---|
serial_number |
string | yes |
registration_number |
string or null | no |
mark_text |
string | yes |
mark_type |
string or null | no |
standard_character_claim |
boolean or null | no |
description_of_mark |
string or null | no |
status |
string or null | no |
status_date |
string or null | no |
filing_date |
string or null | no |
registration_date |
string or null | no |
publication_date |
string or null | no |
register |
string or null | no |
international_classes |
array | no |
goods_services |
string or null | no |
first_use_date |
string or null | no |
use_in_commerce_date |
string or null | no |
filing_basis |
array | no |
owner_name |
string or null | no |
owner_address |
string or null | no |
attorney_name |
string or null | no |
tsdr_url |
string | yes |
scraped_at |
string | yes |
| Event | Price (USD) |
|---|---|
| Actor start | $0.2 |
| Result emitted | $0.005 |
Prices as configured on 2026-08-20. The Actor page always shows the current price. Runs are billed to the Apify account that owns the token. Use --max-charge to cap what a single run can cost.
This watcher is the core of a status-change notifier. It keeps the last known status per serial in status-snapshot.json, reports new marks and changed statuses with their TSDR link, and saves the new snapshot. Node.js built-ins only.
import { readFile, writeFile } from 'node:fs/promises';
const rows = JSON.parse(await readFile('results.json', 'utf8'));
const snapshotPath = 'status-snapshot.json';
const previous = JSON.parse(await readFile(snapshotPath, 'utf8').catch(() => '{}'));
const current = {};
const events = [];
for (const row of rows) {
const status = row.status ?? 'unknown';
current[row.serial_number] = status;
const before = previous[row.serial_number];
if (before === status) continue;
events.push({
serial: row.serial_number,
mark: row.mark_text,
owner: row.owner_name,
change: before === undefined ? `new: ${status}` : `${before} -> ${status}`,
link: row.tsdr_url,
});
}
await writeFile(snapshotPath, JSON.stringify({ ...previous, ...current }, null, 2));
if (events.length) console.table(events);
else console.log(`No changes across ${rows.length} marks`);Phrase searches with a small maxResults usually return fast. Long serial lists take about a second per number because of pacing, so for those use start() and an Apify webhook that calls your endpoint when the run is done.
No. A number USPTO does not know is skipped with a log line and the rest continue. Only a run that yields no rows at all ends as failed, which your code can detect from the run status.
apify-client ships its own typings. Declare an interface for the row fields you use, such as serial_number, status and tsdr_url, and cast the dataset items to it.
Use it for monitoring and research. The rows mirror what USPTO publishes, but a clearance opinion or an opposition strategy still belongs with a registered trademark attorney who reviews the official file.
Set APIFY_TOKEN first: export the token in the same shell, or put it in a local.envfile your shell loads. Never commit it.- Run finished with
FAILEDorABORTED: open the printed Console link; the run log says why. Input validation errors name the field. - Fewer rows than expected: a
--max-chargecap also limits how many results can be charged. Raise the cap or lower the limits in your input. - Something looks wrong in the data: open an issue on the Actor page so the maintainers see it.
- USPTO Trademark Scraper on Apify Store
- Python version of this example
- All Devil Scrapes Actors
- Apify web scraping cookbook
Related Actors:
- EUIPO Trademark Search Scraper β European Union and TMview marks for the same clearance or watch work.
- Companies House UK Scraper β UK company records to confirm who stands behind an owner name.
- SEC EDGAR Filings Scraper β 10-K, 10-Q & 8-K β annual reports and other filings from the U.S. companies that own the marks.
MIT licensed example code. The Actor itself runs on Apify and is maintained by Devil Scrapes. Not affiliated with the United States Patent and Trademark Office (USPTO).