# Website Categorization API — 6-LLM Consensus URL Classifier (`yanmiayn/consensus-web-classifier`) Actor

Stop hallucinated category labels. Run URLs through 6 LLMs voting in parallel (DeepSeek-v4, Llama-4, Qwen-3.5, Nemotron-3, GLM-5.1, MiniMax) for higher-confidence taxonomy classification. Lead-gen filtering, content moderation, dataset labeling. $0.007 per URL.

- **URL**: https://apify.com/yanmiayn/consensus-web-classifier.md
- **Developed by:** [yanmiayn](https://apify.com/yanmiayn) (community)
- **Categories:** AI, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 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.

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

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

## Multi-Model Consensus Web Page Classifier

Classify any list of URLs into your custom taxonomy using a **6-model consensus engine** (open-weights frontier LLMs voting in parallel). Reduces single-model hallucination on edge cases — useful for lead-gen filtering, content moderation queues, knowledge-graph ingestion, and dataset labeling.

### Why consensus?

A single LLM occasionally hallucinates labels on ambiguous pages. This actor fans out the same classification prompt to **6 independent open-weights models** and returns the consensus label plus a confidence signal. When the models agree, you can trust the label; when they disagree, the row is flagged for review.

Models in the pool: DeepSeek-v4, Llama-4-maverick, Qwen-3.5, NVIDIA Nemotron-3, GLM-5.1, MiniMax-m2.7.

### Pricing

Pay-per-event (no subscription):

- **$0.007 per URL classified** (charged on each result row written)
- **$0.01 per run** (one-time orchestration fee)

A 1,000-URL run costs ~$7.01.

### Input

```json
{
  "urls": ["https://stripe.com", "https://nytimes.com"],
  "taxonomy": ["fintech", "news_media", "developer_tools", "ecommerce", "other"],
  "consensusMode": "majority",
  "maxConcurrency": 5
}
````

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `urls` | string\[] | — | Public URLs to classify. |
| `taxonomy` | string\[] | — | 2–30 candidate categories. Should be mutually exclusive and include an `"other"` bucket. |
| `consensusMode` | `"majority"` | `"deep"` | `majority` | `majority` uses fewer models (faster). `deep` uses the full pool. |
| `maxConcurrency` | int | 5 | Parallel URL fetches (1–20). |

### Output (per URL)

```json
{
  "url": "https://stripe.com",
  "title": "Stripe | Financial Infrastructure for the Internet",
  "status": "ok",
  "category": "fintech",
  "confidence": null,
  "consensusMode": "majority",
  "durationMs": 1840
}
```

The `category` field returns the consensus answer when models agree, or `"other"` as a safe fallback when JSON parsing fails. `confidence` may be `null` while the post-processing extractor is being improved.

For URLs that take too long to fetch or where the consensus engine times out, `status: "error"` is returned with a reason — those rows are not charged.

### Use cases

- **Lead-gen filtering** — bucket scraped homepages by industry before SDR outreach.
- **Content moderation triage** — pre-tag URLs in user-submitted feeds.
- **Dataset labeling** — bootstrap a training set with consensus labels.
- **Affiliate / partner discovery** — group competitor sites by vertical.
- **Compliance pre-screening** — surface pages that may belong to regulated categories.

### Tips

- Treat the actor as a **first-pass classifier**: high-confidence rows go straight through, ambiguous or error rows go to a human queue.
- Categories work better when they are concrete and non-overlapping. Add `"other"` as the safety bucket.
- Heavy single-page-application URLs may exceed the 120s consensus timeout; expect a small percentage of `error` rows on JS-heavy targets.

### How it works

1. Fetches each URL (10s budget, follows redirects).
2. Extracts title + meta description + ~250 characters of body text.
3. Sends a compact classification prompt to the public consensus endpoint (`/v1/public`), which fans out to the 6-model pool and returns the agreed JSON label.
4. Parses the result and pushes one row per URL to the Apify dataset.

No personal data is stored — only the public page text and your taxonomy are sent for classification. The consensus engine is rate-limited at 10 requests per IP per day on the free public endpoint.

### Limitations (honest)

- The actor is a fresh listing (May 2026). Accuracy claims have not been independently benchmarked yet — early users help us calibrate.
- A small fraction of buyer test runs hit the public endpoint's per-IP rate limit on bursts. Use small batches (≤30 URLs/run) for now, or contact the publisher for a private endpoint key.
- `confidence` extraction is being tightened; for now `null` is common.

### Source

Built and maintained by [yanmiayn](https://yanmiayn.com). Bug reports and feature requests via the actor's Issues tab on Apify.

# Actor input Schema

## `urls` (type: `array`):

Public URLs to categorize. Each URL is fetched, summarized, and labeled by an 11-model consensus engine. Ideal for lead enrichment, market mapping, and ICP filtering.

## `taxonomy` (type: `array`):

The candidate categories the consensus engine will pick from. Tune these to your lead-gen ICP, vertical, or research question. Provide 2-30 categories.

## `consensusMode` (type: `string`):

majority = best of 5 models (fast, cheap). deep = best of 11 models (slower, +30% accuracy on ambiguous sites).

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

How many URLs to fetch in parallel. Higher = faster, but more memory. Default 5 is safe for 512MB. Bump to 10-20 if you raise memory.

## Actor input object example

```json
{
  "urls": [
    "https://stripe.com",
    "https://shopify.com",
    "https://notion.so",
    "https://linear.app",
    "https://cloudflare.com"
  ],
  "taxonomy": [
    "fintech",
    "developer_tools",
    "marketing_saas",
    "e-commerce",
    "b2b_saas",
    "consumer_app",
    "infrastructure",
    "other"
  ],
  "consensusMode": "majority",
  "maxConcurrency": 5
}
```

# 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 = {
    "urls": [
        "https://stripe.com",
        "https://shopify.com",
        "https://notion.so",
        "https://linear.app",
        "https://cloudflare.com"
    ],
    "taxonomy": [
        "fintech",
        "developer_tools",
        "marketing_saas",
        "e-commerce",
        "b2b_saas",
        "consumer_app",
        "infrastructure",
        "other"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("yanmiayn/consensus-web-classifier").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 = {
    "urls": [
        "https://stripe.com",
        "https://shopify.com",
        "https://notion.so",
        "https://linear.app",
        "https://cloudflare.com",
    ],
    "taxonomy": [
        "fintech",
        "developer_tools",
        "marketing_saas",
        "e-commerce",
        "b2b_saas",
        "consumer_app",
        "infrastructure",
        "other",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("yanmiayn/consensus-web-classifier").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 '{
  "urls": [
    "https://stripe.com",
    "https://shopify.com",
    "https://notion.so",
    "https://linear.app",
    "https://cloudflare.com"
  ],
  "taxonomy": [
    "fintech",
    "developer_tools",
    "marketing_saas",
    "e-commerce",
    "b2b_saas",
    "consumer_app",
    "infrastructure",
    "other"
  ]
}' |
apify call yanmiayn/consensus-web-classifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=yanmiayn/consensus-web-classifier",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Website Categorization API — 6-LLM Consensus URL Classifier",
        "description": "Stop hallucinated category labels. Run URLs through 6 LLMs voting in parallel (DeepSeek-v4, Llama-4, Qwen-3.5, Nemotron-3, GLM-5.1, MiniMax) for higher-confidence taxonomy classification. Lead-gen filtering, content moderation, dataset labeling. $0.007 per URL.",
        "version": "0.1",
        "x-build-id": "wMroVSob0A47ewxmg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/yanmiayn~consensus-web-classifier/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-yanmiayn-consensus-web-classifier",
                "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/yanmiayn~consensus-web-classifier/runs": {
            "post": {
                "operationId": "runs-sync-yanmiayn-consensus-web-classifier",
                "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/yanmiayn~consensus-web-classifier/run-sync": {
            "post": {
                "operationId": "run-sync-yanmiayn-consensus-web-classifier",
                "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",
                "required": [
                    "urls",
                    "taxonomy"
                ],
                "properties": {
                    "urls": {
                        "title": "URLs to classify",
                        "type": "array",
                        "description": "Public URLs to categorize. Each URL is fetched, summarized, and labeled by an 11-model consensus engine. Ideal for lead enrichment, market mapping, and ICP filtering.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "taxonomy": {
                        "title": "Taxonomy (candidate categories)",
                        "type": "array",
                        "description": "The candidate categories the consensus engine will pick from. Tune these to your lead-gen ICP, vertical, or research question. Provide 2-30 categories.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "consensusMode": {
                        "title": "Consensus mode",
                        "enum": [
                            "majority",
                            "deep"
                        ],
                        "type": "string",
                        "description": "majority = best of 5 models (fast, cheap). deep = best of 11 models (slower, +30% accuracy on ambiguous sites).",
                        "default": "majority"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrent fetches",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "How many URLs to fetch in parallel. Higher = faster, but more memory. Default 5 is safe for 512MB. Bump to 10-20 if you raise memory.",
                        "default": 5
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
