Title: Categories
Author: Edwin Cromley
Published: December 6, 2016
Last modified: October 14, 2026

---

# Categories

## In this article

 * [Schema](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema)
 * [List Categories](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#list-categories)
    - [Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition)
    - [Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request)
    - [Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments)
 * [Create a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#create-a-category)
    - [Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-2)
    - [Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-2)
 * [Retrieve a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#retrieve-a-category)
    - [Definition & Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-example-request)
    - [Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-3)
 * [Update a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#update-a-category)
    - [Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-4)
    - [Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-3)
    - [Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request-2)
 * [Delete a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#delete-a-category)
    - [Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-5)
    - [Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-4)
    - [Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request-3)

## 󠀁[Schema](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema)󠁿

The schema defines all the fields that exist within a category record. Any response
from these endpoints can be expected to contain the fields below unless the `_filter`
query parameter is used or the schema field only appears in a specific context.

 |   `id`  |   Unique identifier for the term.

 JSON data type: integer

Read only

Context: `view`, `embed`, `edit`

  |  
 |   `count`  |   Number of published posts for the term.

 JSON data type: integer

Read only

Context: `view`, `edit`

  |  
 |   `description`  |   HTML description of the term.

 JSON data type: string

Context: `view`, `edit`

  |  
 |   `link`  |   URL of the term.

 JSON data type: string,
 Format: uri

Read only

Context: `view`, `embed`, `edit`

  |  
 |   `name`  |   HTML title for the term.

 JSON data type: string

Context: `view`, `embed`, `edit`

  |  
 |   `slug`  |   An alphanumeric identifier for the term unique to its type.

 JSON data type: string

Context: `view`, `embed`, `edit`

  |  
 |   `taxonomy`  |   Type attribution for the term.

 JSON data type: string

Read only

Context: `view`, `embed`, `edit`

 One of: `category`

 |  
 |   `parent`  |   The parent term ID.

 JSON data type: integer

Context: `view`, `edit`

  |  
 |   `meta`  |   Meta fields.

 JSON data type: object

Context: `view`, `edit`

  |

## 󠀁[List Categories](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#list-categories)󠁿

 Query this endpoint to retrieve a collection of categories. The response you receive
can be controlled and filtered using the URL query parameters below.

### 󠀁[Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition)󠁿

 `GET /wp/v2/categories`

### 󠀁[Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request)󠁿

 `$ curl https://example.com/wp-json/wp/v2/categories`

### 󠀁[Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments)󠁿

 |   `context`  |   Scope under which the request is made; determines fields present in response.

 Default: `view`

 One of: `view`, `embed`, `edit`

 |  
 |   `page`  |   Current page of the collection.

 Default: `1`

  |  
 |   `per_page`  |   Maximum number of items to be returned in result set.

 Default: `10`

  |  
 |   `search`  |   Limit results to those matching a string.  |  
 |   `exclude`  |   Ensure result set excludes specific IDs.  |  
 |   `include`  |   Limit result set to specific IDs.  |  
 |   `order`  |   Order sort attribute ascending or descending.

 Default: `asc`

 One of: `asc`, `desc`

 |  
 |   `orderby`  |   Sort collection by term attribute.

 Default: `name`

 One of: `id`, `include`, `name`, `slug`, `include_slugs`, `term_group`, `description`, `count`

 |  
 |   `hide_empty`  |   Whether to hide terms not assigned to any posts.  |  
 |   `parent`  |   Limit result set to terms assigned to a specific parent.  |  
 |   `post`  |   Limit result set to terms assigned to a specific post.  |  
 |   `slug`  |   Limit result set to terms with one or more specific slugs.  |

## 󠀁[Create a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#create-a-category)󠁿

### 󠀁[Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-2)󠁿

 |   `[description](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-description)`  |   HTML description of the term.  |  
 |   `[name](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-name)`  |   HTML title for the term.

 Required: 1

  |  
 |   `[slug](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-slug)`  |   An alphanumeric identifier for the term unique to its type.  |  
 |   `[parent](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-parent)`  |   The parent term ID.  |  
 |   `[meta](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-meta)`  |   Meta fields.  |

### 󠀁[Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-2)󠁿

 `POST /wp/v2/categories`

## 󠀁[Retrieve a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#retrieve-a-category)󠁿

### 󠀁[Definition & Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-example-request)󠁿

 `GET /wp/v2/categories/<id>`

 Query this endpoint to retrieve a specific category record.

 `$ curl https://example.com/wp-json/wp/v2/categories/<id>`

### 󠀁[Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-3)󠁿

 |   `id`  |   Unique identifier for the term.  |  
 |   `context`  |   Scope under which the request is made; determines fields present in response.

 Default: `view`

 One of: `view`, `embed`, `edit`

 |

## 󠀁[Update a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#update-a-category)󠁿

### 󠀁[Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-4)󠁿

 |   `[id](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-id)`  |   Unique identifier for the term.  |  
 |   `[description](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-description)`  |   HTML description of the term.  |  
 |   `[name](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-name)`  |   HTML title for the term.  |  
 |   `[slug](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-slug)`  |   An alphanumeric identifier for the term unique to its type.  |  
 |   `[parent](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-parent)`  |   The parent term ID.  |  
 |   `[meta](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#schema-meta)`  |   Meta fields.  |

### 󠀁[Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-3)󠁿

 `POST /wp/v2/categories/<id>`

### 󠀁[Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request-2)󠁿

## 󠀁[Delete a Category](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#delete-a-category)󠁿

### 󠀁[Arguments](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#arguments-5)󠁿

 |   `id`  |   Unique identifier for the term.  |  
 |   `force`  |   Required to be true, as terms do not support trashing.  |

### 󠀁[Definition](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#definition-4)󠁿

 `DELETE /wp/v2/categories/<id>`

### 󠀁[Example Request](https://developer.wordpress.org/rest-api/reference/categories/?output_format=md#example-request-3)󠁿

 `$ curl -X DELETE https://example.com/wp-json/wp/v2/categories/<id>`

First published

December 6, 2016

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: Categories ](https://github.com/WP-API/docs/edit/master/reference/categories.md)

Changelog

[ See list of changes: Categories ](https://github.com/WP-API/docs/commits/master/reference/categories.md)

[  Previous: Block Types](https://developer.wordpress.org/rest-api/reference/block-types/)

[  Next: Comments](https://developer.wordpress.org/rest-api/reference/comments/)