Hotel Pricing API Documentation
Access real-time hotel prices from Expedia, Booking.com and other platforms
A RESTful API that provides real-time hotel pricing data from multiple platforms. Currently supports Expedia, Booking.com, Airbnb, and Amadeus (TravelClick).
Key Features
Hotel Search
Search hotels by name and get property IDs
Real-time Pricing
Get live room rates with multiple currencies
API Key Auth
Secure access with credit-based usage
Multi-Platform
Expandable to multiple booking platforms
Supported Platforms
Getting Started
Start making requests to the Hotel Pricing API in minutes.
Base URL
All API requests should be made to this base URL.
Quick Start Guide
Get Your API Key
Contact your API administrator to receive your unique API key. Your API key will look like this:
hapi_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Never share your API key publicly or commit it to version control. Treat it like a password.
Make Your First Request
Include your API key in the X-API-Key header with every request:
curl -X GET "https://hoteldata.tagxdata.com/api/v1/credits" \
-H "X-API-Key: your_api_key_here"
Start Searching Hotels
You're ready to start fetching hotel prices! See the API endpoints section below for details.
Authentication
All API requests require authentication using an API key.
API Key Header
Include your API key in the X-API-Key header:
X-API-Key: hapi_your_api_key_here
Credit System
Each API key has a credit balance. Credits are deducted based on the endpoint used:
- 1 credit: Hotel search, Hotel rates, Check credits, Airbnb price
- 2 credits: Airbnb search, Airbnb details
| Status Code | Meaning |
|---|---|
| 200 | Request successful, credit deducted |
| 401 | Invalid or inactive API key |
| 402 | Insufficient credits |
π Search Hotels
Search for hotels by name to get their property IDs.
Request Body
{
"hotel_name": "Hilton New York",
"platform": "expedia"
}
For the airbnb platform, hotel_name is treated as a location and you may optionally supply check_in/check_out dates:
{
"hotel_name": "Lisbon, Portugal",
"platform": "airbnb",
"check_in": "2026-07-20",
"check_out": "2026-07-22"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hotel_name |
string | Required | Name of the hotel to search (treated as a location for the "airbnb" platform) |
platform |
string | Optional | Platform name: "expedia", "booking", or "airbnb" (default: "expedia") |
check_in |
date | Optional | Check-in date (YYYY-MM-DD). Only used for the "airbnb" platform. Defaults to tomorrow if not supplied. |
check_out |
date | Optional | Check-out date (YYYY-MM-DD). Only used for the "airbnb" platform. Defaults to the day after check-in if not supplied. |
Response
Returns structured JSON response with hotel information.
Expedia Response
Returns raw JSON response from Expedia (with tealiumUtagData filtered out).
Booking.com Response
Returns cleaned, structured response:
{
"results": [
{
"name": "Goa Marriott Resort & Spa",
"hotelId": "254104",
"type": "HOTEL",
"city": "Panaji",
"region": "Goa"
}
]
}
π° Get Room Rates
Fetch real-time room rates and availability for a specific hotel.
Request Body
{
"hotel_id": "12815997",
"check_in": "2026-04-03",
"check_out": "2026-04-04",
"adults": 2,
"children": [5, 8],
"currency": "CAD",
"kids": true,
"platform": "expedia"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hotel_id |
string | Required | Hotel property ID from search |
check_in |
date | Required | Check-in date (YYYY-MM-DD) |
check_out |
date | Required | Check-out date (YYYY-MM-DD) |
adults |
integer | Optional | Number of adults (default: 2, max: 14) |
children |
array | Optional | List of children ages [5, 8] |
currency |
string | Optional | Currency code: USD, CAD, EUR, GBP (default: USD) |
kids |
boolean | Optional | Filter for kid-friendly options |
platform |
string | Optional | Platform name: "expedia", "booking", "airbnb", or "amadeus" (default: "expedia") |
Set "platform": "amadeus" to fetch rates from TravelClick / iHotelier hotels. The hotel_id is the TravelClick hotel code (e.g. "103750"). Amadeus supports rates only (no search endpoint), and the response is normalized to the same structured format as the other platforms.
Supported Currencies
Response
Returns structured JSON with room types and rate plans, normalized to a common format across all platforms (Expedia, Booking.com, Airbnb, Amadeus).
{
"property_id": "103750",
"property_available": true,
"error_message": null,
"check_in_date": "2026-08-20",
"check_out_date": "2026-08-22",
"nights": 2,
"currency": "USD",
"star_rating": null,
"cancellation_policy": null,
"room_types": [
{
"room_name": "Classic King",
"room_id": 441726,
"features": [],
"rate_plans": [
{
"rate_plan_id": 2808105,
"rate_plan_name": "Tarif du Jour-Best Available Rate",
"price_per_night": "USD 560",
"total_price": "USD 1120",
"total_price_with_taxes": "USD 1333",
"strikethrough_price": null,
"discount_badge": null,
"availability_message": "6 left",
"refundability": "Free cancellation"
}
]
}
]
}
π Check Credits
Check your remaining credits and usage statistics.
Response
{
"key": "hapi_abc...xyz",
"credits": 950,
"total_requests": 50,
"is_active": true
}
π Search Airbnb Listings
Search for Airbnb listings by location. Costs 2 credits.
Request Body
{
"location": "Lisbon, Portugal",
"check_in": "2026-06-15",
"check_out": "2026-06-17",
"adults": 2,
"children": 0,
"infants": 0,
"price_min": 0,
"price_max": 500,
"place_type": "Entire home/apt",
"amenities": [4, 7],
"free_cancellation": false,
"min_bedrooms": 1,
"min_beds": 2,
"min_bathrooms": 1,
"currency": "USD",
"language": "en"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location |
string | Required | Location to search (e.g., "Lisbon, Portugal", "Paris, France") |
check_in |
date | Required | Check-in date (YYYY-MM-DD) |
check_out |
date | Required | Check-out date (YYYY-MM-DD) |
adults |
integer | Optional | Number of adults (default: 1, max: 16) |
children |
integer | Optional | Number of children (default: 0, max: 5) |
infants |
integer | Optional | Number of infants (default: 0, max: 5) |
price_min |
integer | Optional | Minimum price filter (default: 0) |
price_max |
integer | Optional | Maximum price filter (default: 0 = no limit) |
place_type |
string | Optional | Type of place: "room", "Entire home/apt", or empty (default: "") |
amenities |
array | Optional | List of amenity IDs: 4 (WiFi), 7 (Pool), 8 (Kitchen), 21 (Gym), 30 (Heating), 33 (Washer), 34 (Dryer), 35 (Smoke alarm), 36 (Carbon monoxide alarm), 37 (Fire extinguisher), 45 (Hair dryer), 47 (Iron), 54 (Hangers), 57 (TV), 64 (Crib), 71 (Self check-in), 77 (Hot tub), 85 (Bed linens), 86 (Extra pillows and blankets), 89 (Microwave), 90 (Coffee maker), 91 (Refrigerator), 92 (Dishwasher), 93 (Dishes and silverware), 94 (Cooking basics), 95 (Oven), 96 (Stove), 98 (BBQ grill), 104 (Patio or balcony), 251 (Dedicated workspace), 322 (EV charger) |
free_cancellation |
boolean | Optional | Filter for free cancellation (default: false) |
min_bedrooms |
integer | Optional | Minimum number of bedrooms (default: 0) |
min_beds |
integer | Optional | Minimum number of beds (default: 0) |
min_bathrooms |
integer | Optional | Minimum number of bathrooms (default: 0) |
currency |
string | Optional | Currency code (default: "USD") |
language |
string | Optional | Language code (default: "en") |
Response
Returns structured JSON response with location data and listings.
{
"location": {
"display_name": "Lisbon, Portugal",
"bounding_box": {...}
},
"check_in": "2026-06-15",
"check_out": "2026-06-17",
"total_results": 50,
"listings": [
{
"room_id": "12345678",
"name": "Beautiful Apartment in Lisbon",
"city": "Lisbon",
"price": "$150",
"rating": 4.8,
"review_count": 120,
"room_type": "Entire home/apt",
"beds": 2,
"bedrooms": 1,
"bathrooms": 1,
"images": [...]
}
]
}
π΅ Get Airbnb Price
Get simple price information for an Airbnb listing. Costs 1 credit.
Request Body
{
"room_id": "47533286",
"check_in": "2026-06-15",
"check_out": "2026-06-17",
"adults": 2,
"currency": "USD",
"language": "en"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
room_id |
string | Required | Airbnb room/listing ID |
check_in |
date | Required | Check-in date (YYYY-MM-DD) |
check_out |
date | Required | Check-out date (YYYY-MM-DD) |
adults |
integer | Optional | Number of adults (default: 1, max: 16) |
currency |
string | Optional | Currency code (default: "USD") |
language |
string | Optional | Language code (default: "en") |
Response
Returns simple price information.
{
"room_id": "47533286",
"check_in_date": "2026-06-15",
"check_out_date": "2026-06-17",
"currency": "USD",
"price_available": true,
"pricing": {
"price": "$300",
"discounted_price": "$270",
"original_price": "$350",
"qualifier": "for 2 nights",
"details": {
"2 nights x $135": "$270"
}
}
}
π Get Airbnb Details
Get detailed property information with pricing for an Airbnb listing. Costs 2 credits.
Request Body
{
"room_id": "47533286",
"check_in": "2026-06-15",
"check_out": "2026-06-17",
"adults": 2,
"currency": "USD",
"language": "en"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
room_id |
string | Required | Airbnb room/listing ID |
check_in |
date | Required | Check-in date (YYYY-MM-DD) |
check_out |
date | Required | Check-out date (YYYY-MM-DD) |
adults |
integer | Optional | Number of adults (default: 1, max: 16) |
currency |
string | Optional | Currency code (default: "USD") |
language |
string | Optional | Language code (default: "en") |
Response
Returns detailed property information including amenities, host info, images, and pricing.
{
"property_id": "47533286",
"property_available": true,
"check_in_date": "2026-06-15",
"check_out_date": "2026-06-17",
"currency": "USD",
"property_name": "Beautiful Apartment in Lisbon",
"property_type": "Entire apartment",
"star_rating": 4.8,
"location": {
"city": "Lisbon",
"country": "Portugal",
"address": "..."
},
"host_info": {
"name": "John",
"is_superhost": true,
"response_rate": 100,
"response_time": "within an hour"
},
"amenities": [...],
"pricing": {
"price": "$300",
"discounted_price": "$270",
"original_price": "$350",
"qualifier": "for 2 nights",
"breakdown": {...}
},
"cancellation_policy": "Flexible",
"house_rules": [...],
"description": "...",
"images": [...],
"bedrooms": 1,
"beds": 2,
"bathrooms": 1,
"max_guests": 4
}
π» Code Examples
cURL
curl -X POST "https://hoteldata.tagxdata.com/api/v1/hotel/search" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"hotel_name": "Goa Marriott",
"platform": "booking"
}'
Python
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://hoteldata.tagxdata.com"
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
# Search for hotel on Booking.com
response = requests.post(
f"{BASE_URL}/api/v1/hotel/search",
headers=headers,
json={
"hotel_name": "Goa Marriott",
"platform": "booking"
}
)
print(response.json())
# Get hotel rates from Booking.com
response = requests.post(
f"{BASE_URL}/api/v1/hotel/rates",
headers=headers,
json={
"hotel_id": "254104",
"check_in": "2026-06-15",
"check_out": "2026-06-16",
"adults": 2,
"currency": "INR",
"platform": "booking"
}
)
print(response.json())
JavaScript
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://hoteldata.tagxdata.com';
// Search for hotel
const searchHotel = async () => {
const response = await fetch(`${BASE_URL}/api/v1/hotel/search`, {
method: 'POST',
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
hotel_name: 'Goa Marriott',
platform: 'booking'
})
});
const data = await response.json();
console.log(data);
};
searchHotel();
β‘ Rate Limits & Credits
Credit System
The API uses a credit-based system. Each API key has an allocated number of credits.
One credit is deducted for each successful API request (search or rates).
Checking Your Balance
Use the /api/v1/credits endpoint to check your remaining credits at any time:
curl -X GET "https://hoteldata.tagxdata.com/api/v1/credits" \
-H "X-API-Key: your_api_key_here"
Error Codes
| Status Code | Error | Description |
|---|---|---|
| 200 | Success | Request successful, 1 credit deducted |
| 401 | Unauthorized | Invalid or inactive API key |
| 402 | Payment Required | Insufficient credits - contact admin |
| 400 | Bad Request | Invalid request parameters |
| 500 | Server Error | Internal server error - contact support |
Best Practices
Cache Responses
Cache hotel data to minimize API calls and save credits
Handle Errors
Implement proper error handling and retry logic
Monitor Usage
Regularly check your credit balance to avoid interruptions
Optimize Requests
Batch operations when possible to reduce API calls
Contact your API administrator to purchase additional credits or upgrade your plan.
π¬ Support
Need Help?
FAQ
How do I get more credits?
Contact your API administrator via email at support@tagxdata.com to purchase additional credits or upgrade your plan.
What happens if I run out of credits?
The API will return a 402 Payment Required error. You'll need to add more credits to continue making requests. Check your balance regularly using the /api/v1/credits endpoint.
Can I use multiple currencies in one request?
No, specify one currency per request. The API returns all prices in the requested currency code (e.g., USD, CAD, EUR).
What platforms are currently supported?
We currently support Expedia, Booking.com, Airbnb, and Amadeus (TravelClick). Search is available for Expedia, Booking.com, and Airbnb; Amadeus supports rate lookups by hotel code.
How often is hotel pricing data updated?
All pricing data is fetched in real-time from the platform APIs, ensuring you always get the most current rates and availability.
Can I filter results for kid-friendly hotels?
Yes! Use the kids parameter (true/false) in the rates endpoint to filter for family-friendly options.