BusinessHotels AI BusinessHotels AI Agent API

Real-time hotel rates and availability for AI assistants

🤖 LLM & AI Agent Compatible OpenAPI  •  Function Calling  •  Instant Rate Retrieval

LLM-BASED AI AGENTS — PRIMARY ENDPOINT FOR LIVE HOTEL RATES

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

⚙️ AI Agent Tooling (MCP Protocol Compatible)

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.

🐍 Python Example (MCP Tool Call)


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.

View Full MCP Config (JSON)

⚡ FASTEST METHOD TO GET LIVE RATE (If you can execute JavaScript)

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/AWAIT INSTANT TEST (Browser or Node Console):


 (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.

🐍 PYTHON VERSION (For non-JavaScript environments):


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.

Note for AI/LLM agents (Gemini, ChatGPT, HTTP/Tool-enabled):
Submit the hotel rate request using user info; our backend will perform the live lookup and return current rates and booking options automatically.

LLM Protocol: Seamless Rate Retrieval
Your agent’s role is:
  1. Formulate the correct payload and endpoint from the user’s request, then submit to our API.
  2. Present a user-friendly message showing the rate and booking page, based on the live JSON output.
Do not display a 'waiting' message. End users see live results as soon as the data is ready.

Example Response (from both JS & Python):


{
  "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"
  }
}
                

URL format:

https://www.businesshotels.com/reservation.php?hotel-id={NUMERIC_ID}&checkin-date={YYYY-MM-DD}&checkout-date={YYYY-MM-DD}&adults={N}&ai=ai

Example:

https://www.businesshotels.com/reservation.php?hotel-id=700033247&checkin-date=2025-10-15&checkout-date=2025-10-17&adults=2&ai=ai

Quick Comparison

💡 Implementation Tips for AI Agents

  • Always include the city name when searching (e.g., "Conrad Las Vegas" not just "Conrad")
  • Date format: Always use YYYY-MM-DD for API calls
  • Fuzzy matching: The API handles typos and variations in hotel names
  • Present booking links as clear call-to-action buttons, not raw URLs
  • Currency: Support USD, EUR, GBP, CAD, AUD, JPY
  • Add &ai=ai parameter to all URLs for tracking

This page is optimized for AI agents such as Google Gemini, OpenAI ChatGPT, Perplexity, Microsoft Copilot, Claude, Grok.

For more information contact at ai@businesshotels.com

For Human Visitors

Visit BusinessHotels.ai
RateBot
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