Examples
Add Tasks
Add Facebook Pages search URLs to scrape
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 Facebook Pages search URLs to scrape business pages. The scraper extracts page information including contact details, follower counts, and social links.
This scraper requires a synced Facebook account. Link one to your squid before running.
Crawler ID:
c47dfc2beba9fdc2472d3b3321b06b66Headers
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 Facebook Pages Search Export crawler |
| tasks | array | Yes | Array of task objects, each containing a url field |
Task Object
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Facebook Pages search URL (e.g., https://www.facebook.com/search/pages?q=coffee%20shop) |
Perform your search on Facebook first, then copy the URL to preserve all search parameters.
Facebook Pages search URLs follow the format: https://www.facebook.com/search/pages?q=YOUR_SEARCH_QUERY where the query should be URL-encoded.
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/search/pages?q=coffee%20shop" } ] }'
Response
200
{ "duplicated_count": 0, "tasks": [ { "id": "82367f24d9450b2222080eed91662968", "created_at": "2025-07-17T09:06:47.287893", "is_active": true, "params": { "url": "https://www.facebook.com/search/pages?q=coffee%20shop" }, "module": 115, "object": "task" } ] }