---
title: "Get element at percentile"
method: GET
path: "/lists/{list_id}/percentile"
tags: ["lists"]
---

# Get element at percentile

`GET /lists/{list_id}/percentile`

## Request

- The document declares no server URL.
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/vivino/apis/the-rankdb-api/docs/lists/:list_id/percentile/get.ts> (a function with typed inputs; its response is checked against the schema)

Get element at percentile.
Either `from_top` or `from_bottom` must be supplied

Required security scopes:
  * `api:read`

## Path parameters

- `list_id` string, required

## Query parameters

- `from_top` string
- `range` integer

## Response `200`

OK

- RankdbElementFull: List Element (full view)
  - `from_bottom` integer, required: Element rank in list from bottom. Bottom element has value 0.
  - `from_top` integer, required: Element rank in list from top. Top element has value 0.
  - `id` integer, required: ID of element
  - `list_id` string, required: The ID of the list to apply the operation on. Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
  - `local_from_bottom` integer: Local element rank in list from bottom when requesting sub-list. Bottom element has value 0.
  - `local_from_top` integer: Local element rank in list from top when requesting sub-list. Top element has value 0.
  - `neighbors` object: Neighbors to current element
    - `above` RankdbElement[]: RankdbElementCollection is the media type for an array of RankdbElement (default view)
      - `from_bottom` integer, required: Element rank in list from bottom. Bottom element has value 0.
      - `from_top` integer, required: Element rank in list from top. Top element has value 0.
      - `id` integer, required: ID of element
      - `list_id` string, required: The ID of the list to apply the operation on. Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
      - `payload` object, required: Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.
      - `score` integer, required: Score of the element. Higher score gives higher placement.
      - `tie_breaker` integer, required: Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.
      - `updated_at` string, date-time, required: Date of last update
    - `below` RankdbElement[]: RankdbElementCollection is the media type for an array of RankdbElement (default view)
      - `from_bottom` integer, required: Element rank in list from bottom. Bottom element has value 0.
      - `from_top` integer, required: Element rank in list from top. Top element has value 0.
      - `id` integer, required: ID of element
      - `list_id` string, required: The ID of the list to apply the operation on. Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
      - `payload` object, required: Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.
      - `score` integer, required: Score of the element. Higher score gives higher placement.
      - `tie_breaker` integer, required: Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.
      - `updated_at` string, date-time, required: Date of last update
  - `payload` object, required: Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.
  - `score` integer, required: Score of the element. Higher score gives higher placement.
  - `tie_breaker` integer, required: Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.
  - `updated_at` string, date-time, required: Date of last update

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/vivino/apis/the-rankdb-api.md) - [All operations](https://skmtc.dev/vivino/apis/the-rankdb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vivino/apis/the-rankdb-api/revisions/7a45b5309a11?raw)
