Tripadvisor
Tripadvisor: Search
Search from Tripadvisor. Costs 1 credit per successful call.
GET
https://api.perceptlayer.com
/
v1
/
tripadvisor
/
search
Search
curl --request GET \
--url https://api.perceptlayer.com/v1/tripadvisor/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.perceptlayer.com/v1/tripadvisor/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.perceptlayer.com/v1/tripadvisor/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.perceptlayer.com/v1/tripadvisor/search';
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perceptlayer.com/v1/tripadvisor/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.perceptlayer.com/v1/tripadvisor/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.perceptlayer.com/v1/tripadvisor/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.perceptlayer.com/v1/tripadvisor/search")
.header("X-API-Key", "<api-key>")
.asString();{
"success": true,
"data": {
"query": "pizza rome",
"results": [
{
"position": 1,
"location_id": 11449818,
"name": "Pompeii from Rome with Optional Mt. Vesuvius & Pizza Lunch",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/32/a3/97/3a/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11449818-Pompeii_from_Rome_with_Optional_Mt_Vesuvius_Pizza_Lunch-Rome_Lazio.html",
"rating": 4.7,
"review_count": 1617
},
{
"position": 2,
"location_id": 28122604,
"name": "Rome Pizza & Gelato Class with Wine by Cooking Italy",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/34/52/f0/4b/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d28122604-Rome_Pizza_Gelato_Class_with_Wine_by_Cooking_Italy-Rome_Lazio.html",
"rating": 5,
"review_count": 1492
},
{
"position": 3,
"location_id": 11465610,
"name": "Cooking Class in the Heart of Rome: Pizza and Tiramisu Making",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/33/71/2d/29/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11465610-Cooking_Class_in_the_Heart_of_Rome_Pizza_and_Tiramisu_Making-Rome_Lazio.html",
"rating": 4.9,
"review_count": 1487
}
]
},
"meta": {
"endpoint_family": "search",
"billable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}1 credit per successful call; failed calls are free. See the Tripadvisor API overview for every Tripadvisor endpoint.
Authorizations
Query Parameters
Maximum string length:
255Maximum string length:
10Available options:
hotel, restaurant, attraction, destination Was this page helpful?
⌘I
Search
curl --request GET \
--url https://api.perceptlayer.com/v1/tripadvisor/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.perceptlayer.com/v1/tripadvisor/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.perceptlayer.com/v1/tripadvisor/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.perceptlayer.com/v1/tripadvisor/search';
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perceptlayer.com/v1/tripadvisor/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.perceptlayer.com/v1/tripadvisor/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.perceptlayer.com/v1/tripadvisor/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.perceptlayer.com/v1/tripadvisor/search")
.header("X-API-Key", "<api-key>")
.asString();{
"success": true,
"data": {
"query": "pizza rome",
"results": [
{
"position": 1,
"location_id": 11449818,
"name": "Pompeii from Rome with Optional Mt. Vesuvius & Pizza Lunch",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/32/a3/97/3a/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11449818-Pompeii_from_Rome_with_Optional_Mt_Vesuvius_Pizza_Lunch-Rome_Lazio.html",
"rating": 4.7,
"review_count": 1617
},
{
"position": 2,
"location_id": 28122604,
"name": "Rome Pizza & Gelato Class with Wine by Cooking Italy",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/34/52/f0/4b/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d28122604-Rome_Pizza_Gelato_Class_with_Wine_by_Cooking_Italy-Rome_Lazio.html",
"rating": 5,
"review_count": 1492
},
{
"position": 3,
"location_id": 11465610,
"name": "Cooking Class in the Heart of Rome: Pizza and Tiramisu Making",
"type": "attraction",
"location": "Rome, Lazio, Italy",
"image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/33/71/2d/29/caption.jpg?w=800&h=-1&s=1",
"url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11465610-Cooking_Class_in_the_Heart_of_Rome_Pizza_and_Tiramisu_Making-Rome_Lazio.html",
"rating": 4.9,
"review_count": 1487
}
]
},
"meta": {
"endpoint_family": "search",
"billable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}