# YouTube Channel Database Search — Find Creators by Niche (`northglasslabs/youtube-channel-database-search`) Actor

Search YouTube channels by niche keyword with optional subscriber range filters. Get subscriber counts, video counts, view counts, descriptions, and channel metadata as structured JSON.

- **URL**: https://apify.com/northglasslabs/youtube-channel-database-search.md
- **Developed by:** [North Glass Labs](https://apify.com/northglasslabs) (community)
- **Categories:** Social media, Videos
- **Stats:** 7 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.34 / 1,000 result storeds

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/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/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## YouTube Channel Database Search — Find Creators by Niche

> Search **YouTube channels** by niche keyword and optional subscriber range. Export channel metadata: name, subscriber count, video count, total views, description, contact email, country, and joined date. Built for **influencer outreach**, **B2B lead generation**, **niche research**, and **media-buyer audience analysis**.

### What it does

This Apify Actor searches YouTube's channel type-filtered results pages and extracts structured metadata for each channel found:

- 🎬 **Channel name** and canonical channel URL
- 👥 **Subscriber count** (parsed from `1.23M`, `450K`, etc.)
- 🎥 **Video count** posted to the channel
- 📊 **Total views** across all videos
- 📝 **Channel description** (search-visible snippet)
- 📧 **Contact email** (extracted from the channel's About page)
- 🌍 **Country** (where the channel reports being based)
- 📅 **Joined date** (when the channel was created)

### Why channel-level data matters

Keywords surface *videos*, but for outreach and partnership decisions you need **channel** data:

- Find **micro-influencers** (1K–100K subs) in a specific niche for affordable sponsorships
- Build a **creator database** with emails ready for outreach campaigns
- Identify **rising channels** by filtering on subscriber ranges
- Segment by **country** for localized media buys
- Benchmark competitors' growth using video count + total views

### Input

| Field            | Type    | Required | Default | Description                                                      |
|------------------|---------|----------|---------|------------------------------------------------------------------|
| `searchQuery`    | string  | ✅       | —       | Niche keyword or phrase (e.g. `cooking`, `tech reviews`)         |
| `maxResults`     | integer | ❌       | `50`    | Max channels to return (1–500)                                   |
| `minSubscribers` | integer | ❌       | —       | Exclude channels below this subscriber count                     |
| `maxSubscribers` | integer | ❌       | —       | Exclude channels above this subscriber count                    |

#### Example input

```json
{
  "searchQuery": "sustainable fashion",
  "maxResults": 100,
  "minSubscribers": 5000,
  "maxSubscribers": 500000
}
````

### Output

Each dataset record:

```json
{
  "channelName": "SustainableStyle Co.",
  "channelUrl": "https://www.youtube.com/channel/UC1234abcd",
  "subscriberCount": 84200,
  "videoCount": 412,
  "totalViews": 5230000,
  "description": "Eco-friendly fashion tips, thrift hauls, and brand reviews.",
  "email": "hello@sustainablestyle.co",
  "country": "United States",
  "joinedDate": "March 15, 2018"
}
```

### How it works

1. **Search** — Opens YouTube channel search with the `type=channel` filter.
2. **Paginate** — Scrolls the rendered results until the requested count is reached or the page stops growing.
3. **Parse** — Merges embedded `ytInitialData` results with rendered channel cards and removes duplicates.
4. **Filter** — Applies subscriber bounds when YouTube exposes a numeric count. Channels with hidden counts remain in the results rather than being misclassified as zero.
5. **Enrich** — Visits each surviving channel's `/about` page to extract available public details.
6. **Export** — Pushes clean records to the Apify dataset.

### Tech stack

- **Python** + **Apify SDK** (`async with Actor`)
- **Playwright/Chromium** for JavaScript-rendered search and About pages
- **BeautifulSoup** for HTML and embedded `ytInitialData` parsing
- Compact-count parsing for values such as `1.23M`, `450K`, and `2B`
- Residential-proxy retries when direct access is blocked

### Use cases

- **Influencer marketing agencies** building target lists by niche + subscriber tier
- **B2B SaaS** doing founder-led outreach to niche creators
- **Affiliate managers** identifying channels for rev-share offers
- **Media buyers** segmenting creators by country and audience size
- **Competitive intelligence** analysts benchmarking channel growth

### Local development

```bash
cd youtube-channel-database-search
python -m pip install -r requirements.txt
apify run                   # run locally with simulated platform env
apify validate-schema       # validate .actor/input_schema.json
apify push                  # deploy to Apify platform (when ready)
```

### Notes & limitations

- YouTube serves results as JavaScript-rendered pages. The Actor performs controlled scrolling, but YouTube can still cap or vary the number of channel cards returned for a query.
- Subscriber bounds are applied only when YouTube exposes a numeric subscriber count; channels with hidden counts are retained with their visible subscriber text.
- Email extraction depends on the channel having a public email in its About page. Many channels do not expose emails publicly.
- Country and joined date depend on YouTube rendering these fields in the About page markup, which varies by channel type (brand vs personal).

### Legal & ethical notes

- This actor only accesses publicly visible YouTube pages.
- Respect YouTube's [Terms of Service](https://www.youtube.com/t/terms) and [robots.txt](https://www.youtube.com/robots.txt).
- Use rate limits responsibly; do not overload YouTube's servers.
- For production workloads, prefer the official [YouTube Data API v3](https://developers.google.com/youtube/v3).

***

Generated by **Hermes Agent (Atreyu) — Autonomous Apify Engine**.

# Actor input Schema

## `searchQuery` (type: `string`):

Search term to find YouTube channels by niche (e.g., 'cooking', 'tech reviews', 'fitness')

## `maxResults` (type: `integer`):

Maximum number of channels to extract

## `minSubscribers` (type: `integer`):

Filter channels with at least this many subscribers (0 = no minimum)

## `maxSubscribers` (type: `integer`):

Filter channels with at most this many subscribers (0 = no maximum)

## Actor input object example

```json
{
  "searchQuery": "cooking",
  "maxResults": 50,
  "minSubscribers": 0,
  "maxSubscribers": 0
}
```

# 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 = {
    "searchQuery": "cooking",
    "maxResults": 50,
    "minSubscribers": 0,
    "maxSubscribers": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("northglasslabs/youtube-channel-database-search").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 = {
    "searchQuery": "cooking",
    "maxResults": 50,
    "minSubscribers": 0,
    "maxSubscribers": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("northglasslabs/youtube-channel-database-search").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 '{
  "searchQuery": "cooking",
  "maxResults": 50,
  "minSubscribers": 0,
  "maxSubscribers": 0
}' |
apify call northglasslabs/youtube-channel-database-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Channel Database Search — Find Creators by Niche",
        "description": "Search YouTube channels by niche keyword with optional subscriber range filters. Get subscriber counts, video counts, view counts, descriptions, and channel metadata as structured JSON.",
        "version": "0.0",
        "x-build-id": "UxsQJnIHoiIScG6bQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/northglasslabs~youtube-channel-database-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-northglasslabs-youtube-channel-database-search",
                "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/northglasslabs~youtube-channel-database-search/runs": {
            "post": {
                "operationId": "runs-sync-northglasslabs-youtube-channel-database-search",
                "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/northglasslabs~youtube-channel-database-search/run-sync": {
            "post": {
                "operationId": "run-sync-northglasslabs-youtube-channel-database-search",
                "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": [
                    "searchQuery"
                ],
                "properties": {
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search term to find YouTube channels by niche (e.g., 'cooking', 'tech reviews', 'fitness')"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of channels to extract",
                        "default": 50
                    },
                    "minSubscribers": {
                        "title": "Min Subscribers",
                        "type": "integer",
                        "description": "Filter channels with at least this many subscribers (0 = no minimum)",
                        "default": 0
                    },
                    "maxSubscribers": {
                        "title": "Max Subscribers",
                        "type": "integer",
                        "description": "Filter channels with at most this many subscribers (0 = no maximum)",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
