GET

Accor URL to Hotel ID API

Convert an Accor hotel URL into the id used by every property endpoint.

Copy for your AI agent

Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.

Overview

Pass an accor.com or *.accor.com hotel URL. StayAPI validates the host, extracts the property id locally, and returns a normalized URL without calling Accor upstream.

Endpoint URL

GET https://api.stayapi.com/v1/accor/hotel/url-to-id

Parameters

ParameterTypeRequiredDescription
urlstringRequiredAn HTTP(S) Accor hotel URL, for example https://all.accor.com/hotel/2179/index.en.shtml.

URL-encode the value

Pass the hotel URL through your HTTP client's params/query option. It will safely encode slashes and any tracking parameters for the outer request.

Response

  • success: Always true on a 2xx response
  • url: Normalized Accor URL
  • hotel_id: Numeric or alphanumeric property id to use with Details, Amenities, Reviews, Rooms, Photos, and Price Calendar

Errors

400 INVALID_URL

The value is malformed, does not use HTTP(S), or is not on accor.com or an Accor subdomain.

400 HOTEL_ID_NOT_FOUND

The URL is on an allowed Accor host but does not contain a recognizable hotel id.

Next steps

Hotel Details

Fetch the complete property content record.

View Documentation →

Hotel Reviews

Fetch guest feedback and hotel responses.

View Documentation →
Request
curl -G "https://api.stayapi.com/v1/accor/hotel/url-to-id" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "url=https://all.accor.com/hotel/2179/index.en.shtml"
Response
{
  "success": true,
  "url": "https://all.accor.com/hotel/2179/index.en.shtml",
  "hotel_id": "2179"
}
Browse documentation