Skip to main content
GET
/
categories
/
{slug}
Retrieve Category
curl --request GET \
  --url https://api.buttercms.com/v2/categories/{slug}/ \
  --header 'Authorization: <api-key>'
{
  "data": {
    "name": "Product Updates",
    "slug": "product-updates"
  }
}
Retrieve a specific blog post category by its unique slug identifier, providing category information and optional recent posts integration. Categories help organize blog content into logical topical groups for improved navigation and content discovery. Category Information: The category object contains the display name (e.g., “Product Updates”) and URL-friendly slug identifier (e.g., “product-updates”) that can be used for building category-based navigation and content organization systems. Recent Posts Integration: Use the include=recent_posts parameter to enrich the response with the category’s recent blog posts. This adds a recent_posts array containing up to 10 of the most recently published posts in this category, ideal for creating category landing pages that showcase both the category information and latest content.

Authorizations

Authorization
string
header
required

Set the Authorization header to Token your_read_api_token.

Example: Authorization: Token abc123def456

Note: The header value includes the Token prefix.

You can access your API token from your settings page.

Path Parameters

slug
string
required

The unique slug identifier of the category to retrieve.

Query Parameters

auth_token
string

Your ButterCMS read API token

include
enum<string>

Include additional data in the response.

When set to recent_posts, the category object will include a recent_posts array containing the latest blog posts in this category (up to 10 posts, ordered by most recent first).

Available options:
recent_posts

Response

Category retrieved successfully

Response structure for retrieving a single category

data
object

Single category object