Skip to navigation

Natural-language catalog search

Composes the platform’s natural-language search pipeline (PII scrub → parse → filter → vector rank → title boost) over the caller’s visible catalog (its airline_id namespace plus ‘global’). airline_id is never caller-supplied — it derives from the validated bearer token’s client_id, resolved server-side. When the request carries a passenger session (via the X-Session-Id header), results are hard-filtered to what is age-appropriate for the identified member before ranking; a sessionless (machine-to-machine) request is not age-filtered. kindOverride accepts movie, tv, audio, and game (audio and game are requested via this field).

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Headers

X-Session-IdstringOptional

Optional passenger-session locator (a within-tenant locator, never a trust assertion). When sent, results are hard-filtered to what is age-appropriate for the identified member before ranking, and — when a session-affinity profile exists — may be personalized; a present-but-malformed value is rejected 400 before this handler runs. Omitted entirely, the request is treated as sessionless (machine-to-machine) and results are not age-filtered.

Request

This endpoint expects an object.
querystringRequired
topKinteger or stringOptional
kindOverridestring or nullOptional

“Movie” | “TV” | “Audio” | “Game” | null. Overrides the parsed kind when set; audio and game content is requested via this field. Matched case-insensitively; common synonyms (e.g. “games”, “music”, “albums”, “audiobooks”) are accepted and map to the canonical kind.

flightMinutesRemaininginteger or string or nullOptional

Minutes remaining in the passenger’s flight, when the client knows it. Optional; must be a positive integer when present. It only takes effect when the query itself asks for content that fits the remaining flight (“something I can finish before we land”) — the smaller of this value and any explicit duration stated in the query becomes the runtime ceiling, and titles with a known longer runtime are excluded. Omitting it never changes results for queries that don’t ask for flight-time fit.

seatIdstring or nullOptional

Optional un-trusted member locator (“which member of the caller’s own session to personalize for” — same posture as the scored catalog serve). When set alongside a real passenger session, the member’s session affinity re-ranks results; when omitted, search stays unpersonalized. Never a trust assertion: tenancy and session always resolve server-side from the credential and session header.

memberSlotstring or nullOptional

Optional per-member slot within seatId (null = the seat’s sole traveler).

Response

OK
parsedobject

The result of understanding a natural-language search query. filters holds hard constraints extracted from the query; semanticText is what free-text meaning remains once those constraints are removed. source reports whether an AI parser or the deterministic fallback produced this result — never silently.

Behavior: decades like ”90s”/“1990s” expand to a year range (1990–1999); compound genres expand (“romcom” → Romance + Comedy); well-known name misspellings are corrected (“Tom Cruz” → “Tom Cruise”); kind keywords map “shows”/“series”/“TV” to TV and “movies”/“films” to Movie; “kid-friendly”/“family-safe” caps the rating at PG and “for kids” caps it at G. Command phrasing (“Show me…”) does not itself imply a content kind. The parser never invents a constraint the query did not state.

resultslist of objects
candidateCountinteger or string

How many of the EXAMINED nearest candidates matched this search’s filters — not a total-match count over the whole catalog. The search examines a bounded candidate window sized from topK (normally topK×3, clamped between 50 and 300); the window widens (up to topK×20, clamped between 500 and 1000) when the query filters by cast, or a member age restriction applies, so filtering still has enough candidates to draw from. Use totalItems and coverage for catalog-size signals — candidateCount reflects only what this particular search examined.

totalItemsinteger or string

The count of titles this search could draw from, before any query filter or age gate: the caller’s visible catalog — and, when the session is bound to a flight with a pushed active catalog, only the titles on that flight. Coverage percentages use the same basis.

coverageobject

Catalog coverage over the visible result set, always reported honestly. The percentage fields below are on a 0–100 scale (e.g. 42.5 means 42.5%), never a 0–1 fraction.

correlationIdstring
schemaVersionstringOptional
personalizedbooleanOptional

True only when a session-affinity profile was found for the requested member AND shaped this ranking. False is the honest cold-start/unpersonalized signal (no locator sent, no behavior observed yet, or no real passenger session) — never a fabricated personalization claim.

flightMinutesRemainingServerDerivedbooleanOptional

True only when the remaining-minutes value used for a “fits the remaining flight” query was derived by the platform from the bound flight’s scheduled arrival time, because the request itself did not supply one. False when the request supplied that value (always authoritative) and false when no remaining-minutes value was resolved at all. Lets a caller tell a platform-computed flight time apart from one it sent itself.

This reports where the remaining-minutes value came from, not which ceiling ultimately applied: when the query text carries its own, tighter runtime limit, that tighter limit wins and this flag still reports true.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error