# Clutch B2B Agency Directory Scraper (`scrapyx/clutch-agencies-scraper`) Actor

Scrapes B2B service-provider rankings from Clutch.co (IT/web/marketing/design agencies) by category. Returns name, rating, review count, price range and address from a single search call, with an optional detail pass for full company description and service packages.

- **URL**: https://apify.com/scrapyx/clutch-agencies-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.84 / 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?

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

## Clutch B2B Agency Directory Scraper

Scrapes B2B service-provider rankings from
**[Clutch.co](https://clutch.co)** — the leading directory for IT/web/
marketing/design agencies, ranked per category with verified client
reviews. A genuinely new data-type for this portfolio: agency/vendor
intelligence, not consumer listings, jobs, or product reviews.

Public data only. No login, no cookies, no browser.

### The one thing you need to know before using this

Search results are **Schema.org microdata** (`itemprop`/`itemscope`),
not JSON — every field lives on a `<meta content="...">`,
`<img src="...">` or `<a href="...">` element. Detail pages, by contrast,
carry real `LocalBusiness` JSON-LD with the full company description.
See [`CRAWLING_METHOD.md`](CRAWLING_METHOD.md) for the full trail,
including three dead-end targets tried and abandoned before landing here.

### What you get

Three record types share one dataset, told apart by `recordType`.

#### `PROVIDER` — one row per agency/company

List cards already carry name, profile URL, phone, aggregate rating
(value/count/best/worst), price range and full postal address. Turn on
**Fetch provider detail pages** to also attach `providerDetail`, which
adds the full company description and a named list of service packages —
neither present on the list page.

#### `SEARCH_SUMMARY` — one row per category query

Pages fetched, providers returned, and `segmentResolved` — whether the
category actually matched something upstream.

#### `ERROR` — one row per input that failed

So every entry in **Categories** maps to at least one output row.

### Input

| Field | What it does |
| --- | --- |
| **Categories** | Clutch category slugs (`it-services`, `web-developers`, `digital-marketing`) — one search per entry |
| **Fetch provider detail pages** | adds full description + service packages (off by default — one extra request per provider) |
| **Max providers / max pages per category** | pagination caps — see the dedup note below |

#### Example

```json
{
  "categories": ["it-services", "digital-marketing"],
  "includeProviderDetails": true,
  "maxItems": 50
}
```

### Notes on reliability

- **A category page mixes several sections** — a "Leaders Matrix" ranking
  widget, a "Directory" list, "Sponsor"/"featured" slots — and some of
  them **repeat across `?page=N`** (verified live: ~45% id overlap
  between page 1 and page 2). This actor dedupes by provider id and stops
  once a page carries no new providers, so you always get a clean,
  duplicate-free set regardless of that overlap.
- **A bogus category answers a clean HTTP 404** — reported as
  `segmentResolved: false`, not silently widened to some default/broader
  listing.
- **A dead/renamed profile slug answers a clean HTTP 404** — the search
  row is still emitted, with `providerDetail: null`.
- **No hard WAF was observed** — a per-TLS-profile split, not a blanket
  block (some profiles clean, some 403); the client rotates through a
  wide profile pool automatically.

### Output envelope

Every record carries `_input`, `_source` and `_scrapedAt`. Since search
results are microdata rather than a single upstream JSON object, each
`PROVIDER` row's `provider` field is this actor's own explicit field
extraction (not a renamed copy of a JSON blob, because none exists on
that page) — the `providerDetail` field, when requested, IS raw JSON-LD
passed through verbatim.

See [`CRAWLING_METHOD.md`](CRAWLING_METHOD.md) for the full
reverse-engineering trail.

# Actor input Schema

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

Clutch category slugs as they appear in its own URLs, e.g. 'it-services', 'web-developers', 'digital-marketing'. One search per entry, each with its own SEARCH\_SUMMARY row. An unrecognised category is reported as segmentResolved=false rather than erroring out the whole run.

## `includeProviderDetails` (type: `boolean`):

Also fetch each provider's profile page for the full company description and a named list of service packages -- neither present on the search results page. Costs one extra request per provider. Off by default.

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

Stop paginating a category after this many distinct providers. Set to 0 for unlimited (still bounded by Max pages).

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

Hard cap on pagination depth, independent of maxItems. A category page mixes several sections that partially repeat across pages -- this actor dedupes by provider id and stops once a page carries no new providers, so this is mainly a cost guard.

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

Upper bound on requests in flight at once, across searches and detail fetches.

## `minRequestInterval` (type: `integer`):

Paces request starts (not held inside a concurrency slot) rather than raw concurrency.

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

Clutch showed a per-TLS-profile split in recon (some profiles 403, most clean) rather than a hard WAF. Residential proxy is the default, matching this portfolio's standard baseline.

## Actor input object example

```json
{
  "categories": [
    "it-services"
  ],
  "includeProviderDetails": false,
  "maxItems": 100,
  "maxPages": 5,
  "maxConcurrency": 5,
  "minRequestInterval": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# 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 = {
    "categories": [
        "it-services"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/clutch-agencies-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 = { "categories": ["it-services"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/clutch-agencies-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 '{
  "categories": [
    "it-services"
  ]
}' |
apify call scrapyx/clutch-agencies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/clutch-agencies-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/mx4z2TMfOB7sc8Q0U/builds/3sL2cwRgf5ltZGETZ/openapi.json
