Tripadvisor API — Download Place Photo Files
Documentation menu
FetchLayer FetchLayer API

Download a place photo

Stream a photo's actual bytes, using a url taken from a photo or from a review's photoUrls. Only Tripadvisor's own image hosts are accepted. HTTP Range requests are supported. This is a GET with query parameters, not a JSON POST, and it bills as one request.

GET /media Photos
https://api.fetchlayer.dev/tripadvisor/media
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Tripadvisor photo URL, as returned on a photo or a review. Passed as a query parameter.

filename string optional

Content-Disposition filename to serve the file as (max 200 characters).

Range string optional

Standard HTTP Range request header, for example bytes=0-65535. Sent as a header, not a query parameter.

Response Fields

media

Download a place photo

(body) binary

The file itself. 200 for the whole file, 206 for a requested byte range.

Content-Type header

Media type of the file, e.g. image/jpeg.

Content-Range header

Byte range served, on a 206 response.

Accept-Ranges header

Present when the file supports range requests.

Request

curl -X GET "https://api.fetchlayer.dev/tripadvisor/media?url=https%3A%2F%2Fmedia-cdn.tripadvisor.com%2Fmedia%2Fphoto-o%2F2f%2F1a%2F%E2%80%A6%2Froom.jpg&filename=park-hyatt-room.jpg" \
  -H "Authorization: Bearer ss-your-key"

Response

{
  "note": "Binary file streamed back with Content-Type, Content-Length and Accept-Ranges headers."
}