Travel
travel.hotel.search
Search hotels around a coordinate for given dates and guests. Returns a normalized Hotel page.
POST
/
v2
/
ops
/
travel.hotel.search
Search hotels around a coordinate for given dates and guests. Returns a normalized Hotel page.
curl --request POST \
--url https://api.agentkey.app/v2/ops/travel.hotel.search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkin": "<string>",
"checkout": "<string>",
"lat": 0,
"lon": 0,
"adults": 2,
"currency": "USD",
"cursor": "<string>",
"fields": [
"<string>"
],
"include_raw": false,
"lang": "<string>",
"limit": 10,
"price_max": 123,
"price_min": 123,
"provider": "<string>",
"radius_km": 123,
"rooms": 1,
"routing": {
"allow_fallbacks": true,
"only": [
"<string>"
],
"order": [
"<string>"
],
"strategy": "auto"
}
}
'import requests
url = "https://api.agentkey.app/v2/ops/travel.hotel.search"
payload = {
"checkin": "<string>",
"checkout": "<string>",
"lat": 0,
"lon": 0,
"adults": 2,
"currency": "USD",
"cursor": "<string>",
"fields": ["<string>"],
"include_raw": False,
"lang": "<string>",
"limit": 10,
"price_max": 123,
"price_min": 123,
"provider": "<string>",
"radius_km": 123,
"rooms": 1,
"routing": {
"allow_fallbacks": True,
"only": ["<string>"],
"order": ["<string>"],
"strategy": "auto"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
checkin: '<string>',
checkout: '<string>',
lat: 0,
lon: 0,
adults: 2,
currency: 'USD',
cursor: '<string>',
fields: ['<string>'],
include_raw: false,
lang: '<string>',
limit: 10,
price_max: 123,
price_min: 123,
provider: '<string>',
radius_km: 123,
rooms: 1,
routing: {
allow_fallbacks: true,
only: ['<string>'],
order: ['<string>'],
strategy: 'auto'
}
})
};
fetch('https://api.agentkey.app/v2/ops/travel.hotel.search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agentkey.app/v2/ops/travel.hotel.search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checkin' => '<string>',
'checkout' => '<string>',
'lat' => 0,
'lon' => 0,
'adults' => 2,
'currency' => 'USD',
'cursor' => '<string>',
'fields' => [
'<string>'
],
'include_raw' => false,
'lang' => '<string>',
'limit' => 10,
'price_max' => 123,
'price_min' => 123,
'provider' => '<string>',
'radius_km' => 123,
'rooms' => 1,
'routing' => [
'allow_fallbacks' => true,
'only' => [
'<string>'
],
'order' => [
'<string>'
],
'strategy' => 'auto'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentkey.app/v2/ops/travel.hotel.search"
payload := strings.NewReader("{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentkey.app/v2/ops/travel.hotel.search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentkey.app/v2/ops/travel.hotel.search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}"
response = http.request(request)
puts response.read_body{
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"credits_charged": 123,
"data": {
"items": [
{
"address": "<string>",
"checkin": "<string>",
"checkout": "<string>",
"city": "<string>",
"country": "<string>",
"id": "<string>",
"lat": 123,
"lon": 123,
"name": "<string>",
"photo_url": "<string>",
"price": {
"amount": 123,
"currency": "<string>"
},
"rating": {
"count": 123,
"score": 123
},
"stars": 123,
"url": "<string>"
}
],
"next_cursor": "<string>"
},
"op": "<string>",
"op_version": 123,
"provider": "<string>",
"request_id": "<string>",
"took_ms": 123,
"unsupported_fields": [
"<string>"
],
"raw": "<unknown>",
"raw_truncated": true
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}Body
application/json
Response
Success envelope
Success envelope whose data is a HotelPage.
⌘I
Search hotels around a coordinate for given dates and guests. Returns a normalized Hotel page.
curl --request POST \
--url https://api.agentkey.app/v2/ops/travel.hotel.search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkin": "<string>",
"checkout": "<string>",
"lat": 0,
"lon": 0,
"adults": 2,
"currency": "USD",
"cursor": "<string>",
"fields": [
"<string>"
],
"include_raw": false,
"lang": "<string>",
"limit": 10,
"price_max": 123,
"price_min": 123,
"provider": "<string>",
"radius_km": 123,
"rooms": 1,
"routing": {
"allow_fallbacks": true,
"only": [
"<string>"
],
"order": [
"<string>"
],
"strategy": "auto"
}
}
'import requests
url = "https://api.agentkey.app/v2/ops/travel.hotel.search"
payload = {
"checkin": "<string>",
"checkout": "<string>",
"lat": 0,
"lon": 0,
"adults": 2,
"currency": "USD",
"cursor": "<string>",
"fields": ["<string>"],
"include_raw": False,
"lang": "<string>",
"limit": 10,
"price_max": 123,
"price_min": 123,
"provider": "<string>",
"radius_km": 123,
"rooms": 1,
"routing": {
"allow_fallbacks": True,
"only": ["<string>"],
"order": ["<string>"],
"strategy": "auto"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
checkin: '<string>',
checkout: '<string>',
lat: 0,
lon: 0,
adults: 2,
currency: 'USD',
cursor: '<string>',
fields: ['<string>'],
include_raw: false,
lang: '<string>',
limit: 10,
price_max: 123,
price_min: 123,
provider: '<string>',
radius_km: 123,
rooms: 1,
routing: {
allow_fallbacks: true,
only: ['<string>'],
order: ['<string>'],
strategy: 'auto'
}
})
};
fetch('https://api.agentkey.app/v2/ops/travel.hotel.search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agentkey.app/v2/ops/travel.hotel.search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checkin' => '<string>',
'checkout' => '<string>',
'lat' => 0,
'lon' => 0,
'adults' => 2,
'currency' => 'USD',
'cursor' => '<string>',
'fields' => [
'<string>'
],
'include_raw' => false,
'lang' => '<string>',
'limit' => 10,
'price_max' => 123,
'price_min' => 123,
'provider' => '<string>',
'radius_km' => 123,
'rooms' => 1,
'routing' => [
'allow_fallbacks' => true,
'only' => [
'<string>'
],
'order' => [
'<string>'
],
'strategy' => 'auto'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agentkey.app/v2/ops/travel.hotel.search"
payload := strings.NewReader("{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentkey.app/v2/ops/travel.hotel.search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentkey.app/v2/ops/travel.hotel.search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkin\": \"<string>\",\n \"checkout\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"adults\": 2,\n \"currency\": \"USD\",\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"include_raw\": false,\n \"lang\": \"<string>\",\n \"limit\": 10,\n \"price_max\": 123,\n \"price_min\": 123,\n \"provider\": \"<string>\",\n \"radius_km\": 123,\n \"rooms\": 1,\n \"routing\": {\n \"allow_fallbacks\": true,\n \"only\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"strategy\": \"auto\"\n }\n}"
response = http.request(request)
puts response.read_body{
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"credits_charged": 123,
"data": {
"items": [
{
"address": "<string>",
"checkin": "<string>",
"checkout": "<string>",
"city": "<string>",
"country": "<string>",
"id": "<string>",
"lat": 123,
"lon": 123,
"name": "<string>",
"photo_url": "<string>",
"price": {
"amount": 123,
"currency": "<string>"
},
"rating": {
"count": 123,
"score": 123
},
"stars": 123,
"url": "<string>"
}
],
"next_cursor": "<string>"
},
"op": "<string>",
"op_version": 123,
"provider": "<string>",
"request_id": "<string>",
"took_ms": 123,
"unsupported_fields": [
"<string>"
],
"raw": "<unknown>",
"raw_truncated": true
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}{
"code": 123,
"error": "<string>",
"error_type": "<string>",
"attempts": [
{
"provider": "<string>",
"status": 123,
"took_ms": 123,
"tool": "<string>",
"error_type": "<string>",
"refunded": true,
"upstream_status": 123
}
],
"op": "<string>",
"request_id": "<string>"
}