GET

Hotel Search API

Search for available hotels in any destination with flexible date and guest configurations.

Overview

Availability Search

Search for hotels with real-time availability and pricing information based on dates and guest requirements.

The Hotel Search endpoint allows you to search for available hotels in any destination with specific check-in/check-out dates, number of guests, and rooms. Returns real-time availability and pricing data.

Endpoint URL

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

Query Parameters

Parameter Type Required Description
dest_id string Required Destination ID from Booking.com (e.g., "-3233180" for Phuket)
dest_type string Optional Destination type (default: "CITY")
checkin string Optional Check-in date in YYYY-MM-DD format
checkout string Optional Check-out date in YYYY-MM-DD format
adults integer Optional Number of adults (default: 2)
rooms integer Optional Number of rooms (default: 1)
children integer Optional Number of children (default: 0)
children_ages string Optional Comma-separated ages of children
rows_per_page integer Optional Results per page (default: 25, max: 100)
offset integer Optional Starting offset for pagination (default: 0)
language string Optional Language preference (default: "en-us")
currency string Optional Currency code (default: "USD")
Request
curl -X GET "https://api.stayapi.com/v1/booking/search?dest_id=-3233180&checkin=2024-06-01&checkout=2024-06-07&adults=2&rooms=1" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "hotel_id": 302297,
      "hotel_name": "Banyan Tree Phuket",
      "url": "https://www.booking.com/hotel/th/banyan-tree-phuket.html",
      "image_url": "https://cf.bstatic.com/xdata/images/hotel/square60/495123456.jpg",
      "star_rating": 5,
      "review_score": 8.7,
      "review_count": 1234,
      "review_score_word": "Fabulous",
      "address": "33, 33/27 Moo 4, Srisoonthorn Road Cherngtalay, Amphur Talang, 83110 Bang Tao Beach, Thailand",
      "distance_from_center": 18.2,
      "unit_configuration_label": "Entire villa",
      "min_total_price": 450.50,
      "currency_code": "USD",
      "is_free_cancellable": 1,
      "is_no_prepayment_block": 1,
      "checkin": "2024-06-01",
      "checkout": "2024-06-07"
    },
    {
      "hotel_id": 232813,
      "hotel_name": "The Slate",
      "url": "https://www.booking.com/hotel/th/indigo-pearl.html",
      "image_url": "https://cf.bstatic.com/xdata/images/hotel/square60/678901234.jpg",
      "star_rating": 5,
      "review_score": 8.5,
      "review_count": 987,
      "review_score_word": "Very Good",
      "address": "Nai Yang Beach, 83110 Nai Yang Beach, Thailand",
      "distance_from_center": 22.5,
      "unit_configuration_label": "Deluxe Room",
      "min_total_price": 320.00,
      "currency_code": "USD",
      "is_free_cancellable": 1,
      "is_no_prepayment_block": 0,
      "checkin": "2024-06-01",
      "checkout": "2024-06-07"
    }
  ],
  "pagination": {
    "rows_per_page": 25,
    "current_offset": 0,
    "total_count_with_filters": 1247
  },
  "search_metadata": {
    "dest_id": "-3233180",
    "dest_type": "CITY",
    "search_type": "regular"
  },
  "message": "Successfully retrieved search results",
  "retrieved_at": "2024-01-15T10:30:00Z"
}