Prerequisites
- A Bright Data account
- cURL, Python 3.9+, or Node.js 18+ installed
1
Get your API key
Go to the user settings page in your Bright Data account and create an API key, or use one you already have.If you don’t have an account yet, sign up at brightdata.com. New accounts get 5,000 free credits every month, no credit card required. See the free tier.
2
Send a request
We’ll use the Channels endpoint. The quickest route is the Bright Data Python SDK (The SDK prints the returned records from
pip install brightdata-sdk), which waits for the result for you. The other tabs call the API directly with a synchronous request. Replace YOUR_API_KEY with your API key:result.data. It waits up to 240 seconds for the result, so you don’t handle a 202 yourself. With cURL, Python or Node.js you should see a 200 status code and a JSON array. A 202 means the scrape needs longer than 1 minute; see the note below. Processing time varies with target-site conditions and scraper workload.A synchronous request waits up to 1 minute. If the Bright Data YouTube Scraper API needs longer, the response is HTTP
202 with a snapshot_id instead of channel data, and collection continues asynchronously. Fetch the result with the async workflow or have it pushed to you with webhook delivery.3
Review the response
The Bright Data YouTube Scraper API returns a JSON array with structured channel data:Each channel object includes fields covering subscriber counts, video counts, description, and more. See the full response schema.
Common questions
Can I scrape multiple channels in one request?
Yes. Add more objects to the input array. Bright Data recommends 20 URLs or fewer per synchronous request, a best practice rather than a hard limit. For larger batches, use the async/trigger endpoint.
Getting a 401 or 403 error?
Verify your API key is correct and hasn’t expired. Create a new API key in Account settings. See the authentication guide for details.Request is timing out?
Synchronous requests have a 1-minute timeout. If the request exceeds this limit, the API returns HTTP202 with a snapshot_id and finishes the job asynchronously. Use the async workflow for large batches.
Empty or partial response data?
Verify the YouTube channel URL is publicly accessible and correctly formatted. The URL should follow the patternhttps://www.youtube.com/@handle.
Do I have to call the API directly?
No. The Bright Data SDKs, the CLI and coding-agent tools call the same Scraper API, so you can start from whichever fits your stack.Next steps
Endpoints
One request per endpoint, each with a captured response.
Async batch requests
Scrape hundreds of URLs in a single batch job.
Set up webhooks
Receive results automatically when scraping completes.