---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_dictionary_get_tokens.md
  - href: en/concepts/python-reference_dictionary_get_tokens.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# get_tokens

<!-- source: en/_includes/work_src/reusage-tokenizer/get_tokens.md -->
Return tokens that correspond to the given identifiers.
<!-- endsource: en/_includes/work_src/reusage-tokenizer/get_tokens.md -->


## Method call format {#call-format}

```
get_tokens(token_id)
```

## Parameters {#parameters}

### token_id

#### Description

A list of token identifiers that should be returned.

**Data types**

list

**Default value**

Obligatory parameter

## Type of return value {#return-value}

list

## Example {#example}

```python
from catboost.text_processing import Dictionary

dictionary = Dictionary(occurence_lower_bound=0)\
    .fit(["his", "tender", "heir", "whatever"])

print(dictionary.get_tokens([1,3]))

```

Output:
```bash
['his', 'whatever']
```

