{
  "openapi": "3.1.0",
  "info": {
    "title": "HotelPrices API",
    "version": "1.0.0",
    "description": "Real-time global hotel prices, room availability, nightly rate breakdown with taxes, cancellation policies, property amenities, and verified guest reviews JSON API for AI travel agents and OTA rate shoppers. $1.00 = 10,000 Credits ($0.20/1K hotel results; 0 Credits on empty results or errors). Also supports Remote MCP (OAuth 2.1) and keyless x402 Base Mainnet USDC ($0.002/call).",
    "contact": {
      "name": "HotelPrices API Engineering",
      "email": "support@hotelpricesapi.com",
      "url": "https://hotelpricesapi.com"
    }
  },
  "servers": [
    {
      "url": "https://api.hotelpricesapi.com",
      "description": "Production Global Hotel Prices & Availability Gateway"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Developer API key (hp_live_...) from https://hotelpricesapi.com/dashboard"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key (hp_live_...) or OAuth 2.1 MCP token (mcp_at_...)"
      }
    },
    "schemas": {
      "LocationItem": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string"
          },
          "dest_id": {
            "type": "string"
          },
          "dest_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city_name": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "nullable": true
          },
          "hotels_count": {
            "type": "integer",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "HotelSummary": {
        "type": "object",
        "properties": {
          "hotel_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "stars": {
            "type": "integer",
            "nullable": true
          },
          "review_score": {
            "type": "number",
            "nullable": true
          },
          "review_score_word": {
            "type": "string",
            "nullable": true
          },
          "review_count": {
            "type": "integer"
          },
          "checkin_date": {
            "type": "string"
          },
          "checkout_date": {
            "type": "string"
          },
          "nights": {
            "type": "integer"
          },
          "price_total": {
            "type": "number",
            "nullable": true
          },
          "price_per_night": {
            "type": "number",
            "nullable": true
          },
          "taxes_and_fees": {
            "type": "number",
            "nullable": true
          },
          "price_all_inclusive": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "latitude": {
                "type": "number",
                "nullable": true
              },
              "longitude": {
                "type": "number",
                "nullable": true
              }
            }
          },
          "photo_url": {
            "type": "string",
            "nullable": true
          },
          "checkin_window": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "nullable": true
              },
              "until": {
                "type": "string",
                "nullable": true
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyHeader": []
    },
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/locations/search": {
      "get": {
        "operationId": "searchLocations",
        "summary": "Autocomplete global cities, districts, and destination location_id tokens",
        "description": "Resolves destination queries into canonical location_id handles, GPS coordinates, timezones, and available hotel counts. Top 50 global cities are pre-seeded for sub-20ms resolution. Cost: 2 Credits / call.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Paris"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized destination matches",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://hotelpricesapi.com",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "query": "Paris",
                    "count": 1,
                    "locations": [
                      {
                        "location_id": "eyJjaXR5X25hbWUiOiJQYXJpcyIsImNvdW50cnkiOiJGcmFuY2UiLCJkZXN0X2lkIjoiLTE0NTY5MjgiLCJkZXN0X3R5cGUiOiJjaXR5In0=",
                        "dest_id": "-1456928",
                        "dest_type": "city",
                        "name": "Paris",
                        "city_name": "Paris",
                        "region": "Ile de France",
                        "country": "France",
                        "country_code": "fr",
                        "label": "Paris, Ile de France, France",
                        "latitude": 48.85668,
                        "longitude": 2.35148,
                        "hotels_count": 27083,
                        "timezone": "Europe/Paris"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hotels/search": {
      "get": {
        "operationId": "searchHotels",
        "summary": "Search live global hotel prices, availability, and nightly rate breakdown",
        "description": "Returns up to 20 available hotels per call with normalized nightly rate, total stay price, taxes & fees, all-inclusive price, guest review score, star class, GPS coordinates, high-res photo, and check-in window. Top 50 cities cost 1 upstream lookup with 15-minute fresh result caching. Cost: 2 Credits / hotel returned ($0.20/1K).",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Paris"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-12-15"
            }
          },
          {
            "name": "checkout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-12-17"
            }
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2,
              "minimum": 1,
              "maximum": 12
            }
          },
          {
            "name": "rooms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "maximum": 8
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "USD"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized hotel availability and nightly rates",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://hotelpricesapi.com",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "city": "Paris",
                    "checkin": "2026-12-15",
                    "checkout": "2026-12-17",
                    "nights": 2,
                    "currency": "USD",
                    "count": 1,
                    "hotels": [
                      {
                        "hotel_id": "59015",
                        "name": "Ibis Styles Paris Batignolles",
                        "city": "Paris",
                        "country_code": "fr",
                        "stars": 3,
                        "review_score": 8.3,
                        "review_score_word": "Very Good",
                        "review_count": 3216,
                        "checkin_date": "2026-12-15",
                        "checkout_date": "2026-12-17",
                        "nights": 2,
                        "price_total": 304.14,
                        "price_per_night": 152.07,
                        "taxes_and_fees": 54.63,
                        "price_all_inclusive": 358.77,
                        "currency": "USD",
                        "coordinates": {
                          "latitude": 48.889853,
                          "longitude": 2.321209
                        },
                        "photo_url": "https://cf.bstatic.com/xdata/images/hotel/max1024x768/753148428.jpg?k=f66edc329a17da900502ecfe7770775c7840ab8a9faf90c1635227c3f5fe4bbf&o=",
                        "checkin_window": {
                          "from": "14:00",
                          "until": "00:00"
                        },
                        "checkout_window": {
                          "from": "00:00",
                          "until": "12:00"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hotels/detail": {
      "get": {
        "operationId": "getHotelDetail",
        "summary": "Get property room offers, cancellation policies, breakfast inclusion, and amenities",
        "description": "Returns room-level availability blocks, base and all-inclusive nightly pricing, refundable vs non-refundable policies, Wi-Fi & breakfast review sub-scores, spoken languages, and facility counts. Cached 12 hours. Cost: 10 Credits / call.",
        "parameters": [
          {
            "name": "hotel_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "59015"
            }
          },
          {
            "name": "checkin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-12-15"
            }
          },
          {
            "name": "checkout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-12-17"
            }
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2
            }
          },
          {
            "name": "rooms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "USD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full hotel room offers and property dossier",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://hotelpricesapi.com",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "hotel": {
                      "hotel_id": "59015",
                      "name": "Ibis Styles Paris Batignolles",
                      "address": "119 Avenue De Clichy, 17th arr., 75017 Paris, France",
                      "city": "Paris",
                      "country": "France",
                      "timezone": "Europe/Paris",
                      "review_count": 3216,
                      "wifi_review_score": 8.4,
                      "breakfast_review_score": 8.2,
                      "breakfast_included": true,
                      "has_refundable_rooms": false,
                      "facilities_count": 53,
                      "rooms_count": 4,
                      "rooms": [
                        {
                          "block_id": "5901512_88984935_2_1_0",
                          "room_name": "Standard Twin Room",
                          "max_occupancy": 2,
                          "rooms_available": 14,
                          "breakfast_included": true,
                          "refundable": false,
                          "cancellation_type": "Non-refundable",
                          "price_total": 304.14,
                          "price_per_night": 152.07,
                          "taxes_and_fees": 55,
                          "price_all_inclusive": 358.77,
                          "currency": "USD"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hotels/reviews": {
      "get": {
        "operationId": "getHotelReviews",
        "summary": "Get verified hotel guest reviews, pros/cons, and hotelier responses",
        "description": "Returns paginated verified guest stay reviews with numeric score, title, pros, cons, travel purpose, date, and property management replies. Cached 12 hours. Cost: 2 Credits / review returned.",
        "parameters": [
          {
            "name": "hotel_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "59015"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verified guest reviews",
            "content": {
              "application/json": {
                "example": {
                  "code": 0,
                  "provider": "https://hotelpricesapi.com",
                  "status": "ok",
                  "msg": "success",
                  "data": {
                    "hotel_id": "59015",
                    "page": 1,
                    "count": 1,
                    "total_reviews": 25,
                    "reviews": [
                      {
                        "review_id": "5357340268",
                        "score": 8.4,
                        "title": "Great value for money",
                        "pros": "Newly renovated hotel with great breakfast.",
                        "cons": "Compact bathroom layout.",
                        "date": "2026-10-27 09:00:34",
                        "language": "en-gb",
                        "travel_purpose": "leisure"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Gateway health check (0 Credits)",
        "security": [],
        "responses": {
          "200": {
            "description": "Gateway is healthy"
          }
        }
      }
    }
  }
}