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.
https://blog.nexwinds.com/apiEndpoints
/api/public/postsQuery 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,excerptfeaturedImage(image url)isFeatured,publishedAt,updatedAtauthorId,categoryId,tagIdslocaleId(number; associated locale record ID)
/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,excerptcontent(HTML)featuredImage(image url)isFeatured,publishedAt,updatedAtauthor,categorie,tagslocaleId(number; associated locale record ID)
/api/public/categoriesQuery parameters:
blogId(number, required)page(number, default 1)limit(number, default 10, max 20)locale(en|pt|es|fr)
Response fields:
id,name,description
/api/public/tagsQuery parameters:
blogId(number, required)page(number, default 1)limit(number, default 10, max 20)locale(en|pt|es|fr)
Response fields:
id,name,description
/api/public/authors/:idNo blogId needed. The :id path parameter is the internal numeric ID.
Path parameter:
:id(number; internal ID)
Response fields:
name,bio,avatarUrl
/api/public/tags/:idNo 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)
/api/public/categories/:idNo 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)
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 toredis://localhost:6379). - Adjust limits in
lib/config.tsviaAPI_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.
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"