{
  "openapi": "3.1.0",
  "info": {
    "title": "StayAPI",
    "description": "Accommodation search for AI agents. No auth, no subscriptions. Pay per request in USDC via x402.",
    "version": "1.0.0",
    "x-guidance": "StayAPI provides accommodation data for AI agents. All endpoints require x402 micropayments in USDC on Base chain. Start with /api/search to find hotels, then use /api/details for full information, /api/compare for price comparison, /api/reviews for AI-summarized reviews, /api/nearby for points of interest, /api/availability for real-time room availability, /api/transport for getting there, /api/deals for discounts, /api/itinerary for trip planning, /api/neighborhood for area guides, /api/amenities for facility search, and /api/full for all-in-one bundle.",
    "contact": {
      "email": "stayapi@proton.me",
      "name": "StayAPI",
      "url": "https://stayapi-jet.vercel.app"
    },
    "x-logo": {
      "url": "https://stayapi-jet.vercel.app/favicon.png"
    }
  },
  "servers": [
    {
      "url": "https://stayapi-jet.vercel.app",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/search": {
      "post": {
        "operationId": "search",
        "summary": "Search hotels and villas worldwide",
        "tags": ["Search"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "location": { "type": "string", "minLength": 1, "description": "City, region, or destination name" },
                  "checkin": { "type": "string", "format": "date", "description": "Check-in date" },
                  "checkout": { "type": "string", "format": "date", "description": "Check-out date" },
                  "budget": { "type": "string", "description": "Budget range in USD" }
                },
                "required": ["location"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Successful search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/details": {
      "post": {
        "operationId": "details",
        "summary": "Get detailed property information",
        "tags": ["Details"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.020000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Property ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Property details", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/compare": {
      "post": {
        "operationId": "compare",
        "summary": "Compare prices across booking platforms",
        "tags": ["Compare"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Property ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Price comparison", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/nearby": {
      "post": {
        "operationId": "nearby",
        "summary": "Find nearby points of interest",
        "tags": ["Nearby"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.030000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" },
                  "type": { "type": "string", "enum": ["restaurant", "attraction", "transport", "shopping", "nightlife"], "description": "Filter by type" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Nearby places", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/reviews": {
      "post": {
        "operationId": "reviews",
        "summary": "Get AI-summarized reviews",
        "tags": ["Reviews"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Review summary", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/availability": {
      "post": {
        "operationId": "availability",
        "summary": "Check real-time room availability",
        "tags": ["Availability"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.020000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" },
                  "checkin": { "type": "string", "format": "date", "description": "Check-in date" },
                  "checkout": { "type": "string", "format": "date", "description": "Check-out date" }
                },
                "required": ["id", "checkin", "checkout"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Availability results", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/transport": {
      "post": {
        "operationId": "transport",
        "summary": "Get transport options",
        "tags": ["Transport"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.030000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Transport options", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/deals": {
      "post": {
        "operationId": "deals",
        "summary": "Find best deals and discounts",
        "tags": ["Deals"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "location": { "type": "string", "minLength": 1, "description": "City or destination" }
                },
                "required": ["location"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Deals found", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/itinerary": {
      "post": {
        "operationId": "itinerary",
        "summary": "Get complete trip itinerary",
        "tags": ["Itinerary"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.250000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destination": { "type": "string", "minLength": 1, "description": "Destination city" },
                  "days": { "type": "integer", "description": "Number of days" }
                },
                "required": ["destination"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Itinerary plan", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/neighborhood": {
      "post": {
        "operationId": "neighborhood",
        "summary": "Get area guide and neighborhood info",
        "tags": ["Neighborhood"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.030000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Neighborhood info", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/amenities": {
      "post": {
        "operationId": "amenities",
        "summary": "Search hotels by amenities",
        "tags": ["Amenities"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.020000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amenities": { "type": "array", "items": { "type": "string" }, "minItems": 1, "description": "List of amenities to search for" }
                },
                "required": ["amenities"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Matching hotels", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/api/full": {
      "post": {
        "operationId": "full",
        "summary": "All-in-one premium bundle",
        "tags": ["Full"],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.500000" },
          "protocols": [{ "x402": {} }]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "minLength": 1, "description": "Hotel ID" }
                },
                "required": ["id"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Complete hotel info bundle", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } }, "required": ["success", "data"] } } } },
          "402": { "description": "Payment Required" }
        }
      }
    }
  }
}
