Viator API Documentation & Specification – Merchant Partners
viator · Location
code { white-space: nowrap; } a { font-weight: bold; } figure { width: 100%; text-align: center; font-style: italic; font-size: smaller; text-indent: 0; border: thin silver solid; margin: 0.5em; padding: 0.5em; } ## Updates ### Latest update: | Date | Description | |------|-------------| | 3 Feb 2021 | Added [Special offers and on-sale pricing](#section/Key-concepts/Special-offers-and-on-sale-pricing) section | | 28 Oct 2020 | Up
Authentication
Sample Requests
Get product information This service provides all product details required for a product display page, as well as information required for price checks and booking, such as: - age bands - tour grades - language options - booking questions - hotel pickup flags **currencyCode (in query):** - use t
Hover any highlighted part to learn what it does
| Accept-Language | en-US |
curl -X GET "https://api.apis.guru/v2/specs/viator.com/1.0.0/product?code=example&sortOrder=REVIEW_RATING_A¤cyCode=example&voucherOption=VOUCHER_PAPER_ONLY&showUnavailable=true&excludeTourGradeAvailability=true" \ -H "Accept-Language: en-US"
import requests
params = {
"code": "example",
"sortOrder": "REVIEW_RATING_A",
"currencyCode": "example",
"voucherOption": "VOUCHER_PAPER_ONLY",
"showUnavailable": "true",
"excludeTourGradeAvailability": "true"
}
headers = {
"Accept-Language": "en-US"
}
response = requests.get(
"https://api.apis.guru/v2/specs/viator.com/1.0.0/product",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/viator.com/1.0.0/product');
url.searchParams.set('code', 'example');
url.searchParams.set('sortOrder', 'REVIEW_RATING_A');
url.searchParams.set('currencyCode', 'example');
url.searchParams.set('voucherOption', 'VOUCHER_PAPER_ONLY');
url.searchParams.set('showUnavailable', 'true');
url.searchParams.set('excludeTourGradeAvailability', 'true');
const response = await fetch(url, {
headers: {
'Accept-Language': 'en-US'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/viator.com/1.0.0/product")
q := baseURL.Query()
q.Set("code", "example")
q.Set("sortOrder", "REVIEW_RATING_A")
q.Set("currencyCode", "example")
q.Set("voucherOption", "VOUCHER_PAPER_ONLY")
q.Set("showUnavailable", "true")
q.Set("excludeTourGradeAvailability", "true")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Accept-Language", "en-US")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/viator.com/1.0.0/product")
uri.query = URI.encode_www_form({
"code" => "example",
"sortOrder" => "REVIEW_RATING_A",
"currencyCode" => "example",
"voucherOption" => "VOUCHER_PAPER_ONLY",
"showUnavailable" => "true",
"excludeTourGradeAvailability" => "true"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Accept-Language"] = "en-US"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/viator.com/1.0.0/product?" . http_build_query([
"code" => "example",
"sortOrder" => "REVIEW_RATING_A",
"currencyCode" => "example",
"voucherOption" => "VOUCHER_PAPER_ONLY",
"showUnavailable" => "true",
"excludeTourGradeAvailability" => "true"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Accept-Language: en-US"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get a user's bookings with travel dates in the future. This service can also be used to check the status of a booking. **Provide either:** - A `voucherKey`, **or...** - An email address (`email`) and a booking reference (`itineraryOrItemId`) ([Booking Reference](#section/Key-concepts/Booking-r
Hover any highlighted part to learn what it does
| Accept-Language | en-US |
curl -X GET "https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings?email=test%40example.com&voucherKey=example&itineraryOrItemId=example" \ -H "Accept-Language: en-US"
import requests
params = {
"email": "[email protected]",
"voucherKey": "example",
"itineraryOrItemId": "example"
}
headers = {
"Accept-Language": "en-US"
}
response = requests.get(
"https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings');
url.searchParams.set('email', '[email protected]');
url.searchParams.set('voucherKey', 'example');
url.searchParams.set('itineraryOrItemId', 'example');
const response = await fetch(url, {
headers: {
'Accept-Language': 'en-US'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings")
q := baseURL.Query()
q.Set("email", "[email protected]")
q.Set("voucherKey", "example")
q.Set("itineraryOrItemId", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Accept-Language", "en-US")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings")
uri.query = URI.encode_www_form({
"email" => "[email protected]",
"voucherKey" => "example",
"itineraryOrItemId" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Accept-Language"] = "en-US"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/mybookings?" . http_build_query([
"email" => "[email protected]",
"voucherKey" => "example",
"itineraryOrItemId" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Accept-Language: en-US"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get the details of a single specific past booking based on the `voucherKey` or `itemId` and email address sent in the request. **Note**: this service will only return past bookings that were made with the same API key that was used to make the booking **Sample query parameters**: - email=apitest@v
Hover any highlighted part to learn what it does
| Accept-Language | en-US |
curl -X GET "https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking?email=test%40example.com&itemId=example&voucherKey=example" \ -H "Accept-Language: en-US"
import requests
params = {
"email": "[email protected]",
"itemId": "example",
"voucherKey": "example"
}
headers = {
"Accept-Language": "en-US"
}
response = requests.get(
"https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking');
url.searchParams.set('email', '[email protected]');
url.searchParams.set('itemId', 'example');
url.searchParams.set('voucherKey', 'example');
const response = await fetch(url, {
headers: {
'Accept-Language': 'en-US'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking")
q := baseURL.Query()
q.Set("email", "[email protected]")
q.Set("itemId", "example")
q.Set("voucherKey", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Accept-Language", "en-US")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking")
uri.query = URI.encode_www_form({
"email" => "[email protected]",
"itemId" => "example",
"voucherKey" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Accept-Language"] = "en-US"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/viator.com/1.0.0/booking/pastbooking?" . http_build_query([
"email" => "[email protected]",
"itemId" => "example",
"voucherKey" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Accept-Language: en-US"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Viator API Documentation & Specification – Merchant Partners?
Viator API Documentation & Specification – Merchant Partners is a Location API. Developers commonly use location APIs for:
- tracking assets and vehicles in real time
- building delivery and logistics apps
- finding nearby businesses or services
- geo-fencing and location-based notifications
- address validation and autocomplete
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Viator API Documentation & Specification – Merchant Partners is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?