YouTube AI Classifier (Videos & Channels)
Pricing
$0.75 / 1,000 results
YouTube AI Classifier (Videos & Channels)
Classify YouTube videos and channels with AI: category, language, sentiment, keywords, and audience — from a search query or a list of URLs.
Classify any YouTube video or channel with AI — get structured insights in seconds: category & sub-category, language, sentiment, keywords, and full audience demographics (age distribution + gender split) — plus live stats, in one clean dataset.
Feed it a search query ("crypto podcast", "yoga for beginners") or a list of video/channel URLs, @handles, usernames, or IDs (mixed freely) and get one classified row per item. No YouTube API key needed, no quota headaches.
How to use (30 seconds)
- Enter a search query or paste video/channel URLs into the input form
- Optionally enable channel audit mode to also classify each channel's latest or most popular videos
- Click Start — results appear in the dataset, exportable as JSON, CSV, or Excel, or pull them via API
Example output (real run)
{"type": "video","id": "dQw4w9WgXcQ","url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)","channelTitle": "Rick Astley","publishedAt": "2009-10-25T06:57:33Z","viewCount": "1793028296","likeCount": "19245436","commentCount": "2444774","category": "Music","subCategory": "80s pop music","language": "English","languageCode": "en","sentiment": "positive","keywords": ["rick astley", "never gonna give you up", "80s music", "pop music", "rickroll", "meme"],"audiencePrimaryAge": "18-24","audienceAgeDistribution": { "13-17": 15, "18-24": 25, "25-34": 20, "35-44": 15, "45-54": 15, "55+": 10 },"audiencePrimaryGender": "male","audienceGenderSplit": { "male": 52, "female": 48 }}
What you get per item
| Field | Description |
|---|---|
type | video or channel |
id, url, title | Identity of the classified item |
category / subCategory | AI-assigned content category from a fixed taxonomy |
language / languageCode | Detected primary language (name + ISO code) |
sentiment | Overall sentiment of the content |
keywords | Key topics extracted by AI |
audiencePrimaryAge / audienceAgeDistribution | Dominant age group + full age breakdown (13-17 … 55+) |
audiencePrimaryGender / audienceGenderSplit | Dominant gender + percentage split |
viewCount, likeCount, commentCount, duration, tags | Live video stats (videos) |
subscriberCount, videoCount, country, customUrl | Live channel stats (channels) |
sourceChannelId | On videos found via channel audit mode — groups results by channel |
Live stats are fetched fresh on every run — even when a classification is served from cache, the numbers are current.
Use cases
- Influencer discovery & vetting — classify a list of channels before outreach: right topic, right language, right audience demographics?
- Brand safety — check sentiment and category of channels/videos before placing sponsorships
- Channel audits — one input, full picture: the channel plus its latest or most popular videos, all classified
- Content research — search a niche and see how the landscape is categorized, what keywords dominate, who it targets
- Dataset labeling — enrich video lists with structured labels for analytics or ML pipelines
Input examples
Search and classify:
{ "searchQuery": "personal finance india", "maxResults": 25 }
Classify specific items (URLs, @handles, usernames, ids — mixed):
{"targets": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ","mkbhd","UCu59yAFE8fM0sVNTipR4edw"]}
Full channel audit — classify a channel AND its videos (latest or most popular) in one run:
{"targets": ["@mkbhd"],"classifyChannelVideos": true,"videosOrder": "popular","videosPerChannel": 10,"maxResults": 11}
Tip: bare usernames are resolved via channel search, which can be ambiguous — use the exact
@handleor theUC…channel ID when precision matters.
Developer / API guide
This actor is a standard Apify Actor, so it doubles as a hosted API. You only need your own Apify API token — no YouTube API key, no backend setup.
- Actor ID:
trysmartapi~youtube-ai-classifier - Base URL:
https://api.apify.com/v2 - Auth: append
?token=<APIFY_TOKEN>to any URL, or send the headerAuthorization: Bearer <APIFY_TOKEN> - Get your token: Apify Console → Settings → API & Integrations
Replace
<APIFY_TOKEN>everywhere below with your real token. Keep it secret — treat it like a password (prefer theAuthorizationheader or an env var over putting it in URLs that get logged).
The one call you need — run and get results (synchronous)
run-sync-get-dataset-items starts a run, waits for it to finish, and returns
the classified rows as a JSON array in the response body. Best for small/medium
runs (it holds the connection open up to ~5 minutes).
POST https://api.apify.com/v2/acts/trysmartapi~youtube-ai-classifier/run-sync-get-dataset-items?token=<APIFY_TOKEN>Content-Type: application/json<input JSON> ← the same fields you'd fill in the input form
curl
curl -X POST \"https://api.apify.com/v2/acts/trysmartapi~youtube-ai-classifier/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"searchQuery": "personal finance india","maxResults": 10}'
Classify a specific mixed list (video URL, @handle, channel ID):
curl -X POST \"https://api.apify.com/v2/acts/trysmartapi~youtube-ai-classifier/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"targets": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ","@mkbhd","UCu59yAFE8fM0sVNTipR4edw"]}'
The response is a JSON array — one object per classified item (see What you get per item and the example above).
Python — plain requests (no SDK)
import osimport requestsAPIFY_TOKEN = os.environ["APIFY_TOKEN"]ACTOR = "trysmartapi~youtube-ai-classifier"resp = requests.post(f"https://api.apify.com/v2/acts/{ACTOR}/run-sync-get-dataset-items",params={"token": APIFY_TOKEN},json={"searchQuery": "personal finance india","maxResults": 10,},timeout=310,)resp.raise_for_status()items = resp.json() # list[dict] — one classified row per itemfor item in items:print(item["type"], "|", item.get("title"), "->",item["category"], "/", item["subCategory"],"|", item["sentiment"], "|", item["language"])
Python — official apify-client SDK
$pip install apify-client
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("trysmartapi~youtube-ai-classifier").call(run_input={"targets": ["@mkbhd"],"classifyChannelVideos": True,"videosOrder": "popular","videosPerChannel": 10,"maxResults": 11,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["type"], item.get("title"), "->", item["category"])
Large runs — start async, then fetch (non-blocking)
For big batches, start the run without waiting, poll its status, then read the dataset. This avoids the ~5-minute sync limit.
# 1. Start the run — returns immediately with a run id + defaultDatasetIdcurl -s -X POST \"https://api.apify.com/v2/acts/trysmartapi~youtube-ai-classifier/runs?token=<APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{ "searchQuery": "gaming", "maxResults": 100 }'# 2. Poll status (repeat until "status": "SUCCEEDED")curl -s "https://api.apify.com/v2/actor-runs/<RUN_ID>?token=<APIFY_TOKEN>"# 3. Fetch the classified rowscurl -s "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<APIFY_TOKEN>"
Add &format=csv (or xlsx, xml) to the dataset URL to download other
formats instead of JSON.
Input parameters
Send any of these in the JSON body. All are optional, but provide either
searchQuery or targets (you can use both).
| Field | Type | Default | Description |
|---|---|---|---|
searchQuery | string | — | Find videos by YouTube search and classify them |
targets | string[] | — | Video/channel URLs, channel IDs, @handles, or usernames — mixed freely |
maxResults | integer (1–100) | 5 | Max items to classify. You're only charged for successful classifications |
classifyChannelVideos | boolean | false | For each channel target, also classify its videos (full channel audit) |
videosOrder | "latest" | "popular" | "latest" | Which videos to pull per channel (only with classifyChannelVideos) |
videosPerChannel | integer (3–50) | 5 | Videos to classify per channel (only with classifyChannelVideos) |
includeInfo | boolean | true | Include live details (title, stats, publish date). Always fetched fresh |
regionCode | string | — | ISO 3166-1 alpha-2 country code for search (e.g. US, IN, GB) |
Give this to Claude / a coding agent
Paste the block below into Claude, Cursor, or any coding agent to have it wire
up the integration for you — it only needs your Apify token as APIFY_TOKEN.
Integrate the "YouTube AI Classifier" Apify Actor into my project.It classifies YouTube videos and channels with AI (category, sub-category,language, sentiment, keywords, and audience age/gender demographics) plus livestats. Auth is my Apify API token only — no YouTube API key needed.- Actor ID: trysmartapi~youtube-ai-classifier- Auth: read the token from the APIFY_TOKEN environment variable. Never hardcode it.- Simple (small runs) — one HTTP call returns results as a JSON array:POST https://api.apify.com/v2/acts/trysmartapi~youtube-ai-classifier/run-sync-get-dataset-items?token=$APIFY_TOKENContent-Type: application/jsonBody (JSON input, all optional — send searchQuery OR targets):{ "searchQuery": "<search text>", // find + classify videos"targets": ["<url|@handle|channelId|videoId>", ...],"maxResults": 10, // 1..100, default 5"classifyChannelVideos": false, // audit a channel's videos too"videosOrder": "latest", // or "popular""videosPerChannel": 5, // 3..50"includeInfo": true, // include live stats"regionCode": "US" } // optional ISO country code- Large runs: POST .../acts/trysmartapi~youtube-ai-classifier/runs to start async,poll GET .../actor-runs/<id> until status == "SUCCEEDED", thenGET .../datasets/<defaultDatasetId>/items for the rows.Each result row has: type ("video"|"channel"), id, url, title, category,subCategory, language, languageCode, sentiment, keywords[], audiencePrimaryAge,audienceAgeDistribution{}, audiencePrimaryGender, audienceGenderSplit{}, pluslive stats (viewCount/likeCount/commentCount for videos;subscriberCount/videoCount/country for channels).Write a small, reusable client function for my stack (ask me which language ifunclear), read APIFY_TOKEN from the environment, handle HTTP errors, and show ausage example that classifies a search query and prints category + sentimentper item.
Pricing
Pay per result — you're only charged for successfully classified items. Failed lookups cost nothing. The default run classifies just 5 items, so trying it out costs next to nothing; raise Max items when you're ready to scale.
Need raw API access?
This actor is powered by our YouTube data platform. If you'd rather integrate directly in your own code (search, channels, videos, full comment threads with replies, and AI classification), get an API key on RapidAPI: YouTube AI Classification & Data API — v3-compatible JSON, no daily quota.
Questions or a field you need added? Open an issue on this actor — feature requests ship fast.