NEXBLOG API

Simple REST API to fetch blog posts from NEXBLOG. Unauthenticated requests return only published posts. The status parameter is not accepted on the public API.

Base URL
All endpoints are relative to your deployment.
GEThttps://blog.nexwinds.com/api

Endpoints

List Posts
Fetch a paginated list of posts.
GET/api/public/posts

Query parameters (public):

  • blogId (number, required)
  • page (number, default 1)
  • limit (number, default 10, max 20)
  • locale (en | pt | es | fr)
  • categoryId (number; optional)
  • tagId (number; optional)

Response fields:

  • id (number; internal ID)
  • title, slug, seoDescription, excerpt
  • featuredImage (image url)
  • isFeatured, publishedAt, updatedAt
  • authorId, categoryId, tagIds
  • localeId (number; associated locale record ID)
Get Post
Fetch a single post by slug or ID.
GET/api/public/posts

:identifier can be a post slug or an internal ID. Requires blogId as query parameter.

Query parameters (public):

  • blogId (number, required)
  • locale (en | pt | es | fr; optional if get by id)
  • id (string; optional; internal ID)
  • slug (string; optional)

Response fields:

  • id (number; internal ID)
  • title, slug, seoDescription, excerpt
  • content (HTML)
  • featuredImage (image url)
  • isFeatured, publishedAt, updatedAt
  • author, categorie, tags
  • localeId (number; associated locale record ID)
List Categories
Fetch a paginated list of categories.
GET/api/public/categories

Query parameters:

  • blogId (number, required)
  • page (number, default 1)
  • limit (number, default 10, max 20)
  • locale (en | pt | es | fr)

Response fields:

  • id, name, description
List Tags
Fetch a paginated list of tags.
GET/api/public/tags

Query parameters:

  • blogId (number, required)
  • page (number, default 1)
  • limit (number, default 10, max 20)
  • locale (en | pt | es | fr)

Response fields:

  • id, name, description
Get Author
Fetch a single author by internal ID.
GET/api/public/authors/:id

No blogId needed. The :id path parameter is the internal numeric ID.

Path parameter:

  • :id (number; internal ID)

Response fields:

  • name, bio, avatarUrl
Get Tag
Fetch a single tag by internal ID.
GET/api/public/tags/:id

No blogId needed when using an internal numeric :id.

Parameters:

  • :id (number; internal ID; path parameter)
  • locale (en | pt | es | fr; optional)

Response fields:

  • id, name (localized)
Get Category
Fetch a single category by internal ID.
GET/api/public/categories/:id

No blogId needed when using an internal numeric :id.

Parameters:

  • :id (number; internal ID; path parameter)
  • locale (en | pt | es | fr; optional)

Response fields:

  • id, name (localized)
Rate Limiting
Public endpoints are protected by Redis-backed rate limits.

Defaults:

  • Window: 15 minutes
  • Limit: 100 requests per IP per window

When the limit is exceeded, responses return 429 Too Many Requests with headers:

  • Retry-After (seconds until next window)
  • X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Configuration:

  • Set REDIS_URL (defaults to redis://localhost:6379).
  • Adjust limits in lib/config.ts via API_CONFIG.rateLimit.

Example (showing headers):

curl -i "https://blog.nexwinds.com/api/public/posts?blogId=1"

Repeated rapid calls will eventually return 429 with the headers above.

REST API Examples
Quick samples that mirror the public endpoints above.

List Posts

curl -s "https://blog.nexwinds.com/api/public/posts?blogId=1&page=1&limit=10&locale=en"

Returns only fields listed in the docs: id, title, slug, seoDescription, excerpt, featuredImage, isFeatured, publishedAt, updatedAt, authorId, categoryId, tagIds, localeId.

Get Post by Slug

curl -s "https://blog.nexwinds.com/api/public/posts?blogId=1&slug=my-post-slug&locale=en"

Response includes: id, title, slug, seoDescription, excerpt, content (HTML), featuredImage, isFeatured, publishedAt, updatedAt, author, categorie, tags, localeId.

Get Post by ID

curl -s "https://blog.nexwinds.com/api/public/posts?blogId=1&id=123"

List Categories

curl -s "https://blog.nexwinds.com/api/public/categories?blogId=1&page=1&limit=10&locale=en"

List Tags

curl -s "https://blog.nexwinds.com/api/public/tags?blogId=1&page=1&limit=10&locale=en"

Get Author

curl -s "https://blog.nexwinds.com/api/public/authors/5"