# Patent Search - USPTO Patent & Invention Database (`ryanclinton/patent-search`) Actor

Search and extract United States patent data from the official PatentsView API. Find patents by keyword, inventor name, assignee organization, date range, CPC classification, and patent type.

- **URL**: https://apify.com/ryanclinton/patent-search.md
- **Developed by:** [Ryan Clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 23 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 patent fetcheds

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?

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

## USPTO Patent Search

Search and extract United States patent data from the official PatentsView API. Find patents by keyword, inventor name, assignee organization, date range, CPC classification, and patent type. Returns structured records with titles, abstracts, inventor details, assignee organizations, citation counts, CPC codes, and direct Google Patents links -- ready for competitive intelligence, technology scouting, and patent analytics.

The PatentsView API is a free, government-backed data source covering all granted US patents. This actor handles query construction, cursor-based pagination, and data transformation so you get clean, analysis-ready JSON output with zero setup beyond a free API key.

***

### Why use USPTO Patent Search?

Running patent searches by hand through the USPTO website or PatentsView portal does not scale. Exporting results requires tedious copy-paste work, and there is no built-in way to schedule recurring searches or feed data into downstream tools. This actor solves those problems:

- **Automated batch extraction** -- retrieve up to 1,000 granted US patents per run with automatic cursor-based pagination. No manual clicking through result pages.
- **Structured, analysis-ready output** -- every record arrives in a clean, consistent JSON format that maps directly to spreadsheets, databases, or data pipelines.
- **Scheduling and monitoring** -- set up daily, weekly, or monthly runs on Apify to track new filings by competitors, technology areas, or individual inventors.
- **API-first design** -- trigger runs programmatically from any language and push results to Google Sheets, Slack, webhooks, or your own backend via the Apify API.
- **Zero infrastructure** -- runs entirely on Apify cloud. No servers, no Docker setup, no API rate-limit management on your side.
- **Free data source** -- the PatentsView API is a free, government-backed service. There are no data licensing fees or per-query charges beyond the minimal Apify compute cost.

***

### Key features

- **Full-text keyword search** -- match phrases in patent titles using the PatentsView text search engine.
- **Inventor filtering** -- narrow results to patents filed by a specific inventor last name.
- **Assignee filtering** -- search for patents owned by a company or organization such as Google, Apple, or Microsoft.
- **Date range filtering** -- restrict results to patents granted within a start and end date window (YYYY-MM-DD format).
- **CPC classification filtering** -- target specific technology domains using Cooperative Patent Classification codes (e.g., G06F for computing, H04L for telecommunications, A61K for pharmaceuticals).
- **Patent type selection** -- choose between utility, design, plant, and reissue patents.
- **Flexible sorting** -- sort by grant date, patent ID, or citation count in ascending or descending order.
- **Cursor-based pagination** -- automatically pages through large result sets using the PatentsView cursor mechanism.
- **Google Patents deep links** -- every result includes a clickable URL to the full patent document on Google Patents.
- **Combinable filters** -- all filters are joined with AND logic, letting you build highly targeted queries.
- **Demo mode** -- runs without an API key return clear setup instructions, so you can test the actor configuration before obtaining a key.
- **Clean data transformation** -- raw PatentsView API responses are transformed into a simplified schema with nested inventor and assignee arrays, concatenated name strings for easy CSV export, and deduplicated CPC codes.

***

### How to use USPTO Patent Search

1. **Get a free PatentsView API key.** Visit [patentsview.org/apis](https://patentsview.org/apis) and register for a free key. No payment or credit card is required. The key is typically issued immediately after registration.
2. **Open the actor** on Apify at [apify.com/ryanclinton/patent-search](https://apify.com/ryanclinton/patent-search).
3. **Enter your API key** in the input form.
4. **Set your search filters.** Enter a keyword, inventor name, assignee organization, date range, CPC code, or patent type. Combine multiple filters for precise results.
5. **Configure results.** Set the maximum number of patents (up to 1,000) and choose your preferred sort field and order.
6. **Start the run.** Click "Start" and wait for results to appear in the dataset tab.
7. **Export your data.** Download as JSON, CSV, or Excel from the dataset tab, or retrieve results programmatically via the Apify API.

***

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `apiKey` | String | Yes | -- | Free PatentsView API key. Get one at [patentsview.org/apis](https://patentsview.org/apis). |
| `keyword` | String | No | -- | Full-text phrase to match in patent titles. |
| `inventor` | String | No | -- | Filter by inventor last name. |
| `assignee` | String | No | -- | Filter by assignee organization name (e.g., "Google", "Apple"). |
| `dateFrom` | String | No | -- | Start date for grant date filter (YYYY-MM-DD). |
| `dateTo` | String | No | -- | End date for grant date filter (YYYY-MM-DD). |
| `cpcCode` | String | No | -- | CPC classification code prefix (e.g., "G06F", "H04L"). |
| `patentType` | String | No | -- | Patent type: `utility`, `design`, `plant`, or `reissue`. |
| `sortBy` | String | No | `patent_date` | Sort field: `patent_date`, `patent_id`, or `patent_num_us_patents_cited`. |
| `sortOrder` | String | No | `desc` | Sort direction: `desc` (newest first) or `asc` (oldest first). |
| `maxResults` | Integer | No | `100` | Maximum patents to return (1--1,000). |

#### Input example

```json
{
    "apiKey": "your-patentsview-api-key",
    "keyword": "machine learning",
    "assignee": "Microsoft",
    "dateFrom": "2023-01-01",
    "dateTo": "2024-12-31",
    "cpcCode": "G06N",
    "patentType": "utility",
    "sortBy": "patent_num_us_patents_cited",
    "sortOrder": "desc",
    "maxResults": 200
}
```

#### Tips for best results

- **Combine filters for precision.** Keyword + assignee + date range together produces highly targeted results. All filters are joined with AND logic.
- **Use CPC codes to target technology areas.** Common prefixes: G06F (computing), G06N (AI/machine learning), H04L (telecom), A61K (pharma), B60W (autonomous vehicles), H01L (semiconductors).
- **Start broad, then narrow.** Run a keyword-only search first, inspect the CPC codes in the results, then re-run with a CPC filter for tighter results.
- **Sort by citations to find landmark patents.** Setting `sortBy` to `patent_num_us_patents_cited` with descending order surfaces the most influential patents in your search area.
- **Watch for the default date filter.** When no filters are provided, the actor defaults to patents granted from 2024-01-01 onward to avoid returning the entire database.

***

### Output

#### Output example

```json
{
    "patentId": "11893485",
    "title": "Machine learning system for real-time anomaly detection",
    "abstract": "A machine learning system and method for detecting anomalies in streaming data. The system uses an ensemble of neural network models trained on historical time-series data to identify deviations from expected patterns in real time.",
    "patentDate": "2024-02-06",
    "patentYear": 2024,
    "patentType": "utility",
    "citationCount": 18,
    "processingDays": 912,
    "inventorNames": "John Smith, Jane Doe",
    "inventors": [
        {
            "name": "John Smith",
            "city": "Redmond",
            "state": "WA",
            "country": "US"
        },
        {
            "name": "Jane Doe",
            "city": "Seattle",
            "state": "WA",
            "country": "US"
        }
    ],
    "assignees": "Microsoft Technology Licensing LLC",
    "assigneeList": [
        {
            "organization": "Microsoft Technology Licensing LLC",
            "city": "Redmond",
            "state": "WA",
            "country": "US"
        }
    ],
    "cpcCodes": ["G06N20/00", "G06F18/24"],
    "patentUrl": "https://patents.google.com/patent/US11893485",
    "extractedAt": "2025-06-15T14:22:08.000Z"
}
```

#### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `patentId` | String | USPTO patent number. |
| `title` | String | Official patent title. |
| `abstract` | String | Patent abstract summarizing the invention. |
| `patentDate` | String | Grant date in YYYY-MM-DD format. |
| `patentYear` | Integer | Year the patent was granted. |
| `patentType` | String | Type: utility, design, plant, or reissue. |
| `citationCount` | Integer | Number of US patents cited by this patent. |
| `processingDays` | Integer | Days from filing to grant. |
| `inventorNames` | String | Comma-separated inventor full names. |
| `inventors` | Array | Detailed inventor records with name, city, state, and country. |
| `assignees` | String | Comma-separated assignee organization names. |
| `assigneeList` | Array | Detailed assignee records with organization, city, state, and country. |
| `cpcCodes` | Array | List of CPC classification group IDs assigned to the patent. |
| `patentUrl` | String | Direct link to the patent on Google Patents. |
| `extractedAt` | String | ISO 8601 timestamp of when the data was extracted. |

***

### Use cases

- **Competitive intelligence** -- monitor patent filings by competitors to track their R\&D direction, identify new product lines, and anticipate market moves. Schedule weekly runs filtering by assignee to stay current.
- **Technology scouting** -- search specific CPC codes or keywords to discover emerging technologies and identify potential licensing or acquisition targets before your competitors do.
- **Freedom-to-operate research** -- search for patents in your product's technology space to flag potential infringement risks before launch. Filter by CPC code and review assignee organizations.
- **Academic and market research** -- analyze patent trends by year, technology area, or geography to support research papers, market reports, and investment theses. Export to CSV for statistical analysis.
- **Inventor and talent mapping** -- identify prolific inventors in a technology domain by filtering on CPC codes and reviewing inventor details and locations. Useful for recruiting and partnership decisions.
- **IP portfolio benchmarking** -- compare the patent output of multiple companies in the same industry to assess relative innovation strength. Run separate searches per assignee and compare counts and CPC distributions.
- **Due diligence for M\&A** -- evaluate a target company's patent portfolio as part of acquisition due diligence. Search by assignee name to catalog all granted patents with dates, technology areas, and citation counts.

***

### API & Integration

You can call this actor programmatically using the Apify API or official client libraries. The actor ID is `qE6pzcoxvuDuewuvv`.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("ryanclinton/patent-search").call(run_input={
    "apiKey": "your-patentsview-api-key",
    "keyword": "autonomous vehicle",
    "assignee": "Waymo",
    "dateFrom": "2023-01-01",
    "maxResults": 50,
})

for patent in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{patent['patentId']} - {patent['title']} ({patent['patentDate']})")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('ryanclinton/patent-search').call({
    apiKey: 'your-patentsview-api-key',
    keyword: 'autonomous vehicle',
    assignee: 'Waymo',
    dateFrom: '2023-01-01',
    maxResults: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((patent) => {
    console.log(`${patent.patentId} - ${patent.title} (${patent.patentDate})`);
});
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/ryanclinton~patent-search/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -d '{
    "apiKey": "your-patentsview-api-key",
    "keyword": "CRISPR",
    "dateFrom": "2022-01-01",
    "maxResults": 100
  }'
```

#### Integrations

- **Google Sheets** -- export patent datasets directly to a spreadsheet for collaborative analysis using the Apify Google Sheets integration.
- **Slack / Email** -- configure Apify webhooks to send notifications when a scheduled run finds new patents matching your criteria.
- **Zapier / Make** -- connect the actor to thousands of apps via Apify's Zapier and Make integrations.
- **Custom webhooks** -- push results to your own API endpoint or data warehouse after each run.
- **Apify datasets** -- results are stored in Apify datasets with built-in versioning. Access any previous run's results at any time through the Apify console or API.

***

### How it works

```
Input filters              PatentsView API v1              Apify Dataset
+-------------------+      +----------------------+      +------------------+
| keyword           |      |                      |      |                  |
| inventor          | ---> | POST /api/v1/patent/ | ---> | Structured JSON  |
| assignee          |      | X-Api-Key header     |      | patent records   |
| dateFrom / dateTo |      | Cursor pagination    |      | (up to 1,000)   |
| cpcCode           |      | up to 1000/page      |      |                  |
| patentType        |      |                      |      |                  |
+-------------------+      +----------------------+      +------------------+
        |                           |                            |
        v                           v                            v
  Build _and query           Fetch pages using            Transform raw API
  from active filters        last patent_id as            response into clean
  (OR default date           "after" cursor until         output with inventor
   filter if none)           maxResults reached           arrays, assignee
                                                          arrays, CPC codes,
                                                          Google Patents URLs
```

1. The actor reads your input and builds a PatentsView query object. Multiple filters are combined with `_and` logic. If no filters are provided, it defaults to patents granted from 2024-01-01 onward.
2. It sends paginated GET requests to `search.patentsview.org/api/v1/patent/` with your API key in the `X-Api-Key` header, fetching up to 1,000 records per page.
3. Pagination uses cursor-based logic: the `patent_id` of the last record in each page becomes the `after` value for the next request.
4. Each raw patent record is transformed into a clean output object with nested inventor and assignee arrays, a joined inventor names string, CPC code list, and a constructed Google Patents URL.
5. Results are pushed to the Apify dataset, available for download as JSON, CSV, or Excel, or accessible via the Apify REST API and client libraries.

***

### Performance & cost

| Scenario | Patents | Memory | Duration | Est. cost |
|----------|---------|--------|----------|-----------|
| Small search (keyword only) | 100 | 256 MB | ~15 sec | ~$0.002 |
| Medium search (keyword + assignee + date) | 500 | 256 MB | ~30 sec | ~$0.005 |
| Large search (max results) | 1,000 | 256 MB | ~60 sec | ~$0.008 |
| Daily scheduled monitoring | 100/day | 256 MB | ~15 sec/run | ~$0.06/month |

The PatentsView API is completely free with no usage fees. Costs above reflect only Apify platform compute credits. The Apify free tier includes $5/month in credits, which is sufficient for hundreds of patent searches.

The actor uses 256 MB of memory by default. It does not launch a browser or perform web crawling -- all data comes from direct API calls, which keeps resource usage minimal. Network transfer is the primary factor affecting run duration, and results scale linearly with the number of patents requested.

***

### Limitations

- **Granted patents only.** The PatentsView database covers granted US patents. Pending patent applications are not included.
- **US patents only.** This actor searches the USPTO database. For European patents, see [EPO European Patent Search](https://apify.com/ryanclinton/epo-patent-search).
- **1,000 results per run.** The PatentsView API and this actor support up to 1,000 patents per run. For larger datasets, split your query across multiple runs using different date ranges.
- **Title-based keyword search.** The keyword filter matches against patent titles using `_text_phrase`. It does not search claims or full patent text.
- **Data freshness.** PatentsView updates its database periodically, typically within a few weeks of patents being granted. There may be a short lag for the most recent grants.
- **API key required.** A free PatentsView API key is required. Without it, the actor runs in demo mode and returns setup instructions instead of patent data.
- **Inventor search by last name only.** The inventor filter uses the `_contains` operator on the inventor last name field. It does not support first-name-only searches or full-name exact matching.
- **Single-value filters.** Each filter field accepts one value. To search for multiple assignees or keywords, run the actor multiple times with different inputs.

***

### Responsible use

- **Respect PatentsView terms of service.** The PatentsView API is a free public resource maintained by the U.S. government. Use it responsibly and avoid unnecessary high-frequency requests.
- **Attribution.** When publishing analysis based on PatentsView data, credit the source appropriately: "Data sourced from PatentsView (patentsview.org), a project supported by the USPTO."
- **No legal advice.** Patent data returned by this actor is for informational and research purposes only. It does not constitute legal advice. Consult a patent attorney for freedom-to-operate opinions or infringement analysis.
- **Rate limiting.** The actor handles pagination internally but does not add artificial delays. For very frequent scheduled runs, space them at reasonable intervals.
- **Data accuracy.** Patent data is sourced from PatentsView and reflects what the USPTO has published. Always verify critical findings against the original patent documents on Google Patents or the USPTO website before making business or legal decisions.

***

### FAQ

**Do I need to pay for the PatentsView API key?**
No. The PatentsView API key is completely free. Visit [patentsview.org/apis](https://patentsview.org/apis) to register.

**What types of patents are included?**
The database includes all granted US patents from the USPTO: utility patents, design patents, plant patents, and reissues. Pending applications are not included.

**How current is the patent data?**
PatentsView updates its database regularly, typically within a few weeks of new patents being granted by the USPTO. There may be a short delay for the most recently issued patents.

**What are CPC codes and how do I find the right one?**
CPC (Cooperative Patent Classification) codes are a hierarchical system for classifying patents by technology area. Start with a keyword search, then look at the `cpcCodes` field in the results to discover which codes are relevant. Common top-level codes: G06F (computing), G06N (AI/ML), H04L (telecom), A61K (pharma), B60W (vehicles), H01L (semiconductors).

**Can I search by patent number?**
This actor is designed for discovery searches. If you already know a patent number, view it directly at `https://patents.google.com/patent/US{number}`.

**What happens if I provide no search filters?**
The actor applies a default date filter of 2024-01-01 onward so that it does not attempt to return the entire patent database. You will receive the most recently granted patents up to your `maxResults` limit.

**How do I monitor a competitor's patent activity over time?**
Set up a scheduled run with the `assignee` field set to the company name. Use a `dateFrom` value that covers your monitoring window (e.g., the start of the current year). Apify scheduling supports daily, weekly, or monthly cadences. Each run produces a new dataset you can compare against previous results.

**Can I combine multiple keywords or assignees in a single search?**
Each input field accepts a single value. Multiple active filters are combined with AND logic. To search for multiple assignees or keywords separately, run the actor multiple times with different inputs. You can use the Apify API to orchestrate multiple runs programmatically.

***

### Related actors

These actors from the [ryanclinton Apify Store](https://apify.com/ryanclinton) complement USPTO Patent Search for research, competitive intelligence, and IP analysis workflows.

| Actor | Description | Link |
|-------|-------------|------|
| EPO European Patent Search | Search European patents via the European Patent Office API | [apify.com/ryanclinton/epo-patent-search](https://apify.com/ryanclinton/epo-patent-search) |
| SEC EDGAR Filing Analyzer | Analyze SEC filings to complement patent data with financial intelligence | [apify.com/ryanclinton/sec-edgar-filing-analyzer](https://apify.com/ryanclinton/sec-edgar-filing-analyzer) |
| GitHub Repository Search | Search GitHub repositories to correlate open-source activity with patent filings | [apify.com/ryanclinton/github-repo-search](https://apify.com/ryanclinton/github-repo-search) |
| OpenAlex Research Search | Search academic papers to connect published research with patent activity | [apify.com/ryanclinton/openalex-research-search](https://apify.com/ryanclinton/openalex-research-search) |
| Company Deep Research Agent | Deep research on companies including IP and innovation analysis | [apify.com/ryanclinton/company-deep-research](https://apify.com/ryanclinton/company-deep-research) |
| Crossref Academic Paper Search | Search academic publications to find prior art and related research | [apify.com/ryanclinton/crossref-paper-search](https://apify.com/ryanclinton/crossref-paper-search) |
| EDGAR Filing Search | Search SEC EDGAR filings for patent-related disclosures in corporate reports | [apify.com/ryanclinton/edgar-filing-search](https://apify.com/ryanclinton/edgar-filing-search) |
| Semantic Scholar Paper Search | Find academic papers with citation data to connect research with patents | [apify.com/ryanclinton/semantic-scholar-search](https://apify.com/ryanclinton/semantic-scholar-search) |

# Actor input Schema

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

Free API key from the USPTO Open Data Portal. Create a free USPTO.gov account, then generate a key at https://data.uspto.gov (My API Key). Note: PatentsView keys do NOT work here.

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

Full-text search across invention title and patent text.

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

Filter by inventor name (e.g. 'Smith').

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

Filter by applicant or assignee organization name (e.g. 'Google', 'Apple').

## `cpcCode` (type: `string`):

Cooperative Patent Classification code prefix to filter (e.g. 'G06F' for computing).

## `dateField` (type: `string`):

Which date the date range applies to.

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

Start of the date range (YYYY-MM-DD). Applies to the date field selected above.

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

End of the date range (YYYY-MM-DD). Applies to the date field selected above.

## `applicationType` (type: `string`):

Filter by USPTO application type.

## `statusFilter` (type: `string`):

Restrict to a prosecution outcome. 'Any' returns all matching records.

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

Field to sort results by.

## `sortOrder` (type: `string`):

Sort direction.

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

Maximum number of records to return.

## Actor input object example

```json
{
  "keyword": "artificial intelligence",
  "dateField": "filingDate",
  "applicationType": "any",
  "statusFilter": "any",
  "sortBy": "filingDate",
  "sortOrder": "desc",
  "maxResults": 100
}
```

# Actor output Schema

## `results` (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 = {
    "keyword": "artificial intelligence"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/patent-search").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 = { "keyword": "artificial intelligence" }

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/patent-search").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 '{
  "keyword": "artificial intelligence"
}' |
apify call ryanclinton/patent-search --silent --output-dataset

```

## MCP server setup

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

```

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/qE6pzcoxvuDuewuvv/builds/pTNh6aJsZsVMqjnRo/openapi.json
