# n8n template scraper (`advantageous_subcontra/n8n-template-scraper`) Actor

Search the n8n template library based on keywords and categories. Get all template metadata, including their view count.

- **URL**: https://apify.com/advantageous_subcontra/n8n-template-scraper.md
- **Developed by:** [Fabian Maume](https://apify.com/advantageous_subcontra) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Search the [n8n.io/workflows](https://n8n.io/workflows/) community template library by **keyword**, **sort order** and **category**, and get templates with view counts, author details, the list of nodes it uses, and optionally the full importable workflow JSON.

### Why get data from n8n template library?

Check existing automation workflows before building your own.
Research workflows with good traction to prioritise what to build.
Identify trends in the automation field.

### Features

- Multi-keyword search, with per-template `matchedKeywords` so you know which query returned it
- Three sort orders: relevance (default), popularity (most-viewed), most recent
- Multi-select category filter across the 31 n8n categories (top-level and sub)
- **Accurate view counts** — every result is enriched from the per-template endpoint, which reports the real total
- Optional importable workflow JSON for programmatic re-import into your own n8n instance
- Deduplication by template ID across keywords and categories

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `keywords` | array of strings | — (required) | One query per entry, e.g. `["slack", "openai"]` |
| `maxResultsPerKeyword` | integer | `50` | Caps hits per **(keyword × category)** search; 1–500. With 2 keywords × 3 categories the Actor runs 6 searches. |
| `sort` | enum | `relevance` | `relevance` / `popularity` / `recent` |
| `categories` | array of enum strings | `[]` | Empty = all categories; otherwise every keyword runs inside every selected category |
| `includeWorkflowJson` | boolean | `false` | When true, each row carries the full importable workflow definition (nodes, connections, pinData, meta) — adds ~5–50 KB per row |
| `proxyConfiguration` | object | `{ "useApifyProxy": false }` | Not required (the public API is open and does not block), but available if needed |

#### Example input

```json
{
  "keywords": ["slack", "openai"],
  "maxResultsPerKeyword": 20,
  "sort": "popularity",
  "categories": ["AI Chatbot", "SecOps"],
  "includeWorkflowJson": false
}
```

#### Available categories

`AI`, `AI Chatbot`, `AI RAG`, `AI Summarization`, `Content Creation`, `CRM`, `Crypto Trading`, `DevOps`, `Document Extraction`, `Document Ops`, `Engineering`, `File Management`, `HR`, `Internal Wiki`, `Invoice Processing`, `IT Ops`, `Lead Generation`, `Lead Nurturing`, `Marketing`, `Market Research`, `Miscellaneous`, `Multimodal AI`, `Other`, `Personal Productivity`, `Project Management`, `Sales`, `SecOps`, `Social Media`, `Support`, `Support Chatbot`, `Ticket Management`.

If the list drifts over time, the live source is `GET https://api.n8n.io/api/templates/categories`.

### Output

One row per unique template. Headline fields:

| Field | Description |
|---|---|
| `id`, `name`, `url`, `slug` | Template identity and link |
| `views`, `recentViews` | Accurate total view count and rolling-window recent views |
| `createdAt`, `updatedAt` | ISO timestamps |
| `categories` | Array of `{ id, name }` — the template's own categories, not the input filter |
| `author` | `{ username, name, verified, bio, avatar }` |
| `nodes`, `nodeCount` | Integrations used by the workflow |
| `communityNodes`, `nonNativeNodes` | Third-party / non-core nodes used |
| `isPaid`, `price`, `purchaseUrl` | Monetization fields (most templates are free) |
| `description` | Full markdown description from n8n.io |
| `matchedKeywords`, `matchedCategories` | Which input values returned this row |
| `workflow` | Only present when `includeWorkflowJson = true` |
| `scrapedAt` | ISO timestamp of this run |

# Actor input Schema

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

One search query per entry. Each keyword is run against the n8n templates search API; results are merged and deduplicated by template ID.

## `maxResultsPerKeyword` (type: `integer`):

Maximum templates collected per search call. Each (keyword × category) pair is a separate search, so with 2 keywords and 3 categories the Actor will run 6 searches and may push up to 6× this number of unique templates (minus duplicates). The API returns up to 99 per page; higher values will paginate.

## `sort` (type: `string`):

How the search API orders results within each keyword query.

## `categories` (type: `array`):

Optional category filter. Leave empty to search across all categories. When one or more are selected, every keyword is searched inside every selected category and results are merged. Category names come from https://api.n8n.io/api/templates/categories.

## `includeWorkflowJson` (type: `boolean`):

When enabled, each output row carries the full importable n8n workflow definition (nodes, connections, pinData, meta). Adds roughly 5-50 KB per row and one extra API call per template. Off by default.

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

Proxy settings. The n8n public API is unauthenticated and did not rate-limit during a 100-request parallel burst, so a proxy is not required. Enable it only if you hit regional blocks.

## Actor input object example

```json
{
  "keywords": [
    "slack",
    "openai"
  ],
  "maxResultsPerKeyword": 50,
  "sort": "relevance",
  "categories": [],
  "includeWorkflowJson": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "keywords": [
        "slack",
        "openai"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("advantageous_subcontra/n8n-template-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 = { "keywords": [
        "slack",
        "openai",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("advantageous_subcontra/n8n-template-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 '{
  "keywords": [
    "slack",
    "openai"
  ]
}' |
apify call advantageous_subcontra/n8n-template-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,advantageous_subcontra/n8n-template-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/CDm2HS3QDnOB8dqf0/builds/DUoic82Nxf56vOOCq/openapi.json
