Hotels

Generate hotel highlights

Overview

Generate short, AI-written "Smart Highlight" cards for a hotel. Each highlight is a title plus a one or two sentence description, generated directly in the requested language.

Pricing: $0.02 per request

Rate Limiting: This endpoint is rate-limited to 10 requests per minute per API key for both sandbox and production API keys. Exceeding this limit will result in a 429 Too Many Requests response.

When to Use

  • Hotel detail pages - Show a few compelling reasons to consider a property
  • Partner-specific tone - Adjust voice and emphasis per surface via tone, style and per-highlight context

What You Get

  • Exactly count highlights, always, in the requested order
  • type echoed back from the request so you can map each card to your own UI
  • generated indicating whether the copy is AI-generated or template fallback

Behaviour

Hotel facts are resolved server-side from hotelId; the caller never supplies them. The model sees the name, city, country, street address, parking, and description, plus a sample of facilities, rooms, policies, and nearby places (with a server-computed distance phrase: on the property, short walk, short drive, or longer drive; farther places are omitted), guest sentiment strengths when stored (not drawbacks), and classification (star rating, hotel type, chain). Generated copy is grounded in those facts. Straight apostrophes in titles and descriptions are normalized to typographic apostrophes. Enterprise API keys also omit wifi and the phrase modern amenities from the facts and from the copy, and they omit review-style wording such as guests say. Other API keys still return wifi and connectivity copy when the request asks for it. When tone or style specify length or format, those rules override the default title and description lengths.

If AI generation fails, the endpoint still returns 200 with the requested number of neutral template highlights and generated: false. It never returns an empty array for a valid hotel.

Results are cached, so repeated calls with an identical request body return identical copy.

tone and style are truncated to 200 characters (5,000 for enterprise accounts). Each highlight context is truncated to 300 characters (10,000 for enterprise accounts).

post/data/hotel/highlights

Request

  • Base URL
    https://api.liteapi.travel/v3.0
  • URL
    https://api.liteapi.travel/v3.0/data/hotel/highlights
  • Auth
    API key in header X-API-Key

Request body

hotelIdstring required

Unique ID of the hotel (liteAPI format)

languagestring required

Language code. Highlights are generated directly in this language.

countinteger

Number of highlights to generate. If highlights is supplied, count must equal its length.

tonestring

Global writing guidance, e.g. professional and inviting or calm and practical. Truncated to 200 characters (5,000 for enterprise accounts).

stylestring

Formatting preferences such as title or description length. When supplied, these rules override the default title (2-4 words) and description (~180 characters) lengths. Truncated to 200 characters (5,000 for enterprise accounts).

Example request

{
  "hotelId": "lp1897",
  "language": "en",
  "count": 3,
  "tone": "professional and inviting",
  "style": "short titles, one sentence descriptions",
  "highlights": [
    {
      "type": "location",
      "context": "nearby attractions and neighbourhood vibe"
    }
  ]
}

Response

OK

Example response

{
  "data": {
    "hotelId": "lp1897",
    "language": "en",
    "generated": true,
    "highlights": [
      {
        "type": "location",
        "title": "Heart of Gothic Quarter",
        "description": "Steps from iconic architecture and vibrant tapas bars."
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.