# 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:** 3 total users, 3 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 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

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

Download the OpenAPI definition: https://api.apify.com/v2/actors/o8c0YLnKGJuj8SbZl/builds/VPvsuCNuSrumP4RxB/openapi.json
