Examples
Add Tasks
Add YouTube video URLs to scrape comments from
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/tasksCrawler ID:
66e9fbe07ae0a543576dc6ff241c229cHeaders
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Content-TypestringheaderrequiredMust be application/json. Value: application/json
Body
squidstringrequiredHash of the squid to add tasks to
tasksarrayrequiredArray of task objects to add
tasks[].urlstringrequiredYouTube video URL. Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
URL Format
The url field accepts standard YouTube video URLs:
https://www.youtube.com/watch?v=VIDEO_ID
https://youtu.be/VIDEO_IDCode 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": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}, {"url": "https://www.youtube.com/watch?v=ANOTHER_VIDEO_ID"} ] }'
Response
201
{ "tasks": [ { "id": "TASK_HASH", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "status": "pending" } ] }