---
title: "List categories"
method: GET
path: "/categories"
tags: ["Shop"]
---

# List categories

`GET /categories`

## Request

- Base URL: `https://gorest.co.in/public/v3`
- URL: `https://gorest.co.in/public/v3/categories`
- Auth: none required

## Query parameters

- `page[size]` integer
- `page[after]` string
- `page[number]` integer
- `page[count]` boolean
- `search` string
- `sort` 'name' | '-name'
- `fields` object
  - `categories` string

## Headers

- `If-None-Match` string

## Response `200`

One page of categories.

- CategoryList
  - `data` Category[], required
    - `description` string
    - `id` string, uuid, required
    - `name` string
    - `slug` string
  - `meta` ListMeta, required
    - `has_more` boolean, required: More items follow this page.
    - `next_cursor` string, nullable, required: Send as `page[after]` for the next page; null on the last page and with offset paging.
    - `total` integer, nullable, required: All matching items; only with `page[number]` or `page[count]=true`, else null.

## Other responses

- `304`: Not changed since the ETag in `If-None-Match`; no body.
- `400`: A parameter is wrong, unknown or out of range.
- `401`: No token, or the token is wrong, expired or revoked.
- `429`: Over the rate limit; wait `Retry-After` seconds.
- `500`: Something failed on the server.

---

[API](https://skmtc.dev/gorest/apis/gorest-api-v3.md) - [All operations](https://skmtc.dev/gorest/apis/gorest-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/gorest/apis/gorest-api-v3/revisions/89aa429755a6?raw)
