---
title: "Autocomplete usernames"
method: GET
path: "/api/player/autocomplete"
tags: ["Users"]
---

# Autocomplete usernames

`GET /api/player/autocomplete`

Provides autocompletion options for an incomplete username.

## Query parameters

- `term` string, required
- `exists` boolean
- `object` boolean
- `names` boolean
- `friend` boolean
- `team` string
- `tour` string
- `swiss` string
- `teacher` boolean

## Response `200`

An array of players which usernames start with the provided term.

- union
  - string[]
  - object
    - `result` LightUserOnline[]
      - `id` string, required
      - `name` string, required
      - `flair` string — See [available flair list and images](https://github.com/lichess-org/lila/tree/master/public/flair)
      - `title` 'GM' | 'WGM' | 'IM' | 'WIM' | 'FM' | 'WFM' | 'NM' | 'CM' | 'WCM' | 'WNM' | 'LM' | 'BOT' — only appears if the user is a titled player or a bot user
      - `patron` boolean — Use patronColor value instead to determine if player is a patron.
      - `patronColor` integer — Players can choose a color for their Patron wings. See [here for the color mappings](https://github.com/lichess-org/lila/blob/master/ui/lib/css/abstract/_patron-colors.scss). The presence of this field indicates the player is an active Patron.
      - `online` boolean

---

[API](https://skmtc.net/lichess/apis/lichess-org-api-reference.md) · [All operations](https://skmtc.net/lichess/apis/lichess-org-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lichess/lichess-org-api-reference/revisions/f16676f55a94/schema)
