Start free. Scale as your blog grows.Get started

API reference

Tags API

Retrieve the tags in your ContioReach workspace.

Tags work like categories but are intended for finer-grained topics, and a post can carry several.

Endpoint

GEThttps://cms-api.contioreach.com/v1/tags
curl
curl "https://cms-api.contioreach.com/v1/tags" \
  -H "X-API-Key: YOUR_API_KEY"

Query parameters

ParameterTypeDescription
pagenumberPage of results to return. Starts at 1.
limitnumberTags per page.
idstringReturn the single tag matching this id.
slugstringReturn the single tag matching this slug.

Response

The envelope matches every other endpoint.

GET /v1/tags
{
  "success": true,
  "data": [
    {
      "id": "…",
      "name": "AI Search",
      "slug": "ai-search",
      "postCount": 4
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1,
    "hasNextPage": false,
    "hasPrevPage": false
  }
}

A workspace with no tags returns 200 with an empty data array and total: 0. Build tag navigation defensively so an untagged blog renders nothing rather than an empty shell.

Tag fields

FieldTypeDescription
idstringUnique identifier.
namestringDisplay name.
slugstringURL-safe identifier for your tag route.
postCountnumberNumber of published posts carrying the tag.

Tags also appear inline on every post, as objects with id, name, and slug. If you only need the tags for an article you are already fetching, read post.tags rather than calling this endpoint.

Examples

List every tag

JavaScript
const res = await fetch(
  "https://cms-api.contioreach.com/v1/tags",
  { headers: { "X-API-Key": process.env.CMS_API_KEY } }
);

const { data: tags } = await res.json();

Posts for one tag

Filtering by tag happens on the Posts API:

JavaScript
const res = await fetch(
  `https://cms-api.contioreach.com/v1/blogs?tags=${slug}&limit=12&minimal=true`,
  { headers: { "X-API-Key": process.env.CMS_API_KEY } }
);

Posts matching several tags

Pass a comma separated list:

JavaScript
const res = await fetch(
  "https://cms-api.contioreach.com/v1/blogs?tags=seo,ai-search&minimal=true",
  { headers: { "X-API-Key": process.env.CMS_API_KEY } }
);

Errors

StatusCodeMeaning
401INVALID_API_KEYThe API key is missing, incorrect, or inactive.
429USAGE_LIMIT_EXCEEDEDYour plan's monthly API calls are used up. Requests resume when the allowance resets.

Was this page helpful?