# Whatsapp Channel Directory (`romy/whatsapp-channel-directory`) Actor

Search WhatsApp's channel directory by keyword and country. Returns channel metadata (name, description, subscribers, picture) plus the first N messages per channel.

- **URL**: https://apify.com/romy/whatsapp-channel-directory.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Social media, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 channel scrapeds

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

## WhatsApp Channel Directory

Search **WhatsApp's channel directory** by keyword and country. Returns channel metadata (name, description, subscribers, picture) plus the first N messages per channel.

### What does WhatsApp Channel Directory do?

This Actor lets you explore WhatsApp's growing channel ecosystem. It queries the channel directory by keyword (e.g., "news", "tech", "sports") and country, then extracts channel metadata plus recent messages. Perfect for **brand monitoring**, **competitor analysis**, **trend research**, or **channel discovery**. All data is fetched in real time from WhatsApp's channel directory.

### Why use WhatsApp Channel Directory?

- **Brand & Competitor Intelligence** — Track which brands have channels, how many subscribers, what they're broadcasting
- **Trend Research** — Discover trending channels and topics in your market
- **Influencer Outreach** — Find relevant channels to advertise or partner with
- **Market Expansion** — Identify audience clusters by country and keyword
- **Content Strategy** — Analyze competitor messaging and engagement patterns

### How to use WhatsApp Channel Directory

1. **Open the Actor** on Apify or use the API.
2. **Set search criteria:**
   - `query` — Channel name filter (e.g., "news", "tech", "fitness")
   - `countries` — ISO codes (e.g., `["ID", "SG", "MY"]`)
   - `limit` — Max channels to return (default: 20, max: 200)
   - `messageCount` — Messages per channel (default: 10, max: 50)
3. **Run the Actor** and collect data into the default dataset.
4. **Download results** as JSON, CSV, HTML, or Excel.

#### Example Input

```json
{
  "query": "news",
  "countries": ["ID"],
  "limit": 50,
  "messageCount": 15
}
````

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `query` | string | — | — | Channel name filter (case-insensitive). Omit to list all. |
| `countries` | string\[] | — | `["ID"]` | ISO country codes. |
| `limit` | integer | — | 20 | Max channels (max 200). |
| `messageCount` | integer | — | 10 | Messages per channel (max 50). |

### Output

One record per channel — raw response from WhatsApp's directory API, with a `messages` field appended containing recent messages from that channel:

```json
{
  "id": "120363...@newsletter",
  "thread_metadata": {
    "name": {"text": "Berita Hari Ini"},
    "description": {"text": "Kanal berita terkini"},
    "subscribers_count": "12500",
    "invite": "ABCDEF",
    "picture": {"url": "https://..."},
    "preview": {"url": "https://..."}
  },
  "messages": [
    {
      "MessageServerID": 42,
      "Timestamp": "2026-07-06T10:00:00Z",
      "Type": "text",
      "Message": {"conversation": "Hello"}
    }
  ]
}
```

### Data table

| Field | Type | Description |
|---|---|---|
| `id` | string | Unique WhatsApp channel ID (ends in `@newsletter`) |
| `thread_metadata` | object | Raw channel metadata from WhatsApp (name, description, subscribers, picture, invite) |
| `messages` | array | Recent channel messages (raw, limited by `messageCount`) |
| `messages[].MessageServerID` | integer | Message ID |
| `messages[].Timestamp` | string | ISO 8601 timestamp |
| `messages[].Type` | string | Message type (`text`, `media`, etc.) |
| `messages[].Message` | object | Message content by type |

### Pricing / Cost estimation

**Pay-per-event pricing:**

- $0.05 per Actor start
- **$0.05 per channel scraped** ($50 per 1,000 channels)

| Channels | Cost |
|---|---|
| 20 | $1.05 |
| 100 | $5.05 |
| 1,000 | $50.05 |

### Tips & Advanced options

#### Optimize your runs

- **Narrow the query** — Specific keywords (`"python"` vs. `"a"`) return fewer channels → lower cost
- **Reduce message count** — Set `messageCount: 5` instead of 50 to cut API calls
- **Batch by country** — Run multiple times with different country codes for parallel processing
- **Use limit wisely** — Start with `limit: 20` to test, then scale up

#### Known limitations

- Message history is limited to the most recent messages stored by WhatsApp
- Channel subscriber counts are approximate (not real-time)
- Some channels may have restricted message visibility

#### Troubleshooting

- **No results?** — Try a broader query or different countries
- **Partial data?** — Some channels restrict message preview; this is enforced by WhatsApp
- **Rate limiting?** — The Actor respects WhatsApp's rate limits automatically

### FAQ & Support

**Is this legal?**\
Yes. WhatsApp Channels are publicly accessible — no account required to browse the directory.

**Can I scrape private channels?**\
No. This Actor accesses only public channels listed in the WhatsApp channel directory.

**How fresh is the data?**\
Channel metadata and messages are fetched real-time from WhatsApp's servers.

**What if a channel has thousands of messages?**\
Use `messageCount` to limit results. The Actor will fetch only the most recent N messages per channel.

**Support & Feedback**\
Found a bug? Have a feature request? Check the [Issues tab](https://github.com/apify/whatsapp-channel-directory/issues) or contact the maintainer for a custom solution.

***

**Built with ❤️ for the Apify community.**\
[Apify](https://apify.com) | [Store](https://apify.com/store) | [Docs](https://docs.apify.com)

# Actor input Schema

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

Case-insensitive channel name filter. Omit to list all recommended channels.

## `countries` (type: `array`):

Country code filter (ISO 3166-1 alpha-2). Default: \["ID"].

## `limit` (type: `integer`):

Maximum number of channels to return. Default: 20, max: 200.

## `messageCount` (type: `integer`):

Number of recent messages to fetch per channel. Default: 10, max: 50.

## Actor input object example

```json
{
  "countries": [
    "ID"
  ],
  "limit": 20,
  "messageCount": 10
}
```

# Actor output Schema

## `dataset` (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 = {
    "countries": [
        "ID"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/whatsapp-channel-directory").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 = { "countries": ["ID"] }

# Run the Actor and wait for it to finish
run = client.actor("romy/whatsapp-channel-directory").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 '{
  "countries": [
    "ID"
  ]
}' |
apify call romy/whatsapp-channel-directory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=romy/whatsapp-channel-directory",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Whatsapp Channel Directory",
        "description": "Search WhatsApp's channel directory by keyword and country. Returns channel metadata (name, description, subscribers, picture) plus the first N messages per channel.",
        "version": "0.0",
        "x-build-id": "VPvsuCNuSrumP4RxB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/romy~whatsapp-channel-directory/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-romy-whatsapp-channel-directory",
                "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/romy~whatsapp-channel-directory/runs": {
            "post": {
                "operationId": "runs-sync-romy-whatsapp-channel-directory",
                "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/romy~whatsapp-channel-directory/run-sync": {
            "post": {
                "operationId": "run-sync-romy-whatsapp-channel-directory",
                "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",
                "properties": {
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Case-insensitive channel name filter. Omit to list all recommended channels."
                    },
                    "countries": {
                        "title": "Countries",
                        "type": "array",
                        "description": "Country code filter (ISO 3166-1 alpha-2). Default: [\"ID\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "limit": {
                        "title": "Max Channels",
                        "type": "integer",
                        "description": "Maximum number of channels to return. Default: 20, max: 200.",
                        "default": 20
                    },
                    "messageCount": {
                        "title": "Messages Per Channel",
                        "type": "integer",
                        "description": "Number of recent messages to fetch per channel. Default: 10, max: 50.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
