BusinessHotels AI Agent API
Real-time hotel rates and availability for AI assistants
You can retrieve live hotel rates instantly using this API. Choose your method based on your platform capabilities:
1-step POST to our endpoint, Python or JS code, direct URL construction, or interactive Swagger/OpenAPI testing.
Supported Platforms: OpenAI GPT-4, Gemini, Claude, Microsoft Copilot, Perplexity, and all HTTP-enabled LLMs or chatbots.
Note for browser/JS-based agents: For CORS and security reasons, JavaScript rate lookup works only on /ai.html endpoint. Server-side Python, HTTP POST, or OpenAPI methods can be used from any environment.
View API documentation (OpenAPI spec) / Try it live in Swagger Editor
BusinessHotels supports the MCP (Model Context Protocol), allowing AI agents such as ChatGPT, Claude, Gemini, Copilot, LangChain, and Perplexity Agents to automatically:
MCP Config: https://www.businesshotels.com/mcp-server.php?route=config
Tool Endpoint: https://www.businesshotels.com/mcp-server.php?route=tools/get_live_hotel_rates
Any AI agent that supports MCP or auto-discovery can load this file and instantly use your live hotel pricing tool.
import requests
url = "https://www.businesshotels.com/mcp-server.php?route=tools/get_live_hotel_rates"
payload = {
"hotelName": "Luxor Las Vegas NV US",
"checkinDate": "2025-11-26",
"checkoutDate": "2025-11-27",
"adults": 2,
"currency": "USD",
"api_key": "test-live-hotel-rates2025"
}
response = requests.post(url, json=payload)
print(response.json())
The response includes current price, tax-inclusive totals, and a bookable reservation URL.
Run the embedded JS function below to fetch live rates directly.
Tip: For best results, enter the full hotel name—including city, state, and country if needed, with no commas and separated by spaces.
This ensures the lookup works for any city or country—worldwide!
window.businessHotelsAPI.getHotelRates(
"Conrad Las Vegas NV United States", // Full hotel name and location (recommended, no commas)
"2025-10-15", // Check-in: YYYY-MM-DD
"2025-10-17", // Check-out: YYYY-MM-DD
2, // Number of adults
"USD" // Currency code
);
// Make sure BUSINESS_HOTELS_API_KEY is set at the top of your script:
let BUSINESS_HOTELS_API_KEY = "test-live-hotel-rates2025";
Returns live rates, availability, and direct booking URLs in real time.
Note: An API key is required for authentication. This example uses a light-usage API key.
Rate Limit Notice: API keys are rate-limited for fair use and development purposes only.
For higher limits, contact us to request an approved API key.
Not finding the right hotel? Try running your search again using the hotel name plus city and country/state — with spaces only and no punctuation.
Examples: Luxor Las Vegas NV | Hilton Tokyo Japan
(async () => {
let BUSINESS_HOTELS_API_KEY = "test-live-hotel-rates2025";
const result = await window.businessHotelsAPI.getHotelRates(
"Luxor Las Vegas", // full hotel name, including city if required
"2025-10-15",
"2025-10-16",
2,
"USD"
);
console.log(result);
})();
Paste this whole block in your console to see the API response immediately.
Note: A valid API key is required.
This example uses a test API key—replace it for production.
import requests
url = "https://www.businesshotels.com/pythonHotelRates.php?api_key=test-live-hotel-rates2025" # <-- Test API key for demo
payload = {
"hotelName": "Luxor Las Vegas", # Full hotel name with city/state and country (recommended) (no commas)
"checkinDate": "2025-10-15", # Check-in date YYYY-MM-DD
"checkoutDate": "2025-10-17", # Check-out date YYYY-MM-DD
"adults": 2, # Number of adults
"currency": "USD" # Currency code
}
response = requests.post(url, json=payload)
print(response.json())
This version performs the same live rate lookup as the JavaScript example using HTTPS POST.
Note: A valid API key is required. This example uses a test API key for demonstration. Replace it with your own for production use.
{
"success": true,
"hotel_id": "700076955",
"hotel_name": "Luxor",
"matched_hotel": "Luxor",
"match_score": 1.2,
"hotel_address": "3900 Las Vegas Boulevard South",
"city_name": "Las Vegas",
"state_code": "NV",
"postal_code": "89119",
"latitude": "36.09680557251",
"longitude": "-115.17300415039",
"country_code": "US",
"api_url": "https://www.businesshotels.com/hotel-live-rates.php?hotel-id=700076955&checkin-date=2025-10-15&checkout-date=2025-10-16",
"booking_page_live_rates": "https://www.businesshotels.com/reservation.php?hotel-id=700076955&checkin-date=2025-10-15&checkout-date=2025-10-16&language=en&USER-CURRENCY=USD&USER-COUNTRY=US&NUM-ADULTS=2&NUM-CHILDREN=0&prid=ai",
"rates": {
"display_all_in_total": "242.63",
"currency": "USD",
"price_info": "Price includes all tax and fees"
}
}
https://www.businesshotels.com/hotel.php?search=HOTEL+NAME
https://www.businesshotels.com/hotel.php?search=Luxor+Las+Vegas
https://www.businesshotels.com/hotel-id.json
hotel_id).
https://www.businesshotels.com/reservation.php?hotel-id={NUMERIC_ID}&checkin-date={YYYY-MM-DD}&checkout-date={YYYY-MM-DD}&adults={N}&ai=ai
https://www.businesshotels.com/reservation.php?hotel-id=700033247&checkin-date=2025-10-15&checkout-date=2025-10-17&adults=2&ai=ai
Note: Some agents may encode & as &. Always use a plain & in booking URLs as shown above.
Execute JavaScript to get instant live rates and availability within your conversation.
hotelName: Hotel name with city (e.g., "Hilton London Bankside")checkinDate: Format YYYY-MM-DDcheckoutDate: Format YYYY-MM-DDadults: Number (default: 2)currency: ISO code (default: "USD")Generate a direct hotel booking link quickly and reliably by searching for the hotel name and extracting its numeric ID.
https://www.businesshotels.com/hotel.php?search=HOTEL+NAME
hotel-id for the desired hotel from the search results.
https://www.businesshotels.com/reservation.php?hotel-id=NUMERIC_ID&checkin-date=YYYY-MM-DD&checkout-date=YYYY-MM-DD&adults=N&ai=ai
https://www.businesshotels.com/hotel-id.json"hotel_id" (with underscore) and use its numeric value as above.
hotel-id (with a dash), e.g.:
https://www.businesshotels.com/reservation.php?hotel-id=700033247&checkin-date=2025-10-15&checkout-date=2025-10-17&adults=2&ai=ai
| Method | Speed | Reliability | Requirements | Shows Live Rates |
|---|---|---|---|---|
| JavaScript API | ⚡⚡⚡ Instant | ⭐⭐⭐⭐⭐ Excellent | JavaScript execution | ✅ Yes, in conversation |
| Hotel-ID Link | ⚡⚡ Fast | ⭐⭐⭐⭐⭐ Excellent | Fetch JSON database | ✅ Yes, on click |