Listing & filtering posts
Filters, search, sorting and pagination for the post list.
GET /v1/public/blog/posts returns published posts, newest first.
Filters
| Parameter | Example | Meaning |
|---|---|---|
category | community-news | Category slug(s) or id(s), comma separated. Includes posts filed in child categories. |
tag | open-data,events | Tag slug(s) or id(s), comma separated. Matches any of them… |
tagMatch | all | …or, with all, only posts carrying every tag. |
author | 7770812996… | An author id (see GET /authors). |
featured | true | Only featured (pinned) posts — or only the others with false. |
publishedFrom / publishedTo | 2026-01-01T00:00:00Z | Publish date range. |
search | licence | Searches title, excerpt and body text. |
exclude | this-post-slug | Leave these slugs or ids out — e.g. the post being read in a "more posts" strip. |
Sorting
sort takes one of publishedAt:desc (default), publishedAt:asc, title:asc, title:desc, viewCount:desc, commentCount:desc, reactionCount:desc, updatedAt:desc.
# the five most-read posts in a category
curl "https://api.horbit.ng/v1/public/blog/posts?category=guides&sort=viewCount:desc&limit=5" \
-H "x-api-key: htk_…"Pagination
Use page (from 1) and limit (up to 100; the workspace's "posts per page" setting when left out).
Every list response carries meta:
{
"status": true,
"message": "Posts retrieved successfully",
"data": [ … ],
"meta": { "totalItems": 42, "itemsCount": 10, "itemsPerPage": 10, "totalPages": 5, "currentPage": 1 }
}Lean lists by default
List items leave the body out to stay small. Ask for more with include:
include=content— the rendered body (content.html,content.toc)include=toc— just the table of contentsinclude=design— the raw block structure, for sites that render blocks themselves
One post
GET /v1/public/blog/posts/{post} takes a slug (recommended) or id and always includes the body, plus previous and next — the neighbouring published posts, for "older / newer" links.
GET /posts/{post}/related?limit=3 returns posts sharing the most tags and categories.
Taxonomy and authors
GET /categories— every category, flat, in the workspace's order. Nest them withparentId.GET /tags?order=popular— tags with published post counts, for a tag cloud.GET /authors— everyone with a published post.
Each has a single-item version (/categories/{slug}, /tags/{slug}, /authors/{id}); fetch their posts with the matching filter on /posts.