> 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/v6.12.0/api-reference/custom-dictionary-api/actions/get-words-from-dictionary-getwords.md).

# Get words from dictionary (getwords)

Returns the full wordlist for one dictionary.

### What it does

* Fetches all words for one dictionary `id`.
* Returns words sorted alphabetically.
* Removes duplicates.

### Required parameters

| Parameter | Type    | Notes                     |
| --------- | ------- | ------------------------- |
| `cmd`     | string  | `custom_dictionary`       |
| `action`  | string  | `getwords`                |
| `id`      | integer | Exactly one dictionary ID |

### Optional parameters

| Parameter  | Type   | Notes                     |
| ---------- | ------ | ------------------------- |
| `format`   | string | `json` (default) or `xml` |
| `callback` | string | JSONP wrapper (JSON only) |

### Request example

```
cmd=custom_dictionary&action=getwords&id=101565
```

### Response example

```json
{
  "result": [
    {
      "id": 101565,
      "lang": "en_US",
      "description": "Engineering terms",
      "wordlist": ["GraphQL", "Kubernetes", "TypeScript"],
      "count": 3,
      "status": "success",
      "message": ["Wordlist extracted."]
    }
  ]
}
```

### Possible errors

* Missing `id`.
* Multiple IDs passed (only one is allowed).
* Dictionary `id` not found.

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

### Notes and edge cases

* If the stored dictionary contains unsupported words, the server can skip them.
* Use `getdicts` to list dictionaries without fetching wordlists.
