> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/api-reference/user-custom-dictionary-api/actions/list-dictionaries-getdicts.md).

# List dictionaries (getdicts)

Return the names of all user dictionaries.

Return the names of all user dictionaries.

{% hint style="info" %}
An **access key** is **required** for this action. See [Access key](/deployment/configuration/application-server/access-key.md).
{% endhint %}

### Parameters

These parameters work with any `cmd`.

| Name           | Type    | Required   | Description                                                                                                                                                                       |
| -------------- | ------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `serviceid`    | string  | Cloud only | Cloud API key. Required for Cloud requests. Not used on-premises.                                                                                                                 |
| `format`       | string  | No         | Response format. Values: `json` (default), `xml`.                                                                                                                                 |
| `callback`     | string  | No         | JSONP wrapper function name. Use only with `format=json`.                                                                                                                         |
| `short_answer` | boolean | No         | <p>JSON only. When <code>true</code>, shortens JSON keys to reduce payload size.<br>See <a href="/api-reference/overview.md#boolean-parameter-values">boolean parameters</a>.</p> |

See [Overview](/api-reference/overview.md#common-parameters) for details.

#### Command specific parameters

| Parameter    | Type   | Required | Default           | Notes                                    |
| ------------ | ------ | -------- | ----------------- | ---------------------------------------- |
| `cmd`        | string | Yes      | `user_dictionary` | Command name.                            |
| `action`     | string | Yes      | `getdicts`        | Action name.                             |
| `access_key` | string | Yes      |                   | Access key that authorizes this request. |

### Behavior

* Returns dictionary **names** only.
* Returns up to **1000** names per request.
* Adds a `warning` field when more dictionaries exist.

{% hint style="info" %}
`getdicts` doesn't return the words.

Use [`getdict`](/api-reference/user-custom-dictionary-api/actions/get-dictionary-content-getdict.md) to fetch the wordlist of a dictionary.
{% endhint %}

### Response

`getdicts` uses its own structure. See [Response format](/api-reference/user-custom-dictionary-api/response-format.md) for the structure that the other actions return.

| Field          | Type (JSON) | Notes                                             |
| -------------- | ----------- | ------------------------------------------------- |
| `action`       | string      | Executed action name.                             |
| `dictionaries` | string\[]   | Dictionary names.                                 |
| `warning`      | string      | Present only when the API truncates the response. |

### Errors

Common errors:

* `access_key` is missing or invalid.

See [Errors reference](/api-reference/user-custom-dictionary-api/errors-reference.md).

### Examples

<details>

<summary>List all dictionaries</summary>

**Request body (JSON):**

```json
{
  "cmd": "user_dictionary",
  "action": "getdicts",
  "access_key": "<your-access-key>"
}
```

**Response (JSON):**

```json
{
  "action": "getdicts",
  "dictionaries": ["my_dict_1", "my_dict_2"]
}
```

</details>

<details>

<summary>List all dictionaries in XML</summary>

**Request body (JSON):**

```json
{
  "cmd": "user_dictionary",
  "action": "getdicts",
  "access_key": "<your-access-key>",
  "format": "xml"
}
```

**Response (XML):**

```xml
<user_dictionary>
  <action>getdicts</action>
  <dictionaries>
    <dictionary>my_dict_1</dictionary>
    <dictionary>my_dict_2</dictionary>
  </dictionaries>
</user_dictionary>
```

</details>

<details>

<summary>Truncated response</summary>

When you have more than 1000 dictionaries, the API returns the first 1000 names and adds a `warning`.

**Response (JSON):**

```json
{
  "action": "getdicts",
  "dictionaries": ["my_dict_1", "my_dict_2"],
  "warning": "Only the first 1000 dictionaries are returned. Delete the unused ones to see the rest."
}
```

To see the rest, delete the dictionaries that you no longer use.

</details>
