{"slug": "build-a-youtube-channel-finder-in-python-that-qualifies-creators", "title": "Build a YouTube Channel Finder in Python That Qualifies Creators", "summary": "A developer built a Python workflow using Apify's YouTube creator lead finder Actor to qualify channels for creator outreach. The tool discovers channels by niche, filters by recent activity and view counts, and outputs structured data rows for review. It emphasizes qualifying recent channel state rather than just subscriber counts.", "body_md": "A basic **YouTube channel finder** returns channels that match a name or topic. That is useful for lookup. It is not enough for creator outreach.\n\nIf you are building a sponsor list, recruiting educators, or selling a service to creators, the real question is narrower:\n\nWhich channels match my niche, still publish, reach enough viewers, and expose a public route for business contact?\n\nThis tutorial builds that workflow in Python. It starts without a seed list, discovers candidates from a niche, qualifies recent public performance, and returns one structured Dataset row per channel.\n\nThe input should describe the opportunity, not a pile of channel URLs:\n\n```\nrun_input = {\n    \"preset\": \"qualified_shortlist\",\n    \"niches\": [\"AI automation\", \"B2B SaaS\"],\n    \"languages\": [\"en\"],\n    \"countries\": [\"US\", \"CA\", \"GB\"],\n    \"worldwideLanguageMode\": False,\n    \"minSubscribers\": 5_000,\n    \"maxSubscribers\": 250_000,\n    \"minVideosPerMonth\": 1,\n    \"lastUploadWithinDays\": 60,\n    \"minRecentMedianViews\": 1_000,\n    \"contentFormats\": [\"long-form\", \"Shorts\"],\n    \"requirePublicBusinessContact\": False,\n    \"maxChannels\": 10,\n    \"videosAnalyzedPerChannel\": 10,\n    \"maximumSearchCalls\": 12,\n}\n```\n\nThe output should be reviewable without opening every channel manually. Useful fields include:\n\nThat is the difference between a channel scraper and a creator-prospecting dataset.\n\nSubscriber count is easy to retrieve, so many YouTube scraping tutorials stop there. But two channels with 50,000 subscribers can be completely different prospects:\n\nA useful YouTube creator finder therefore has to qualify the recent channel state, not only copy lifetime totals.\n\nInstall the Apify client:\n\n```\npip install apify-client\n```\n\nStore your Apify token in an environment variable. Do not paste it into source code, a notebook, a screenshot, or a public repository.\n\n```\nexport APIFY_API_TOKEN=\"...\"\n```\n\nThen call the Actor and retrieve its default Dataset:\n\n``` python\nimport os\nfrom apify_client import ApifyClient\n\nclient = ApifyClient(os.environ[\"APIFY_API_TOKEN\"])\n\nrun_input = {\n    \"preset\": \"qualified_shortlist\",\n    \"niches\": [\"AI automation\", \"B2B SaaS\"],\n    \"languages\": [\"en\"],\n    \"countries\": [\"US\", \"CA\", \"GB\"],\n    \"worldwideLanguageMode\": False,\n    \"minSubscribers\": 5_000,\n    \"maxSubscribers\": 250_000,\n    \"minVideosPerMonth\": 1,\n    \"lastUploadWithinDays\": 60,\n    \"minRecentMedianViews\": 1_000,\n    \"contentFormats\": [\"long-form\", \"Shorts\"],\n    \"requirePublicBusinessContact\": False,\n    \"maxChannels\": 10,\n    \"videosAnalyzedPerChannel\": 10,\n    \"maximumSearchCalls\": 12,\n}\n\nrun = client.actor(\"kazkn/youtube-creator-lead-finder\").call(\n    run_input=run_input\n)\n\nitems = client.dataset(run[\"defaultDatasetId\"]).list_items().items\n\nfor creator in items:\n    print(\n        creator[\"channelName\"],\n        creator[\"channelUrl\"],\n        creator.get(\"recentMedianViews\"),\n        creator.get(\"opportunityScore\"),\n    )\n```\n\nThe Actor writes one deduplicated row per `channelId`\n\nwithin the run. Separate runs use separate Datasets, so the same channel can legitimately appear again in a later search.\n\nCountry and language are different filters. A French-speaking creator might be based in France, Canada, Belgium, Switzerland, Morocco, or somewhere else entirely.\n\nTo find French-speaking creators without forcing one country:\n\n```\nrun_input = {\n    \"preset\": \"quick_leads\",\n    \"niches\": [\"AI agents\"],\n    \"languages\": [\"fr\"],\n    \"countries\": [],\n    \"worldwideLanguageMode\": True,\n    \"maxChannels\": 5,\n    \"videosAnalyzedPerChannel\": 5,\n    \"maximumSearchCalls\": 5,\n}\n```\n\nThe discovery hints guide the search. The output still keeps confirmed language evidence and confidence separate from geography. A search region is not silently presented as a creator’s declared country.\n\nFor outreach, “active” should be explicit. Three inputs do most of the work:\n\n```\n{\n    \"minVideosPerMonth\": 2,\n    \"lastUploadWithinDays\": 45,\n    \"minRecentMedianViews\": 2_000,\n}\n```\n\nThe Actor samples a bounded number of recent videos per candidate. It calculates cadence over 30 and 90 days, then computes recent median and average views from the available sample.\n\nMedian views are especially useful because one viral upload can inflate the average. You should still inspect the sample size and warnings before treating any metric as complete.\n\nThe same niche can contain very different production workflows. A thumbnail agency may want long-form channels. A vertical-video editor may want Shorts-heavy creators. A webinar platform may prefer live streams.\n\n```\n{\n    \"contentFormats\": [\"long-form\"]\n}\n```\n\nThe output exposes `shortsRatio`\n\n, `longFormRatio`\n\n, `liveRatio`\n\n, and `formatConfidence`\n\n. Shorts detection from the official API uses a documented duration heuristic, so the Dataset can include a warning instead of pretending the classification is exact.\n\nA **YouTube email finder** can mean two very different things:\n\nThis workflow only does the first.\n\n```\n{\n    \"preset\": \"contact_ready\",\n    \"requirePublicBusinessContact\": True,\n    \"contactTypes\": [\"business_email\", \"website\", \"social\"],\n}\n```\n\nEach returned contact keeps its type, value, source URL, collection time, public status, and confidence. The current provider reads public channel text. It does not access YouTube’s protected business-email field, bypass CAPTCHA, sign in, guess private addresses, or fetch linked websites.\n\nIf a protected email is unavailable, that absence is a real result. It should not be replaced by a guessed pattern.\n\nApify can export the Dataset directly to CSV, JSON, or Excel. If you need a small CSV for manual review, keep the qualification and provenance columns:\n\n``` python\nimport csv\n\ncolumns = [\n    \"channelId\",\n    \"channelName\",\n    \"channelUrl\",\n    \"primaryLanguage\",\n    \"declaredCountry\",\n    \"subscriberCount\",\n    \"lastUploadAt\",\n    \"estimatedVideosPerMonth\",\n    \"recentMedianViews\",\n    \"publicBusinessEmail\",\n    \"contactSourceUrl\",\n    \"opportunityScore\",\n]\n\nwith open(\"youtube-creators.csv\", \"w\", newline=\"\", encoding=\"utf-8\") as file:\n    writer = csv.DictWriter(file, fieldnames=columns, extrasaction=\"ignore\")\n    writer.writeheader()\n    writer.writerows(items)\n```\n\nDo not drop `contactSourceUrl`\n\n, `opportunityReasons`\n\n, or `warnings`\n\nin the production pipeline. They are what let a human review why a creator qualified and where a contact came from.\n\nYouTube discovery has quota and latency costs. A sensible workflow performs cheap discovery first, then enriches only the best candidates.\n\nStart small:\n\nThen tighten the filters. Requiring a contact, high cadence, high median views, a narrow country, and a small subscriber band all at once can correctly return zero rows.\n\nThe quickest path is the public **YouTube Channel Finder by Niche** Task. It opens with a bounded, editable input and the qualified-creator Dataset view:\n\n[Run the YouTube Channel Finder by Niche](https://apify.com/kazkn/youtube-creator-lead-finder/examples/youtube-channel-finder-by-niche?utm_source=devto&utm_medium=organic_content&utm_campaign=youtube_creator_finder_seo_20260825&utm_content=python_channel_finder)\n\nFor all filters, output fields, limits, and live pricing, use the full [YouTube Creator Lead Finder](https://apify.com/kazkn/youtube-creator-lead-finder?utm_source=devto&utm_medium=organic_content&utm_campaign=youtube_creator_finder_seo_20260825&utm_content=python_channel_finder_actor).\n\nThe useful output is not a longer list. It is a list you can explain, review, and act on.", "url": "https://wpnews.pro/news/build-a-youtube-channel-finder-in-python-that-qualifies-creators", "canonical_source": "https://dev.to/kinderbb_47a004c5a2093289/build-a-youtube-channel-finder-in-python-that-qualifies-creators-9cn", "published_at": "2026-08-24 23:58:37+00:00", "updated_at": "2026-08-25 00:43:27.870482+00:00", "lang": "en", "topics": ["developer-tools", "ai-products"], "entities": ["Apify", "YouTube"], "alternates": {"html": "https://wpnews.pro/news/build-a-youtube-channel-finder-in-python-that-qualifies-creators", "markdown": "https://wpnews.pro/news/build-a-youtube-channel-finder-in-python-that-qualifies-creators.md", "text": "https://wpnews.pro/news/build-a-youtube-channel-finder-in-python-that-qualifies-creators.txt", "jsonld": "https://wpnews.pro/news/build-a-youtube-channel-finder-in-python-that-qualifies-creators.jsonld"}}