# Search hotels (v1)

Returns one page of up to 30 hotels for a location, dates and guests, with star rating, guest score, address, nightly price, stay total and cancellation terms. An unknown `location` is rejected with a 400.

- Platform: Priceline
- Request: `GET https://api.toolzerhub.com/v1/priceline/search`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/priceline/hotel-search/get-priceline-hotel-search

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `location` | query | yes | string | location_id from the Locations endpoint (a city, landmark or airport such as CDG), or a priceline.com hotel search link such as https://www.priceline.com/relax/in/3000035827. |
| `checkin` | query | yes | string | Arrival date, YYYY-MM-DD; today or later. |
| `checkout` | query | yes | string | Departure date, YYYY-MM-DD; after checkin and at most 30 nights later. |
| `adults` | query | no | integer | Adults across all rooms. Default: 2. |
| `rooms` | query | no | integer | Rooms to book. Default: 1. |
| `children` | query | no | string | Each child's age (0-17), separated by commas. Omit for no children. Default: . |
| `currency` | query | no | string | ISO 4217 currency for every price, such as USD, EUR or GBP. Default: USD. |
| `sort` | query | no | enum: recommended, price, rating, savings | recommended (as on priceline.com, with promoted hotels), price (lowest nightly price first), rating (guest rating and review count) or savings (largest discount first). Default: recommended. |
| `page` | query | no | integer | One-based page of up to 30 hotels. Prices are live, so a hotel can move between pages from one request to the next. Default: 1. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/priceline/search?location=<location>&checkin=<checkin>&checkout=<checkout>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
