# Patent Search Scraper (EPO Open Data + USPTO ODP) (`accommodating_aptitude/uspto-patents`) Actor

Pulls patent publications from official open data: EPO Linked Open Data (no key needed) plus optional USPTO Open Data Portal. Returns title, publication/application number, applicant, IPC classes, filing/publication date and an Espacenet link. Filters by IPC code, applicant, keyword and date.

- **URL**: https://apify.com/accommodating_aptitude/uspto-patents.md
- **Developed by:** [Korhan Coşan Ergün](https://apify.com/accommodating_aptitude) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.50 / 1,000 patent founds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Patent Search Scraper (EPO Open Data + USPTO ODP)

Search and export **patent publication records** from official open patent data
interfaces. No HTML scraping, no browser, no login.

Two sources are supported:

| Source | API key | What it covers |
|---|---|---|
| `epo_lod` **(default)** | **not needed** | [EPO Linked Open Data](https://data.epo.org/linked-data/) SPARQL endpoint — EP, WO and national patent publication bibliographic data |
| `uspto_odp` *(optional)* | your own **free** key | [USPTO Open Data Portal](https://data.uspto.gov/apis/getting-started) patent application search |

> **Why two sources?** The legacy PatentsView APIs (`api.patentsview.org` and
> `search.patentsview.org`) were retired and folded into the USPTO Open Data
> Portal, which requires a per-user API key on every request. The EPO Linked
> Open Data endpoint needs no key, so the actor works out of the box; add your
> free USPTO key if you also want U.S. application data.

### What you get

For every matching publication:

| Field | Description |
|---|---|
| `id` | Publication identifier, e.g. `EP4342075B1` |
| `title` | Title of invention (English preferred) |
| `link` | Espacenet search link for the publication |
| `publication_number` | Number without authority/kind, e.g. `4342075` |
| `publication_authority` | `EP`, `WO`, `GB`, `DE`, `FR`, … |
| `publication_kind` | `A1`, `A2`, `B1`, … |
| `publication_date` | Publication date (ISO 8601) |
| `applicants` / `applicant` | Applicant organisations/persons |
| `ipc_classes` | IPC inventive classification codes |
| `application_number` | Underlying application number |
| `filing_date` | Application filing date |
| `data_uri` | Canonical EPO linked-data URI |
| `scraped_at`, `source_url`, `source` | Provenance |

With `uspto_odp` enabled you additionally get `patent_number`, `grant_date`,
`status`, `inventors`, `cpc_classes` and `art_unit` where published.

### Filters

- **IPC class codes** — `H01L31/048`, `H02S20/00`, `G06N3/08`, …
  **This is the fastest filter**; when supplied, the query runs directly
  against the classification index.
- **Applicant (exact name)** — `Siemens Aktiengesellschaft`,
  `Robert Bosch GmbH`, … Used when no IPC class is given.
- **Keyword** — matched against publication titles.
- **Publication authorities** — `EP`, `WO`, `GB`, `DE`, …
- **Date range** — `dateFrom` / `dateTo`; defaults to the last 2 years.
- **Max items** — hard cap on result count.

If you supply neither an IPC class nor an applicant, the actor scans publication
dates backwards day by day from `dateTo` and filters titles by your keyword.
Supplying an IPC class or applicant is much faster and recommended.

### Typical uses

- Technology landscaping and prior-art screening
- Competitor patent monitoring by company name
- Innovation trend analysis by IPC class over time
- Building IP datasets for analytics, dashboards or ML
- Lead generation: who is filing in your technology area

### Pricing

Pay per event: you are charged per patent publication pushed to the dataset
(`patent-found`). A run that returns nothing costs nothing.

### Notes on data source and compliance

- `epo_lod` queries `https://data.epo.org/linked-data/query` (SPARQL). EPO's
  `robots.txt` disallows the HTML/data browsing paths (`/linked-data/data/`,
  `/doc/`, `/id/`, `/def/`, `/representation/`) — **not** the SPARQL query
  endpoint used here. EPO publishes this endpoint for open re-use.
- `uspto_odp` queries `https://api.uspto.gov/api/v1/patent/applications/search`
  with your own `x-api-key`. USPTO patent data is a U.S. government work in the
  public domain. Your key is passed straight to USPTO and never stored in the
  dataset.
- Requests are rate-limited to ≤ 1/second per host with retry/backoff on
  `429`/`5xx`.

### Local development

```bash
cd uspto-patents
APIFY_LOCAL=1 python main.py        # writes to ./storage/datasets/default
```

# Actor input Schema

## `keyword` (type: `string`):

Word to search for in the patent title, e.g. 'solar', 'battery', 'machine learning'. Can be left empty.

## `ipcClasses` (type: `array`):

International Patent Classification codes, e.g. 'H01L31/048', 'H02S20/00', 'G06N3/08'. THIS IS THE FASTEST filter — when supplied, the query runs directly against the classification index.

## `applicant` (type: `string`):

The applicant's full name as recorded officially, e.g. 'Siemens Aktiengesellschaft', 'Robert Bosch GmbH'. Used when no IPC code is given.

## `authorities` (type: `array`):

Code of the publishing patent office: 'EP' (European Patent Office), 'WO' (PCT/WIPO), 'GB', 'DE', 'FR', 'US', etc. If left empty, all authorities are included.

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

ISO 8601 date, e.g. '2024-01-01'. If left empty, the last 2 years are used.

## `dateTo` (type: `string`):

ISO 8601 date, e.g. '2026-11-10'. If left empty, today is used.

## `sources` (type: `array`):

'epo_lod' = EPO Linked Open Data (NO key needed, default). 'uspto_odp' = USPTO Open Data Portal (requires the free API key below).

## `usptoApiKey` (type: `string`):

Only needed for the 'uspto_odp' source. You can get a free key at https://data.uspto.gov/apis/getting-started. If you leave it empty, only the key-free EPO source is used.

## `maxItems` (type: `integer`):

Maximum number of patent publications to pull.

## Actor input object example

```json
{
  "keyword": "solar",
  "ipcClasses": [
    "H01L31/048",
    "H02S20/00"
  ],
  "applicant": "",
  "authorities": [],
  "dateFrom": "",
  "dateTo": "",
  "sources": [
    "epo_lod"
  ],
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all records found in this run.

# 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("accommodating_aptitude/uspto-patents").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("accommodating_aptitude/uspto-patents").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 accommodating_aptitude/uspto-patents --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,accommodating_aptitude/uspto-patents"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2Vxf0uppNsFJvYWFT/builds/wFcKdC2oaGKGxg5nf/openapi.json
