Add Tasks
Add tasks to your YouTube Search Scraper squid
https://api.lobstr.io/v1/tasksAdd URLs or inputs to your YouTube Search Scraper squid.
2bfd28f2e9d6012d6d557072fda474daHeaders
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Content-TypestringheaderrequiredMust be application/json. Value: application/json
Body
squidstringrequiredHash ID of your squid.
tasksarrayrequiredArray of task objects.
Task Fields
tasks[].url/keywordstringrequiredA YouTube video URL, a YouTube channel URL (@handle, /c/Name, /channel/UC..., /user/Name, or a bare custom URL -- optionally with a /videos, /shorts, /streams, or /playlists suffix to list that tab instead of the channel's profile), a hashtag URL, a playlist URL, a YouTube search-results URL, or just plain search-query text. Anything not recognized as a supported YouTube URL is searched verbatim, exactly like typing it into YouTube's search bar (this deliberately includes non-YouTube URLs, e.g. "google.com" is searched as text, not rejected). Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Code Examples
curl -X POST https://api.lobstr.io/v1/tasks \ -H "Authorization: Token YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "squid": "YOUR_SQUID_HASH", "tasks": [ {"url/keyword": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"} ] }'
Response
{"duplicated_count": 0, "tasks": [{"id": "TASK_HASH", "is_active": true, "params": {"url/keyword": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}, "object": "task"}]}