---
title: "Explore Search"
method: GET
path: "/explore/search"
tags: ["explore"]
---

# Explore Search

`GET /explore/search`

Corpus-wide place search (CORPUS_SEARCH_DESIGN.md §4.2). lat/lng bias
to a ~50km box with auto-widen.

Open to every signed-in user as of the gate lift (it was `get_admin_user`
while the Saved tab's search footer was dogfooded). `mode` and `preview`
stayed admin-only affordances, so rather than exposing them to the wider
audience they are coerced back to their product defaults for non-admins:

- `mode` is the admin preview's eval toggle. semantic/hybrid embed the
  query per request, so leaving it open would let any caller spend
  embedding budget; the user-facing product is bm25 regardless (design
  doc §6).
- `preview` marks a serve for the training-exclusion hygiene contract.
  Honouring it from arbitrary callers would let real user searches opt
  themselves out of training data.

Coerced rather than 400'd: both are absent from the shipping clients'
query strings (`getExploreSearch` sends q/limit/sid only), so a request
carrying them is a hand-rolled one, not a client that needs an error.

## Query parameters

- `q` string, required
- `lat` number, nullable
- `lng` number, nullable
- `label` string, nullable
- `limit` integer
- `preview` boolean
- `mode` 'bm25' | 'semantic' | 'hybrid'
- `sid` string, nullable

## Headers

- `x-client-build` string, nullable

## Response `200`

Successful Response

- FeedResponse
  - `request_id` string, required
  - `anchor_label` string, nullable
  - `items` ExploreItem[], required
    - `place_id` string, required
    - `name` string, required
    - `category` string, nullable
    - `city` string, nullable
    - `country_code` string, nullable
    - `lat` number, nullable
    - `lng` number, nullable
    - `image_url` string, nullable
    - `image_thumbhash` string, nullable
    - `rating` number, nullable
    - `num_reviews` integer, nullable
    - `description` string, nullable
    - `michelin_award` string, nullable
    - `michelin` MichelinDistinction — A place's Michelin Guide distinction, structured. Canonical rationale — the TS mirror and the renderers point here rather than restating it. Rides alongside `michelin_award` rather than replacing it: that field is a pre-rendered label ("★★★"), and a label cannot drive iconography. An award string we don't recognise yields NO distinction (we never paint a mark we can't justify) while still surfacing verbatim in `michelin_award`, so a new tier degrades to text rather than disappearing.
      - `tier` 'stars' | 'bib_gourmand' | 'selected', required
      - `stars` integer, nullable
      - `green_star` boolean
      - `url` string, nullable
      - `cuisine` string, nullable
    - `source` string, required
    - `score` number, required
    - `position` integer, required
    - `reason` string, nullable
    - `hydration_pending` boolean
    - `sources` string[]
    - `kind` 'place' | 'stay'
    - `stay` StayFacets — What a Michelin Guide hotel carries that an ordinary place doesn't. Same rationale as `MichelinDistinction`, one category later: `key_label` is the Guide's own pre-rendered string ("Two MICHELIN Keys"), and a label cannot drive iconography, so `tier`/`keys` ride beside it. A tier we don't recognise yields no structured distinction while still surfacing verbatim in `key_label` — a new tier degrades to text rather than disappearing. A sub-object rather than flat columns on `ExploreItem`: otherwise every future category (a tour, a tasting menu) adds its own nullable fields to the type EVERY card in the app carries.
      - `key_label` string, nullable
      - `tier` 'keys' | 'selected', nullable
      - `keys` integer, nullable
      - `guide_url` string, nullable
      - `editorial` string, nullable
      - `check_in` string, date, nullable
      - `check_out` string, date, nullable
    - `distance_km` number, nullable
    - `distance_from` 'you' | 'hotel', nullable
  - `next_offset` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stardrift/fastapi/revisions/00746572572a/schema)
