> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Booking.com hotel

> Read a Booking.com hotel page as JSON with the booking-hotel parser. $1 per 1,000 calls. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads a Booking.com hotel page, like booking.com/hotel/pt/hf-fenix-urban.html, and returns one listing as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. Get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.booking.com/hotel/pt/hf-fenix-urban.html","formats":[{"type":"json","parser":"booking-hotel"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://www.booking.com/hotel/pt/hf-fenix-urban.html",
    formats: [{ type: "json", parser: "booking-hotel" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://www.booking.com/hotel/pt/hf-fenix-urban.html",
        "formats": [{"type": "json", "parser": "booking-hotel"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `id`, `url`, `title`, `description`, `price`, `pricePeriod`, `status`, `address`, `location`, `bedrooms`, `bathrooms`, `area`, `propertyType`, `rating`, `reviewCount`, `images` and `host`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "id": "179501",
      "url": "https://www.booking.com/hotel/pt/hf-fenix-urban.html",
      "title": "HF Fénix Urban",
      "description": "Centrally located in Lisbon, the HF Fénix Urban is a modern 4-star nonsmoking hotel offering free Wi-Fi and…",
      "price": null,
      "pricePeriod": "night",
      "status": null,
      "address": "Avenida Antonio Augusto De Aguiar,14, Avenidas Novas, 1050-016 Lisbon, Portugal",
      "location": {
        "latitude": 38.7287525576462,
        "longitude": -9.149000197649
      },
      "bedrooms": null,
      "bathrooms": null,
      "area": null,
      "propertyType": "hotel",
      "rating": 4.35,
      "reviewCount": 2463,
      "images": [
        "https://cf.bstatic.com/xdata/images/hotel/max1024x768/351732850.jpg?k=dbeeb7b9acf72e3c4be78fc36c2fa5eb12c3d3ee0012a27bc…",
        "https://cf.bstatic.com/xdata/images/hotel/max1024x768/778806252.jpg?k=3325ffa8f65107252c89e6b8f2d8d215a2867cdc4ffb2df98…",
        "https://cf.bstatic.com/xdata/images/hotel/max1024x768/814912825.jpg?k=81eab4c647a17b920393c7ae8c7eaed47015e36e1214e32ae…"
      ],
      "host": null,
      "stars": 4,
      "addressStreet": "Avenida Antonio Augusto De Aguiar,14",
      "addressCity": "Lisbon",
      "addressCountryCode": "pt",
      "checkInFrom": "3:00 PM",
      "checkOutUntil": "12:00 PM",
      "facilities": [
        {
          "group": "General",
          "name": "Air conditioning"
        }
      ],
      "rooms": [
        {
          "roomId": "17950102",
          "name": "Comfort Queen",
          "sizeSquareMeters": 12,
          "description": "Located between the 1st and 12th floor, this comfort room features a white modern décor, flat-screen TV and mini-bar.…"
        }
      ],
      "scores": [
        {
          "category": "Staff",
          "rating": 4.5
        }
      ]
    }
  }
}
```

## Options

This parser takes no options.

## Price

\$1 per 1,000 calls. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be a Booking.com hotel page, like booking.com/hotel/pt/hf-fenix-urban.html. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [Booking.com search](https://docs.stophy.dev/scrape/prebuilt-parsers/places-and-travel/booking-search.md)
* [Booking.com reviews](https://docs.stophy.dev/scrape/prebuilt-parsers/places-and-travel/booking-reviews.md)
* [Google Maps](https://docs.stophy.dev/scrape/prebuilt-parsers/places-and-travel/google-maps.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.