Browse documentation
GET

Hotel Meta Search API

Find booking links for any hotel across multiple platforms including Booking.com, Expedia, Hotels.com, and more.

Overview

Primary Use Case

Perfect for travel comparison sites, hotel booking aggregators, and applications that need to provide users with multiple booking options.

The Meta Search endpoint searches across multiple booking platforms to find direct links for a specific hotel. This allows your users to compare prices and book through their preferred platform.

Endpoint URL

GET https://api.stayapi.com/v1/meta/search

Parameters

Parameter Type Required Description
hotel_name string Required The name of the hotel to search for. Be as specific as possible for better results.
location string Optional The location of the hotel (city, region, country). Helps improve search accuracy.

Pro Tip

Include both hotel_name and location for the most accurate results. The more specific you are, the better the platform matching will be.

Response Format

Success Response (200 OK)

Field Type Description
success boolean Whether the request was successful
hotel_name string The hotel name used for the search
location string The location used for the search (null if not provided)
links object Object containing booking platform URLs (null if not found)
metadata.total_results_found integer Number of platforms where the hotel was found
metadata.search_queries_executed integer Number of upstream search requests executed
metadata.retrieved_at string UTC timestamp for the search result
message string Human-readable result message

Available Platforms

The links object may contain URLs for the following platforms:

OTA Platforms

  • booking_com
  • expedia
  • hotels_com
  • agoda
  • tripadvisor
  • kayak
  • priceline

Hotel Chain Sites

  • marriott
  • hilton
  • ihg
  • hyatt

Official Website

  • official_website - The hotel's own website

Common Use Cases

Travel Comparison Sites

Show users multiple booking options for the same hotel, allowing them to compare prices and choose their preferred platform.

Perfect for price comparison features

Affiliate Marketing

Generate affiliate revenue by providing users with direct booking links to partner platforms.

Maximize conversion opportunities

Hotel Discovery Apps

Help users find and book hotels across multiple platforms from a single interface.

Streamline the booking process

Travel Blogs & Content

Add booking options to hotel reviews and travel guides to monetize content.

Turn content into revenue

Error Responses

422 Validation Error

The required hotel_name parameter is missing or invalid.

{
  "type": "https://api.stayapi.com/errors/validation-error",
  "title": "Validation Error",
  "status": 422,
  "detail": "Request validation failed.",
  "error_code": "VALIDATION_ERROR",
  "instance": "/v1/meta/search",
  "provider": "meta"
}

502 Upstream Error

The search provider did not return usable organic results.

{
  "type": "https://api.stayapi.com/errors/upstream-error",
  "title": "Upstream Error",
  "status": 502,
  "detail": "The upstream service could not complete the request.",
  "error_code": "UPSTREAM_ERROR",
  "instance": "/v1/meta/search",
  "provider": "meta"
}

Handling Upstream Errors

Treat a 502 as transient. Log the correlation_id from the response and retry later using your normal application-level policy.

Request
curl -X GET "https://api.stayapi.com/v1/meta/search?hotel_name=Four%20Seasons%20Resort%20Bali&location=Jimbaran%2C%20Indonesia" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "success": true,
  "hotel_name": "Four Seasons Resort Bali",
  "location": "Jimbaran, Indonesia",
  "links": {
    "booking_com": "https://www.booking.com/hotel/id/four-seasons-resort-bali-at-jimbaran-bay.html",
    "expedia": "https://www.expedia.com/Jimbaran-Hotels-Four-Seasons-Resort-Bali.h1234567.Hotel-Information",
    "hotels_com": "https://hotels.com/ho123456/four-seasons-resort-bali-jimbaran-indonesia/",
    "agoda": "https://www.agoda.com/four-seasons-resort-bali-at-jimbaran-bay/hotel/bali-id.html",
    "tripadvisor": "https://www.tripadvisor.com/Hotel_Review-g469404-d301386-Reviews-Four_Seasons_Resort_Bali.html",
    "kayak": null,
    "priceline": null,
    "marriott": null,
    "hilton": null,
    "ihg": null,
    "hyatt": null,
    "official_website": "https://www.fourseasons.com/jimbaran/"
  },
  "metadata": {
    "total_results_found": 6,
    "search_queries_executed": 1,
    "retrieved_at": "2025-01-07T12:50:26Z"
  },
  "message": "Successfully found 6 links for the hotel",
  "retrieved_at": "2025-01-07T12:50:26Z"
}