Examples
Update Settings
Configure YouTube Channel Scraper settings
The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
POST
https://api.lobstr.io/v1/squids/{squid_hash}Configure your YouTube Channel Email Scraper squid settings. Use the scraper parameters to control which content types are collected per channel.
Headers
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Content-TypestringheaderrequiredRequest body format. Value: application/json
Scraper Parameters
Set these parameters in the params object:
| Parameter | Type | Default | Description |
|---|---|---|---|
| get_videos | boolean | false | Collect up to 30 of the channel's most recent uploaded videos (title, URL, view count, published date, duration, thumbnail) |
| get_shorts | boolean | false | Collect up to 30 of the channel's most recent Shorts (title, URL, view count, thumbnail) |
| get_streams | boolean | false | Collect up to 30 of the channel's live and past streams (title, URL, view count, duration, thumbnail) |
| get_playlists | boolean | false | Collect up to 30 of the channel's public playlists (title, URL, video count, thumbnail) |
| get_comments | boolean | false | Collect comments for up to 5 of the videos/Shorts gathered by get_videos/get_shorts (up to 50 top-level comments + one reply page per thread). Requires get_videos or get_shorts to be enabled. |
Squid Settings
Configure general squid settings:
| Setting | Type | Description |
|---|---|---|
| name | string | Display name for your squid configuration |
| concurrency | integer | Number of parallel scraping threads (default: 1) |
| export_unique_results | boolean | Export only unique results (deduplicated) |
| to_complete | boolean | Run until all tasks complete |
| no_line_breaks | boolean | Remove line breaks from results |
Keep concurrency low (1-2) to avoid rate limiting from YouTube.
Code Examples
curl -X POST "https://api.lobstr.io/v1/squids/YOUR_SQUID_HASH" \ -H "Authorization: Token YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "YouTube Channel Email Scraper (1)", "concurrency": 1, "export_unique_results": true, "to_complete": false, "no_line_breaks": true, "params": {} }'
Response
201
{ "name": "YouTube Channel Email Scraper (1)", "concurrency": 1, "export_unique_results": true, "to_complete": false, "no_line_breaks": true, "params": {} }