# Google Patents Scraper (`searchapi/google-patents-scraper`) Actor

Scrapes Google Patents for any patent query. Extracts title, patent number, dates, inventors, assignees, patent office, status, snippet, abstract, claims, citation counts, PDF URL, CPC/IPC codes, and more.

- **URL**: https://apify.com/searchapi/google-patents-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Google Patents Scraper

Search public Google Patents records or fetch one known publication. The Actor uses Google Patents' structured search response for speed and optionally enriches each result from its public patent page.

### Modes

- `search`: one user-friendly keyword search.
- `batch`: multiple searches with fair `maxItems` allocation and concurrent requests.
- `patent`: one publication number or public Google Patents URL.

`detailLevel` controls cost and richness:

- `search`: structured result data only—fastest for large result sets.
- `metadata`: adds current status, application and expiry details, inventors/assignees, claims count, classifications, citation counts, legal-event count, images, and other public metadata.
- `full`: also adds full claims, description, citation records, and legal-event records. Patent mode defaults to full.

### Example inputs

Rich search:

```json
{
  "mode": "search",
  "query": "machine learning",
  "country": "US",
  "language": "en",
  "detailLevel": "metadata",
  "maxItems": 5,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

Full single-patent lookup:

```json
{
  "mode": "patent",
  "patentNumber": "US10977654B2",
  "detailLevel": "full",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

Batch search:

```json
{
  "mode": "batch",
  "queries": ["machine learning", "quantum computing"],
  "detailLevel": "search",
  "maxItems": 20,
  "maxConcurrency": 2
}
```

### Search and filter inputs

Search mode supports `query`; batch mode supports `queries`. Filters include patent country, result language, assignee, inventor, priority-date range, granted/application status, and relevance/newest/oldest sorting. Limits, search/detail concurrency, request retries, request timeout, and maximum pages are bounded and configurable.

Dates accept `YYYY-MM-DD`; compact legacy `YYYYMMDD` values remain supported. A global maximum of 500 records matches the five structured pages available to the Actor.

### Dataset

The source-backed 85-field contract includes stable SHA-256 IDs, canonical patent and PDF URLs, publication/application identifiers, kind and status, dates, inventors, assignees, abstracts, claims, classifications, citations, legal events, images/figures, family-country status, search context, source, and ISO timestamps. Optional values are omitted when Google Patents does not expose them—no nulls or fabricated placeholders are written.

Search-card records remain useful if an optional detail page is temporarily unavailable. In that case, `detailFetched` stays false and the run summary reports the enrichment failure count. A single-patent lookup fails if its requested detail page cannot be validated.

### Proxy and access behavior

- Direct HTTP is the default and fastest route.
- Apify Residential and custom proxies are supported through `proxyConfiguration`.
- `GOOGLE_SERP` is deliberately rejected. It is designed for Google Search results, not `patents.google.com` structured and detail endpoints.
- Status and content type are validated before parsing. Malformed JSON, unexpected pages, explicit automated-query/CAPTCHA pages, and HTTP 403/429 responses fail closed and are never stored.
- The Actor does not solve CAPTCHAs or access authenticated/private material.

### Performance

Search pages contain up to 100 structured results, so search-only mode normally needs one request for common workloads. Metadata and full detail pages run with bounded concurrency. Representative runs are designed to complete in seconds; very large full-detail runs depend on patent size, target rate limits, and proxy performance but remain subject to Actor timeouts.

### Local verification

```bash
npm test
npm run lint
npm run validate:dataset
apify validate-schema
apify run --purge --input-file INPUT.json
node scripts/audit-dataset.mjs
```

The `qa-inputs/` folder contains minimal, batch, filtered, full-patent, empty-result, invalid, Residential, and incompatible-GOOGLE\_SERP cases.

### Limitations

Google Patents data and markup change over time. Full descriptions and claims can be large. Family status, citations, legal events, classifications, and images vary by publication and jurisdiction. Search results can identify family members outside the requested country; the country input follows Google Patents' own search filter rather than rewriting source results.

# Actor input Schema

## `mode` (type: `string`):

Search one query, run multiple queries fairly, or fetch one patent.

## `query` (type: `string`):

Keywords to enter in Google Patents search mode.

## `queries` (type: `array`):

Queries for batch mode. The global maxItems limit is shared fairly.

## `patentNumber` (type: `string`):

Publication number for patent mode, for example US10977654B2.

## `patentUrl` (type: `string`):

Optional public patents.google.com/patent/... URL accepted instead of patentNumber.

## `detailLevel` (type: `string`):

Search is fastest; metadata adds classifications/status/images/counts; full also adds claims, description, citation rows, and legal events.

## `country` (type: `string`):

Optional two-letter patent-country filter such as US, EP, WO, JP, or KR.

## `language` (type: `string`):

Two-letter result/detail language code.

## `assignee` (type: `string`):

Optional Google Patents assignee filter.

## `inventor` (type: `string`):

Optional Google Patents inventor filter.

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

Optional earliest priority date in YYYY-MM-DD format.

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

Optional latest priority date in YYYY-MM-DD format.

## `status` (type: `string`):

Return all records, granted patents, or published applications.

## `sortBy` (type: `string`):

Google relevance or publication-date order.

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

Global record limit, shared fairly in batch mode.

## `maxPages` (type: `integer`):

Maximum 100-result structured pages fetched per query.

## `maxConcurrency` (type: `integer`):

Maximum simultaneous batch searches.

## `detailConcurrency` (type: `integer`):

Maximum simultaneous public patent detail pages.

## `maxRequestRetries` (type: `integer`):

Retries for temporary network and 5xx failures.

## `requestTimeoutSecs` (type: `integer`):

Timeout per structured or detail request.

## `proxyConfiguration` (type: `object`):

Direct, Residential, or custom routing. GOOGLE\_SERP is incompatible with patents.google.com endpoints.

## `debug` (type: `boolean`):

Enable additional non-sensitive diagnostics.

## Actor input object example

```json
{
  "mode": "search",
  "query": "machine learning",
  "detailLevel": "metadata",
  "language": "en",
  "status": "all",
  "sortBy": "relevance",
  "maxItems": 20,
  "maxPages": 5,
  "maxConcurrency": 3,
  "detailConcurrency": 5,
  "maxRequestRetries": 1,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

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

No description

## `datasetUi` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "query": "machine learning"
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/google-patents-scraper").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 = { "query": "machine learning" }

# Run the Actor and wait for it to finish
run = client.actor("searchapi/google-patents-scraper").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 '{
  "query": "machine learning"
}' |
apify call searchapi/google-patents-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/Nc4UiIvrGsQaDqJPL/builds/HmoR1gJpRjQwQQb6F/openapi.json
