Use YouTube Channel About, Playlists & Posts Finder with Python
Look up a YouTube channel's About page details - subscribers, views, country, join date, links - with optional playlist and Community Post snapshots nested into the same row. No cookies or login required.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"channelUrls": [
"https://www.youtube.com/@Apify"
],
"includeLinks": true,
"includePlaylists": false,
"includePostComments": false,
"includePostDetails": false,
"includePosts": false,
"maxPlaylists": 10,
"maxPostComments": 10,
"maxPosts": 10,
"mode": "profiles"
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | optional | Channel profile returns one row per channel with its About details. Playlists returns one row per public playlist, show, course, or podcast. Posts returns one row per public Community Post. |
channelUrls | array | required | Public YouTube channel URLs, @handles, or UC… channel IDs. One row set is produced for each channel. |
includeLinks | boolean | optional | In channel profile mode, include the external links shown on the public About page, with their titles and favicons. |
includePlaylists | boolean | optional | In channel profile mode, add a snapshot of the channel's public playlists, shows, courses, and podcasts to the same row. Use the playlists mode for one row per playlist. |
maxPlaylists | integer | optional | Maximum playlist, show, course, or podcast rows to collect per channel. Applies to the playlists mode and to nested profile snapshots. |
includePosts | boolean | optional | In channel profile mode, add a snapshot of the channel's public Community Posts to the same row. Use the posts mode for one row per post. |
maxPosts | integer | optional | Maximum Community Posts to collect per channel. Applies to the posts mode and to nested profile snapshots. YouTube exposes at most 200 posts per channel. |
includePostDetails | boolean | optional | Open each Community Post's public detail page to fill its exact ISO publish date and exact like count. Adds one request per post. |
includePostComments | boolean | optional | Collect public comments on each Community Post, up to the per-post limit. Adds one detail and one or more comment requests per post. |
maxPostComments | integer | optional | Maximum public top-level comments to keep per Community Post when comments are included. Replies are not expanded. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/pYQ5f68fSR1uvbb6D/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
Channel profile rows with About details, external links, and optional nested surfaces, plus one-row-per-playlist and one-row-per-Community-Post modes.
Questions before you run
Which inputs are required?
The published required fields are channelUrls
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build HY5JkbjyCn2pfM7Xf and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.