# Patent Semantic Monitor (`constant_quadruped/patent-semantic-monitor`) Actor

Scrapes patent registrations to track competitive IP filings, registrations, and claims.

- **URL**: https://apify.com/constant\_quadruped/patent-semantic-monitor.md
- **Developed by:** [CQ](https://apify.com/constant_quadruped) (community)
- **Categories:** News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Patent Semantic Monitor

Monitor newly published patents that match your keywords. Use it to track competitive IP — what your rivals (or a whole technology area) are filing and getting granted — and feed the results into alerts, dashboards, or downstream analysis.

The actor works **out of the box with no API key**: it queries the public Google Patents search endpoint. It can optionally use the richer USPTO PatentsView "PatentSearch" API if you supply a (free) key.

### Key features

- 🔑 **No API key required** — runs immediately against the public Google Patents endpoint; add a free USPTO key only if you want richer structured fields.
- 🆕 **Newest-first monitoring** — results are date-sorted, so the actor behaves as a "latest filings" watcher, not a static search.
- 🌐 **Two data sources, automatic fallback** — Google Patents by default; USPTO PatentsView when a key is supplied, with auto-fallback to Google Patents if the USPTO path errors.
- 🛡️ **Proxy IP rotation built in** — requests route through Apify Proxy on the platform to dodge Google's per-IP rate limiting; nothing to configure.
- ✅ **Never hard-fails** — no matches simply finishes with an empty dataset (exit 0), so scheduled runs stay green.
- 📦 **Flat, stable schema** — one clean record per patent, ready for sheets, dashboards, webhooks, or downstream actors.
- ⏰ **Schedule-friendly** — pair with Apify Schedules + the `dateFrom`/`lookbackDays` window to get a recurring "new patents since last run" feed.

### Use cases

- **Competitive IP monitoring** — track everything a named competitor (or a technology area) files and gets granted, newest-first, on a weekly schedule.
- **Freedom-to-operate (FTO) scouting** — surface recently published patents around a product concept before you commit engineering resources.
- **R&D & technology-trend tracking** — watch a fast-moving field (e.g. "quantum computing", "solid-state battery") and feed counts/titles into a trend dashboard.
- **M&A / investment diligence** — pull a target company's recent patent activity as a quick signal of where their R&D dollars are going.
- **Patent-landscape alerts** — wire the dataset into a webhook or Slack/email integration to get pinged when new matches appear.

### What it does

1. Takes a list of keywords plus an optional date floor.
2. Queries a patent data source, **sorted newest-first**, and pages through results until it has up to `maxResults` records.
   - **Default (no key):** the public Google Patents search XHR endpoint (`https://patents.google.com/xhr/query`). Free, keyless.
   - **Optional (with key):** the USPTO PatentsView PatentSearch API (`https://search.patentsview.org/api/v1/patent/`), which provides cleaner structured fields. If this path errors, the actor automatically falls back to the free Google Patents source.
3. Normalizes every record into a single flat shape and pushes it to the dataset.

On the Apify platform, Google Patents requests are routed through **Apify Proxy** (auto/datacenter) so requests rotate IPs and avoid the rate-limiting Google applies to a single repeated IP. No proxy configuration is required from you.

### Input

All inputs are optional. With an empty input the actor runs with sensible defaults (`keywords: ["agent", "optimization"]`, ~10-year lookback, 100 results).

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keywords` | array of strings | `["agent", "optimization"]` | Search terms. Matched against patent title and abstract. Terms are joined into a single query phrase. |
| `apiKey` | string (secret) | _none_ | **Optional.** A free USPTO PatentsView PatentSearch API key. If set, the actor uses the USPTO source instead of Google Patents. Can also be provided via the `PATENTSVIEW_API_KEY` environment variable. Request one at <https://patentsview.org/>. |
| `dateFrom` | string (`YYYY-MM-DD`) | _none_ | Only return patents published/granted on or after this date. If omitted, `lookbackDays` is used. |
| `lookbackDays` | integer | `3650` | Used only when `dateFrom` is blank: include patents from the last N days. The ~10-year default ensures results out of the box. |
| `maxResults` | integer (1–1000) | `100` | Maximum number of records to return. |

#### Example input

```json
{
  "keywords": ["quantum computing"],
  "dateFrom": "2025-01-01",
  "maxResults": 50
}
````

To use the USPTO source instead:

```json
{
  "keywords": ["insulin pump"],
  "apiKey": "YOUR_PATENTSVIEW_KEY",
  "lookbackDays": 365,
  "maxResults": 100
}
```

### Output

Each dataset item has this shape:

```json
{
  "patentId": "US11650869B2",
  "title": "Quantum computing service with local edge devices...",
  "applicant": "International Business Machines Corporation",
  "abstract": "A short snippet describing the patent...",
  "filingDate": "2023-05-16",
  "url": "https://patents.google.com/patent/US11650869B2/en"
}
```

| Field | Description |
|-------|-------------|
| `patentId` | Publication number (e.g. `US11650869B2`). |
| `title` | Patent title (HTML stripped to clean text). |
| `applicant` | Assignee organization. Falls back to the inventor, then `"N/A"`, if no assignee is listed. |
| `abstract` | A short snippet/abstract (HTML stripped). May be `null` when the source provides none. |
| `filingDate` | The record's date — publication date when available, otherwise grant/filing date. |
| `url` | Link to the patent on Google Patents (may be `null` if no ID could be resolved). |

You can export the dataset as JSON, CSV, Excel, or HTML from the run's **Storage** tab, pull it via the [Apify API](https://docs.apify.com/api/v2), or push it onward with an [integration](https://docs.apify.com/platform/integrations) (Make, Zapier, Slack, webhooks, Google Sheets).

> **Note on field naming:** `applicant` maps to the patent's *assignee*, and `filingDate` is the *publication/grant* date (not strictly the application filing date) on the default Google Patents path. These names are kept for a stable, simple schema.

### Behavior and limitations

- **Sorted newest-first.** Results are ordered by date (`sort=new`), so the actor behaves as a "newest filings" monitor rather than a relevance-ranked search.
- **Keyword matching is broad.** On the free Google Patents path, terms are matched loosely against title/abstract; because results are sorted by date rather than relevance, the newest matches can include patents only loosely related to your keywords. Use more specific multi-word keywords to tighten results, or supply an `apiKey` for the USPTO any-word title/abstract search.
- **No results is not an error.** If nothing matches, the actor logs a warning and finishes successfully with an empty dataset (exit 0) — it never hard-fails.
- **Rate limiting.** Google may throttle bursts of requests (HTTP 503/429, or an HTML "Sorry…" block page). The actor retries with exponential backoff and uses Apify Proxy IP rotation on the platform. Running locally without a proxy can hit these limits faster.
- **USPTO legacy endpoint.** The old keyless `api.patentsview.org/patents/query` endpoint was decommissioned in 2025, which is why the USPTO path now requires a key.

### FAQ

**Do I need an API key?**
No. The actor runs out of the box against the public Google Patents endpoint. A free USPTO PatentsView key is optional and only changes the data source to USPTO's structured API.

**Will I get blocked or rate-limited?**
On the Apify platform, requests route through Apify Proxy with IP rotation and exponential-backoff retries, which avoids Google's per-IP throttling in normal use. Running locally without a proxy can hit limits faster.

**How fresh is the data?**
Results are sorted newest-first by publication/grant date. Combine `dateFrom` (or `lookbackDays`) with an [Apify Schedule](https://docs.apify.com/platform/schedules) to get a recurring "new patents since last run" feed.

**Why are some results only loosely related to my keywords?**
The default Google Patents path sorts by date rather than relevance, so the newest matches can be broad. Use more specific multi-word keywords, or supply a USPTO `apiKey` for tighter title/abstract matching.

**Can I get alerts when new patents appear?**
Yes — connect the dataset to a [webhook or integration](https://docs.apify.com/platform/integrations) (Slack, email, Make, Zapier) so each scheduled run pushes new matches to your channel of choice.

**How do I export the results?**
Download as JSON/CSV/Excel/HTML from the run's Storage tab, or fetch them programmatically via the Apify API.

**Does it cost anything to run?**
You pay only for the Apify platform compute/proxy the run consumes. The patent data sources themselves are free (Google Patents keyless; USPTO PatentsView free with a key).

### Running locally

```bash
npm install
## put your input in storage/key_value_stores/default/INPUT.json
npx apify run --purge
```

Locally there is no Apify Proxy, so requests go direct and may be throttled by Google after several calls. On the Apify platform this is handled automatically.

### Data sources

- **Google Patents** public search — <https://patents.google.com/> (keyless, default).
- **USPTO PatentsView PatentSearch API** — <https://search.patentsview.org/> (optional, key required).

This actor reads only public patent data; it does not modify anything.

# Actor input Schema

## `keywords` (type: `array`):

Patent search terms. Matched against patent title and abstract. By default queries the free, keyless Google Patents search; if an apiKey is supplied, the richer USPTO PatentSearch full-text any-word search is used instead.

## `apiKey` (type: `string`):

OPTIONAL. Leave blank to use the free, no-key Google Patents source (works out of the box). If you supply your free USPTO PatentsView PatentSearch API key (sent as the X-Api-Key header), the actor uses the richer USPTO data instead. Request a key at https://patentsview.org/ — the legacy keyless USPTO API was decommissioned in 2025. Can also be supplied via the PATENTSVIEW\_API\_KEY environment variable.

## `dateFrom` (type: `string`):

Only return patents granted on or after this date. Leave blank to use the lookback window. Makes the actor behave as a monitor.

## `lookbackDays` (type: `integer`):

If no explicit dateFrom is given, only return patents granted within this many days of the run. Default ~10 years so the actor returns results out of the box.

## `maxResults` (type: `integer`):

Maximum number of patent records to return.

## Actor input object example

```json
{
  "keywords": [
    "agent",
    "optimization"
  ],
  "lookbackDays": 3650,
  "maxResults": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

Patent filings with publication date, patent ID, title, applicant, abstract, and link.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("constant_quadruped/patent-semantic-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("constant_quadruped/patent-semantic-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call constant_quadruped/patent-semantic-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=constant_quadruped/patent-semantic-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Patent Semantic Monitor",
        "description": "Scrapes patent registrations to track competitive IP filings, registrations, and claims.",
        "version": "1.0",
        "x-build-id": "mRPQA6LAYOPst1FRs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/constant_quadruped~patent-semantic-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-constant_quadruped-patent-semantic-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/constant_quadruped~patent-semantic-monitor/runs": {
            "post": {
                "operationId": "runs-sync-constant_quadruped-patent-semantic-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/constant_quadruped~patent-semantic-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-constant_quadruped-patent-semantic-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keywords": {
                        "title": "Keywords list",
                        "type": "array",
                        "description": "Patent search terms. Matched against patent title and abstract. By default queries the free, keyless Google Patents search; if an apiKey is supplied, the richer USPTO PatentSearch full-text any-word search is used instead.",
                        "default": [
                            "agent",
                            "optimization"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "apiKey": {
                        "title": "PatentSearch API key (optional)",
                        "type": "string",
                        "description": "OPTIONAL. Leave blank to use the free, no-key Google Patents source (works out of the box). If you supply your free USPTO PatentsView PatentSearch API key (sent as the X-Api-Key header), the actor uses the richer USPTO data instead. Request a key at https://patentsview.org/ — the legacy keyless USPTO API was decommissioned in 2025. Can also be supplied via the PATENTSVIEW_API_KEY environment variable."
                    },
                    "dateFrom": {
                        "title": "Granted on/after (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only return patents granted on or after this date. Leave blank to use the lookback window. Makes the actor behave as a monitor."
                    },
                    "lookbackDays": {
                        "title": "Lookback window (days)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "If no explicit dateFrom is given, only return patents granted within this many days of the run. Default ~10 years so the actor returns results out of the box.",
                        "default": 3650
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of patent records to return.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
