Skip to content
Examples

Add Tasks

Add Twitter profile 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.
POSThttps://api.lobstr.io/v1/tasks

Add Twitter profiles to scrape by providing their screen names (usernames). Each task will retrieve detailed profile information for the specified user.

Crawler ID: 6c5227261fbbd3430f926d409f4c44bf

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Request body format. Value: application/json

Request Body

Field Type Required Description
squid string Yes Hash of your squid configured with the Twitter Profile 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 several profiles 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": "0b1e3fd36e8249ec03220fb04b7fc71c",
      "created_at": "2025-07-04T04:52:45.180627",
      "is_active": true,
      "params": {
        "screen_name": "elonmusk"
      },
      "module": 167,
      "object": "task"
    }
  ]
}