Skip to content
Examples

Add Tasks

Add TripAdvisor restaurant search URLs as tasks for scraping restaurant listings

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 TripAdvisor restaurant search URLs to your squid for scraping restaurant listings. The scraper extracts restaurant details including ratings, reviews, contact information, price ranges, location coordinates, and Michelin status from TripAdvisor's restaurant directory.

Crawler ID: f781435f026b36b19ef74d591a077cb7

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Request body format. Value: application/json

Task Format

Each task should contain a URL from a TripAdvisor restaurant search results page. Search for restaurants by location on TripAdvisor, then use those search URLs as tasks.

Supported URL Formats

The scraper supports TripAdvisor restaurant search URLs from various regional domains:

Apply filters on TripAdvisor (cuisine type, price range, ratings) before copying the URL to get more targeted restaurant results.

TripAdvisor uses location IDs (g-codes) in URLs. Each city or region has a unique g-code that you can find by searching on the website.

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.tripadvisor.fr/Restaurants-g187147-Paris_Ile_de_France.html"
      }
    ]
  }'

Response

200
{
  "duplicated_count": 0,
  "tasks": [
    {
      "id": "82367f24d9450b2222080eed91662968",
      "created_at": "2025-07-17T09:06:47.287893",
      "is_active": true,
      "params": {
        "url": "https://www.tripadvisor.fr/Restaurants-g187147-Paris_Ile_de_France.html"
      },
      "module": 115,
      "object": "task"
    }
  ]
}