Skip to content
Examples

Add Tasks

Add Instagram profile URLs, post URLs, or usernames to scrape posts using the lobstr.io API

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 Instagram profiles or posts as tasks to your squid. The scraper will extract posts, captions, engagement metrics, and metadata from the provided profiles or individual posts.

You can provide a profile URL, a single post/reel URL, or just a username.

Crawler ID: d25fddae52eb78eb385e60bc2adb6d1e

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Request body format. Value: application/json

Supported Input Formats

Profile URL:

https://www.instagram.com/natgeo/

https://instagram.com/username

Single Post URL:

https://www.instagram.com/p/ABC123/

Reel URL:

https://www.instagram.com/reel/ABC123/

Username only:

natgeo

cristiano

Request Body

Field Type Required Description
squid string Yes Hash of your squid configured with the Instagram Posts Scraper crawler
tasks array Yes Array of task objects, each containing a url field

You can use just the username without the full URL - the scraper will resolve it automatically.

When scraping a profile, all public posts will be collected. For single posts, only that specific post data is returned.

You can add up to 1000 tasks in a single request for bulk operations.

Duplicate URLs are automatically detected and won't be added twice.

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": "https://www.instagram.com/natgeo/"},
      {"url": "https://www.instagram.com/cristiano/"}
    ]
  }'

Response

200
{
  "tasks": [
    {
      "id": "task_abc123def456",
      "status": "pending",
      "params": {
        "url": "https://www.instagram.com/natgeo/"
      }
    },
    {
      "id": "task_abc123def457",
      "status": "pending",
      "params": {
        "url": "https://www.instagram.com/cristiano/"
      }
    }
  ],
  "duplicated_count": 0
}