Skip to content
Examples

Add Tasks

Add Facebook Marketplace search URLs to your scraper squid

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 Facebook Marketplace search URLs as tasks to your Facebook Marketplace Scraper squid. Each task should be a Marketplace search URL with your desired filters applied.

This scraper requires a synced Facebook account. Link one to your squid before running.
Crawler ID: 640e3d2f62769800fdb05f957f3a2415

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Must be application/json. Value: application/json

Body

squidstringrequired

Hash ID of your squid.

tasksarrayrequired

Array of task objects. Each task supports the fields below.

Task Fields

tasks[].urlstringrequired

Facebook Marketplace search URL. Navigate to Marketplace, apply your filters (location, category, price range, etc.), and copy the URL from your browser.

Example: https://www.facebook.com/marketplace/paris/search?query=piano

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.facebook.com/marketplace/paris/search?query=piano" },
      { "url": "https://www.facebook.com/marketplace/newyork/search?query=sofa&minPrice=50&maxPrice=500" }
    ]
  }'

Response

201
[
  {
    "id": "TASK_HASH",
    "squid": "YOUR_SQUID_HASH",
    "url": "https://www.facebook.com/marketplace/paris/search?query=piano",
    "status": "pending"
  }
]