Examples
Add Tasks
Add Twitter user tweets scraping tasks by screen name
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/tasksAdd Twitter users to scrape tweets from by providing their screen names (usernames). The scraper will retrieve tweets from the specified user's timeline.
This scraper requires a synced Twitter/X account. Link one to your squid before running.
Crawler ID:
9d6b83aaf1ae9d5b4a775d223e3eb5dfHeaders
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Content-TypestringheaderrequiredRequest body format. Value: application/json
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| squid | string | Yes | Hash of your squid configured with the Twitter User Tweets Scraper |
| tasks | array | Yes | Array of task objects, each containing a screen_name field |
Task Object
| Field | Type | Required | Description |
|---|---|---|---|
| screen_name | string | Yes | Twitter username without the @ symbol (e.g., elonmusk) |
You can add multiple screen names in a single request to scrape tweets from several users at once.
The screen_name should not include the @ symbol - use elonmusk not @elonmusk.
Code Examples
curl -X POST "https://api.lobstr.io/v1/tasks" \ -H "Authorization: Token YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "tasks": [ { "screen_name": "elonmusk" } ], "squid": "YOUR_SQUID_HASH" }'
Response
200
{ "duplicated_count": 0, "tasks": [ { "id": "dea6b229a9cf67cc5363dfe6062b63ba", "created_at": "2025-07-07T09:36:01.623358", "is_active": true, "params": { "username": "elonmusk" }, "module": 127, "object": "task" } ] }