---
title: "Typeahead search"
method: GET
path: "/v1/search"
tags: ["Search"]
---

# Typeahead search

`GET /v1/search`

## Request

- Base URL: `https://api.ufcalendar.com`
- URL: `https://api.ufcalendar.com/v1/search`
- Auth: HTTP bearer

Accent-insensitive search across roster fighters and events (up to 8 of each). Great for building pickers.

## Query parameters

- `q` string, required

## Response `200`

Matches

- SearchResponse
  - `data` SearchResults, required
    - `fighters` FighterRef[], required
      - `id` integer, required
      - `slug` string, required
      - `name` string, required
      - `nickname` string, nullable, required
      - `nationality` string, nullable, required: Country NAME as the source spells it (e.g. `United States`).
      - `country_code` string, nullable, required: ISO 3166-1 alpha-2 derived from `nationality`; null when the name is unknown to our table.
    - `events` SearchEvent[], required
      - `id` integer, required
      - `slug` string, required
      - `title` string, required
      - `org` string, required
      - `starts_at` string, date-time, required
  - `meta` EmptyMeta, required: `meta` is always present; `{}` when the endpoint has nothing to add.
    - `ignored_params` string[]: Present only when the request carried query parameters this endpoint does not take — they were ignored. Same list as the `X-UFCalendar-Ignored-Params` header. Sorted, unique.

## Other responses

- `304`: Not Modified — `If-None-Match` matched the current weak `ETag`. Empty body.
- `400`: Invalid input (`invalid_query`). `q` must be at least 2 characters.
- `401`: Missing/invalid API key (`unauthorized`).
- `403`: No active plan on the key's account (`subscription_required`) — choose a plan or start the free 1-day trial at https://www.ufcalendar.com/account/api.
- `404`: Not found (`not_found`; staged-org data 404s until the org is promoted).
- `429`: Rate limited (`rate_limited`) or monthly quota reached (`quota_exceeded`). Honor `Retry-After`.
- `500`: Something broke on our side (`internal_error`). It has been logged under the `request_id`.

---

[API](https://skmtc.dev/ufcalendar/apis/ufcalendar-fight-api.md) · [All operations](https://skmtc.dev/ufcalendar/apis/ufcalendar-fight-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ufcalendar/apis/ufcalendar-fight-api/revisions/9623cc8fb70b?raw)
