Downloading Feeds

Overview

Feeds provide batch access to large datasets through downloadable files. They're ideal for customers who require bulk data processing and applications that need comprehensive datasets rather than real-time API responses. Feeds are only available as an option for customers with Innovate or Transform package tiers.

Get Your Feed API Key

First, ensure you have access to the Feed API:

  • Contact your Tripadvisor partnership team to request feed access
  • Receive your unique feed API key
  • Confirm your feed configuration and schedule

Check Available Feeds

Use the List Files endpoint to see what feed files are available for download:

curl -X GET "https://terra.tripadvisor.com/api/feeds/files/list" \
  -H "X-API-Key: YOUR_FEED_API_KEY" \
  -H "Content-Type: application/json"

Optional Parameters:

  • page - Page number for pagination (0-based, default: 0)
  • size - Number of files per page (minimum: 1)
  • sort - Sort criteria for the results Response: Returns a paginated list of available feed files with their names and file sizes.

Download a Feed File

Once you have the filename from step 2, you have two options for downloading:

Option A: Direct Download (Recommended) Use the redirect endpoint for automatic download:

curl -X GET "https://terra.tripadvisor.com/api/feeds/{filename}" \
  -H "X-API-Key: YOUR_FEED_API_KEY" \
  -L -o "local_filename.json.gz"

Replace {filename} with the actual filename from the list (e.g., location_feed_2024-11-19.json.gz). The -L flag follows the redirect, and -o saves the file locally.

Option B: Get Temporary Download URL For programmatic applications or when you need the URL for later use:

curl -X GET "https://terra.tripadvisor.com/api/feeds/json/{filename}" \
  -H "X-API-Key: YOUR_FEED_API_KEY" \
  -H "Content-Type: application/json"

This returns a JSON response with:

  • url - Temporary presigned URL for downloading
  • exp - Expiration timestamp for the URL You can then use the returned URL to download the file directly.

4. Process Your Downloaded Feed

After downloading, decompress and process the feed file:

# Decompress the gzipped file
gunzip your_feed_file.json.gz
# The result is a JSON file ready for processing
cat your_feed_file.json | jq '.'

Feed File Naming Convention

Feed files follow a consistent naming pattern:

{feed_type}_feed_{date}.json.gz

Feed Generation

  • Feeds are generated daily with fresh data
  • Files are available for 30 days after generation
  • Contact your partnership team to request custom feed schedules