Getting Started with the Xeni Deals API
The Xeni Deals API provides real-time access to hotel discounts and promotions across multiple suppliers worldwide. Unlike a traditional hotel search where users specify dates and destinations, the Deals API surfaces location-based offers — showing travelers the best available hotel deals near their current position or any set of coordinates.
What the Deals API Does
The Deals API serves a single, focused purpose: return hotel deals near a geographic location. This makes it ideal for:
- Homepage deal widgets — Show visitors enticing hotel offers based on their current location as soon as they land on your site.
- Mobile app discovery — Surface nearby hotel deals using the device's GPS coordinates.
- Destination marketing — Display curated deals for top destinations to inspire travel planning.
- Last-minute booking flows — Present discounted hotel options to travelers who are already in or near a destination.
Deals are aggregated from multiple hotel suppliers, so a single API call can return discounts from a broad range of properties and brands.
Base URL
All Deals API requests are made against the following base URL:
https://travelapi.ai/hotels/api/v2/deals
The Endpoint
The Deals API exposes a single GET endpoint:
GET /hotels/api/v2/deals
You provide a latitude, longitude, and currency, and the API returns available hotel deals near that location with pricing in your specified currency.
Prerequisites
Before you begin, ensure you have:
- API credentials — Your API key and secret, provided during onboarding. These are used to generate authentication headers.
- Geographic coordinates — A latitude and longitude pair for the location you want to query.
- Currency code — An ISO 4217 currency code (e.g.,
USD,EUR,GBP) for deal pricing.
If you have not yet received your API credentials, contact your Xeni account representative.
Quick Start
Here is the fastest way to retrieve hotel deals. This example fetches deals near Los Angeles in US dollars:
curl -X GET "https://travelapi.ai/hotels/api/v2/deals?lat=34.0522&long=-118.2437¤cy=USD" \
-H "accept: application/json" \
-H "accept-language: en" \
-H "timezone: America/Los_Angeles" \
-H "x-correlation-id: 550e8400-e29b-41d4-a716-446655440000" \
-H "x-session-id: 6fa459ea-ee8a-3ca4-894e-db77e160355e"
The response contains an array of hotel deals with property details, pricing, and discount information for hotels near the provided coordinates.
How Deals Work
Deals returned by the API are dynamic and time-sensitive. Key characteristics include:
- Location-based — Deals are scoped to properties near the latitude and longitude you provide. The API determines an appropriate search radius automatically.
- Real-time pricing — Prices and availability reflect current supplier data. Deals may appear or disappear as inventory changes.
- Multi-supplier — Results are aggregated across Xeni's supplier network, so you get a broad view of available discounts without managing multiple integrations.
- Currency-aware — Prices are returned in the currency you specify, with conversion handled server-side.
Next Steps
- How to Fetch Hotel Deals by Location — Detailed walkthrough of the endpoint with a complete request example.
- Request Parameters and Headers — Full reference for all query parameters and required headers.
- Best Practices for Integration — Caching, polling, and error handling guidance.