---
updatedAt: 2026-09-24T03:21:04.000Z
agentTools:
  siteIndex: https://docs.readme.com/llms.txt
  siteSearch: https://docs.readme.com/agentSearch?query=term1%20term2
  projectIndex: https://docs.readme.com/main/llms.txt
  projectSearch: https://docs.readme.com/main/agentSearch?query=term1%20term2
---

# Get all categories

Get all categories within a section of your ReadMe project.

The sorting of this data is dependent upon the order of the categories in your sidebar.

>📘
> This route is only available to projects that are using [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Create beautiful product and API documentation with our developer friendly platform.",
    "version": "2.0.0",
    "title": "ReadMe API",
    "x-readme-deploy": "5.953.0",
    "termsOfService": "https://readme.com/tos",
    "contact": {
      "name": "API Support",
      "url": "https://docs.readme.com/main/docs/need-more-support",
      "email": "support@readme.io"
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A bearer token that will be supplied within an `Authentication` header as `bearer <token>`."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth authorization code with PKCE. Access tokens are opaque and expire after 15 minutes. Validate OIDC ID tokens according to RFC8725.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://dash.readme.com/oidc/auth",
            "tokenUrl": "https://dash.readme.com/oidc/token",
            "refreshUrl": "https://dash.readme.com/oidc/token",
            "scopes": {
              "openid": "Sign in with your ReadMe account.",
              "offline_access": "Keep access when you are not signed in."
            }
          }
        }
      }
    }
  },
  "paths": {
    "/branches/{branch}/categories/{section}": {
      "get": {
        "operationId": "getCategories",
        "summary": "Get all categories",
        "tags": [
          "Categories"
        ],
        "description": "Get all categories within a section of your ReadMe project.\n\nThe sorting of this data is dependent upon the order of the categories in your sidebar.\n\n>📘\n> This route is only available to projects that are using [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,29}$"
            },
            "in": "path",
            "name": "section",
            "required": true,
            "description": "The section of your documentation to get categories from: `guides`, `reference`, or a guide section your project declares."
          },
          {
            "schema": {
              "type": "string",
              "pattern": "(v{0,1})(stable|\\bmain(?:-[a-z]{2})?(?![\\w.-])|([0-9]+)(?:\\.([0-9]+))?(?:\\.([0-9]+))?(-.*)?)(_(.*))?"
            },
            "in": "path",
            "name": "branch",
            "required": true,
            "description": "Project version number, `stable` for your project's stable version, or a valid branch name."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-readme-subdomain",
            "required": false,
            "description": "The project subdomain. Required with an OAuth token. With an API key, must match the key’s project if supplied."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "The category's name."
                          },
                          "section": {
                            "type": "string",
                            "pattern": "^[a-z0-9][a-z0-9_-]{0,29}$",
                            "default": "guide",
                            "description": "The section of your documentation where the category resides: `guide`, `reference`, or a guide section your project declares."
                          },
                          "links": {
                            "type": "object",
                            "properties": {
                              "project": {
                                "type": "string",
                                "pattern": "\\/projects\\/(me|[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)",
                                "description": "A URI to the project that this category belongs to."
                              }
                            },
                            "required": [
                              "project"
                            ],
                            "additionalProperties": false
                          },
                          "uri": {
                            "type": "string",
                            "pattern": "\\/(versions|branches)\\/((v{0,1})(stable|\\bmain(?:-[a-z]{2})?(?![\\w.-])|([0-9]+)(?:\\.([0-9]+))?(?:\\.([0-9]+))?(-.*)?)(_(.*))?)\\/categories\\/([a-z0-9][a-z0-9_-]{0,29})\\/((.*))",
                            "description": "A URI to the category resource."
                          }
                        },
                        "required": [
                          "title",
                          "links",
                          "uri"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "total",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.readme.com/v2",
      "description": "The ReadMe API"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {
      "oauth2": [
        "openid",
        "offline_access"
      ]
    }
  ],
  "x-readme": {
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "Categories"
    }
  ]
}
```

# Sibling pages

* [Create a category](https://docs.readme.com/main/reference/createcategory.md)
* [Delete a category](https://docs.readme.com/main/reference/deletecategory.md)
* [Update a category](https://docs.readme.com/main/reference/updatecategory.md)
* [Get a category](https://docs.readme.com/main/reference/getcategory.md)
* [Get the pages within a category](https://docs.readme.com/main/reference/getcategorypages.md)