Skip to main content
The OpenBookings REST API lets you search hotel availability and manage user authentication from any HTTP client. All endpoints are served from https://openbookings.co and return JSON. There is no SDK requirement — a standard fetch call or curl command is enough to get started.

Base URL

https://openbookings.co

Available endpoints

MethodPathDescription
GET/api/querySearch hotel availability near a location
POST/api/auth/magic-link/send-magic-linkRequest a magic-link sign-in email

Request format

GET requests pass all parameters as URL query strings. POST requests must send a JSON body and include the following header:
Content-Type: application/json

Response format

All responses return JSON. Successful responses return the resource directly (an array for search results, an object for auth operations). There is no top-level wrapper object on success.
// Successful hotel search — returns an array
[
  {
    "hotel_id": "prop_abc123",
    "hotel_name": "Seaside Grand",
    "total_price": 420.00
  }
]

Error format

Errors use one of two shapes depending on the endpoint: Validation errors (HTTP 400) — returned when one or more request parameters are missing or invalid:
{
  "errors": ["lat is required", "checkout is required"]
}
Server errors (HTTP 500) — returned when an unexpected internal failure occurs:
{
  "error": "Database error"
}

HTTP status codes

CodeMeaning
200Request succeeded
400One or more parameters are missing or invalid
500Internal server error

Rate limiting

API requests are rate-limited. If you exceed the limit, you will receive an error response. Implement retry logic with exponential backoff in any production integration to handle transient rate-limit responses gracefully.
Start with a retry delay of one second and double it on each subsequent attempt, up to a maximum of 30 seconds.

Next steps

Authentication

Learn how users sign in and how sessions work.

Hotel search

Full parameter and response reference for GET /api/query.