Skip to content
Agentmart
Submit a tool

premierinn.com

Premier Inn (Whitbread) hotel room availability, live nightly pricing, room-type inventory, rate plans (Flex/Standard/Non-Flex), occupancy rules.

Skill by overseers-desk

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/overseers-desk-premierinn-com

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Premier Inn (Whitbread) hotel room availability, live nightly pricing, room-type inventory, rate plans (Flex/Standard/Non-Flex), occupancy rules. Premier Inn does not distribute prices through Google Hotels or OTAs; this is the only programmatic price source.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/premierinn-com

Tools it pre-approves 2

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash,
  • Read

What's inside

Skill name
premierinn.com
Description
Premier Inn (Whitbread) hotel room availability, live nightly pricing, room-type inventory, rate plans (Flex/Standard/Non-Flex), occupancy rules. Premier Inn does not distribute prices through Google Hotels or OTAs; this is the only programmatic price source.
License
MIT
Allowed tools
Bash,, Read
Instructions
108 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands
  • Instructions call the network

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Premier Inn

The booking SPA at premierinn.com calls an open GraphQL endpoint at `POST https://api.premierinn.com/graphql`. Named queries execute anonymously via curl; no API key, no cookies. Introspection is off (server returns `INTROSPECTION_DISABLED`; the Akamai WAF additionally 403s any body containing `__schema`), so the queries below were extracted from the site's webpack bundles and verified live.

## Required headers

```bash
UA='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36'  # tested against api.premierinn.com on 2026-10-04
```

```
-A "$UA"
-H 'Content-Type: application/json'
-H 'Origin: https://www.premierinn.com'
-H 'Referer: https://www.premierinn.com/'
--compressed
```

## Hotel ID resolution (slug → hotelId)

Hotel IDs are 6-letter codes (e.g. `LONBLA` = London Blackfriars (Fleet Street)). Resolve from the public hotel-page URL path: take everything from `/hotels/` to `.html` as the slug.

```bash
curl -s --compressed <HEADERS> 'https://api.premierinn.com/graphql' --data '{
 "query":"query h($slug:String!,$language:String!,$country:String!){hotelInformationBySlug(slug:$slug,language:$language,country:$country){hotelId name address{addressLine1 postalCode} coordinates{latitude longitude}}}",
 "variables":{"slug":"/hotels/england/greater-london/london/london-blackfriars-fleet-street.html","language":"en","country":"gb"}}'
```

Returns `data.hotelInformationBySlug.{hotelId,name,address,coordinates}`. The same data (plus parking, directions, facilities, city-tax flags) is embedded in the hotel page's `__NEXT_DATA__` under the `staticHotelInformation` dehydrated query, fetchable with plain curl, if more fields are wanted than the GraphQL selection above.

There is no working hotel-discovery-by-place query on this endpoint (the search results page renders server-side and returns 500 to non-browser clients). Find the hotel page URL first — premierinn.com hotel pages are indexed and fetchable by curl.

## Availability and prices (the core query)

```bash
curl -s --compressed <HEADERS> 'https://api.premierinn.com/graphql' --data @body.json
```

body.json:

```json
{
  "operationName": "hotelAvailability",
  "query": "query hotelAvailability($hotelId: String!, $arrival: String!, $departure: String!, $rooms: [RoomSearch!]!, $bookingChannel: BookingChannelCriteria!, $country: String!) { hotelAvailability(availabilitySearchCriteria: {arrival: $arrival, departure: $departure, rooms: $rooms, hotel: {identifier: $hotelId}, bookingChannel: $bookingChannel, country: $country}) { hotelId startDate endDate available limitedAvailability mlos roomRates { ratePlanCode promotionCode cellCode roomTypes { roomType roomNumber adults children cotRequested rooms { roomType pmsRoomType silentSubstitution cotAvailable roomClass specialRequests numberOfRoomsAvailable roomPriceBreakdown { totalNetAmount baseRateAmount currencyCode totalCityTaxAmount effectiveRateAmount dailyPrices { date netPrice effectiveRate } } } } } } }",
  "variables": {
    "hotelId": "LONBLA",
    "arrival": "2026-06-10",
    "departure": "2026-06-11",
    "rooms": [{"adultsNumber": 2, "childrenNumber": 2, "cotRequired": false, "roomType": "FAM"}],
    "country": "gb",
    "bookingChannel": {"channel": "PI", "language": "EN", "subchannel": "WEB"}
  }
}
```

Field notes, all verified by live calls:

