GET

Hotel Rooms API

Extract comprehensive room details with photos, amenities, and configurations from Booking.com hotels.

Overview

Complete Room Information

Get detailed room types, photos, sizes, bed configurations, and amenities using Booking.com's GraphQL API.

The Hotel Rooms endpoint provides comprehensive room information including names, descriptions, photos, sizes, bed configurations, and facilities for all room types available at a hotel.

Endpoint URL

GET https://api.stayapi.com/v1/booking/hotel/rooms

Query Parameters

Parameter Type Required Description
url string Required Booking.com hotel URL or hotel slug (e.g., "banyan-tree-phuket" or "https://www.booking.com/hotel/th/banyan-tree-phuket.html")
adults integer Optional Number of adults (1-30, default: 2)
children integer Optional Number of children (0-10, default: 0)
rooms integer Optional Number of rooms (1-8, default: 1)

Response Structure

Room Information

  • room_id - Unique room identifier
  • name - Room type name
  • description - Detailed room description
  • photos - Array of room photos with URLs
  • size_sqm - Room size in square meters
  • max_occupancy - Maximum number of guests

Bed Configuration

  • Bed types and counts
  • Alternative bed arrangements
  • Extra bed availability

Room Facilities

  • Private facilities (bathroom, balcony, etc.)
  • In-room amenities
  • Entertainment options
  • Special features

Best Practices

Guest Configuration

Specify the correct number of adults and children to get accurate room availability and configurations.

Implementation Tips

  • Cache room data as it doesn't change frequently
  • Use room photos for visual room selection interfaces
  • Display bed configurations clearly for guest clarity
  • Highlight key facilities that matter to guests

Supported URL Formats

This endpoint accepts both hotel slugs and full Booking.com URLs, providing flexibility in how you reference hotels.

Hotel Slug Format

Use just the hotel identifier from the URL:

url=banyan-tree-phuket

Full URL Format

Use the complete Booking.com hotel URL:

url=https://www.booking.com/hotel/th/banyan-tree-phuket.html

Automatic Detection

The API automatically detects and handles both formats. Use whichever format is most convenient for your application.

Request
# Using hotel slug
curl -X GET "https://api.stayapi.com/v1/booking/hotel/rooms?url=banyan-tree-phuket&adults=2&rooms=1" \
  -H "x-api-key: YOUR_API_KEY"

# Using full URL
curl -X GET "https://api.stayapi.com/v1/booking/hotel/rooms?url=https://www.booking.com/hotel/th/banyan-tree-phuket.html&adults=2&rooms=1" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "hotel_id": 302297,
    "hotel_name": "Banyan Tree Phuket",
    "rooms": [
      {
        "room_id": "30229701",
        "name": "One-Bedroom Pool Villa",
        "description": "Featuring a private pool and tropical garden views, this spacious villa includes a separate living area, luxurious bathroom with deep soaking tub, and outdoor rain shower.",
        "photos": [
          {
            "url": "https://cf.bstatic.com/xdata/images/hotel/max1024x768/123456789.jpg",
            "caption": "Villa exterior with pool"
          },
          {
            "url": "https://cf.bstatic.com/xdata/images/hotel/max1024x768/123456790.jpg",
            "caption": "Bedroom with ocean view"
          }
        ],
        "size_sqm": 170,
        "size_sqft": 1830,
        "max_occupancy": 3,
        "bed_configuration": {
          "primary_configuration": "1 king bed",
          "alternative_configurations": [],
          "extra_beds_available": true
        },
        "private_bathroom": true,
        "facilities": [
          "Private pool",
          "Air conditioning",
          "Free WiFi",
          "Flat-screen TV",
          "Minibar",
          "Safe",
          "Coffee machine",
          "Bathrobe",
          "Slippers",
          "Hairdryer",
          "Toiletries",
          "Balcony",
          "Garden view",
          "Pool view",
          "Outdoor furniture",
          "Outdoor dining area"
        ],
        "room_highlights": [
          "Private pool",
          "Garden view",
          "170 m²"
        ]
      },
      {
        "room_id": "30229702",
        "name": "Two-Bedroom Pool Villa",
        "description": "Perfect for families or groups, this expansive villa features two bedrooms, a private pool, full kitchen, and spacious outdoor living areas with stunning lagoon views.",
        "photos": [
          {
            "url": "https://cf.bstatic.com/xdata/images/hotel/max1024x768/234567891.jpg",
            "caption": "Two-bedroom villa pool area"
          }
        ],
        "size_sqm": 320,
        "size_sqft": 3444,
        "max_occupancy": 6,
        "bed_configuration": {
          "primary_configuration": "2 king beds",
          "alternative_configurations": [
            "1 king bed and 2 single beds"
          ],
          "extra_beds_available": true
        },
        "private_bathroom": true,
        "facilities": [
          "Private pool",
          "Kitchen",
          "Living room",
          "Dining area",
          "2 bathrooms",
          "Air conditioning",
          "Free WiFi",
          "2 flat-screen TVs",
          "Wine cooler",
          "Dishwasher",
          "Washing machine",
          "Terrace",
          "BBQ facilities"
        ],
        "room_highlights": [
          "Private pool",
          "Full kitchen",
          "320 m²",
          "2 bedrooms"
        ]
      }
    ],
    "total_room_types": 5
  },
  "message": "Successfully retrieved room details",
  "retrieved_at": "2024-01-15T10:30:00Z"
}