Download a file through an automatic redirect to a secure presigned URL.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Redirect to Feed File requests
A Redirect to Feed File request takes a feed filename and responds with a redirect to a presigned URL, so any client that follows redirects downloads the file in one step.
A request is an HTTP GET to a URL in the form:
https://terra.tripadvisor.com/api/feeds/{filename}
Redirect to Feed File responses
The response is 302 Found with the presigned URL in the Location header. There is no response body.
The client must follow redirects. A client configured not to follow them receives the 302 and no file. With curl, pass -L to follow the redirect and -o to save the result.
Note: some HTTP clients drop custom headers when following a redirect, so X-API-Key may not reach the storage host. This is expected — the presigned URL authenticates itself.
Note: feed files are gzipped, and every filename ends in .json.gz.
Examples
Download a feed file
curl -L -o location.json.gz \
"https://terra.tripadvisor.com/api/feeds/location.json.gz?version=1" \
-H "X-API-Key: FEED_API_KEY"Decompress and inspect it
gunzip location.json.gz
jq '.' location.jsonRelated
- Guide for Downloading Feeds — filenames, retention and decompressing
- List Files — to obtain a filename
- Feed File URL — when the download happens elsewhere
302redirect to a location for downloading