- `rooms[]` is `RoomSearch`: `adultsNumber`, `childrenNumber`, `cotRequired`, `roomType`. Children are counted, not aged — under-16s are free and the site never asks ages. Multiple entries = multiple rooms.
- `roomType` codes: `DB` double, `SB` single, `TWIN` twin, `FAM` family, `DIS` accessible.
- `bookingChannel.channel` is the brand-channel enum: `PI` (Premier Inn), also `HUB`, `ZIP`, `PID` (Premier Inn Germany). `subchannel`: `WEB`, `MOBILE`, `CBT`, `WEB_DE`.
- Response: one `roomRates[]` entry per rate plan the hotel sells for those dates. Price is `rooms[].roomPriceBreakdown.totalNetAmount` (GBP, whole stay, per room); `dailyPrices[]` breaks it per night. `numberOfRoomsAvailable` is live inventory for that room/rate. `pmsRoomType` names the physical room (e.g. `FMQUAD` family quad, `FMTRPL` family triple).
- Do not add the site's companion sub-queries `ratesInformationV2`/`hotelInventory` to this operation: `ratesInformationV2` is non-nullable and its backing content service 404s for at least some hotels, nulling the whole response. Query availability alone (as above) and inventory separately if needed.

### Rate plans and cancellation terms

Rate plan codes returned in `ratePlanCode`, with the cancellation terms as published in the site's own booking copy:

| Code | Name | Cancellation |
|---|---|---|
| `FLEXRATE` | Flex | Amend or cancel up to 1pm on arrival day (Germany: 6pm) |
| `SEMIFLEX` | Semi-Flex | Amend or cancel up to three full days before arrival |
| `STANDARD` | Standard | Cannot be cancelled; arrival date amendable up to 1pm on arrival day |
| `ADVANCE` | Advance | Amend or cancel up to 28 days before arrival |
| `NONFLEX` | Non-Flex | Cannot be amended or cancelled |

A hotel typically returns a subset (e.g. Flex/Standard/Non-Flex) depending on dates and lead time.

## Room-type inventory (counts per physical room type)

```bash
curl -s --compressed <HEADERS> 'https://api.premierinn.com/graphql' --data '{
 "query":"query i($hotelId:String!,$dateRangeEnd:String!,$dateRangeStart:String!){hotelInventory(hotelId:$hotelId,dateRangeEnd:$dateRangeEnd,dateRangeStart:$dateRangeStart){roomTypeInventories{availableCount code}}}",
 "variables":{"hotelId":"LONBLA","dateRangeStart":"2026-06-10","dateRangeEnd":"2026-06-11"}}'
```

Returns per-PMS-room-type counts (`FMQUAD`, `FMTRPL`, `DOUBLE`, `WETTWN`, ...). Negative counts appear for oversold/overbookable types; treat `availableCount >= 1` as bookable.

## Occupancy rules

```bash
curl -s --compressed <HEADERS> 'https://api.premierinn.com/graphql' --data '{
 "query":"query s($channel:Channel!){roomOccupancyLimitations(channel:$channel){roomOccupancies{adultsNumber childrenNumber acceptedRoomTypes}}}",
 "variables":{"channel":"PI"}}'
```

Verified result: a room takes at most 2 adults + 2 children. Any party with children needs `FAM`; 2 adults without children fit `DB`/`TWIN`/`DIS`; 1 adult fits `SB`/`DB`/`DIS`. A family of 2+3 therefore needs two rooms (e.g. FAM + FAM or FAM + SB), split across `rooms[]` entries in one availability call.

## Errors

- `VALIDATION_INVALID_TYPE_VARIABLE` — a variable's object shape is wrong; the message names which one.
- `errCode 802` / "Unable to get booking information for hotel X" from `content-entity-service` — the hotel's static rate-description content is missing; availability for the same hotel still works (see the non-nullable note above).
- HTTP 403 "Access Denied" (Akamai) on a previously-working call — check the body for `__schema` or other introspection tokens first; the endpoint itself accepts plain curl.

## Fallback

If the GraphQL endpoint starts rejecting non-browser clients, fall back to `browser-serialiser --dump` on the hotel page; prices render into the booking panel and `__NEXT_DATA__` still carries the static hotel record.

From overseers-desk/magazines, MIT.

More from overseers-desk/magazines

Signals

Stars
1
Forks
0
Open issues
36
Last commit (this folder)
Oct 4, 2026 (25 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from overseers-desk

Cite this page

premierinn.com skill. Agent Mart. https://agentmart.dev/skills/overseers-desk-premierinn-com (last updated 2026-10-24)