NEXBLOG API
Public REST API for fetching blog content. All endpoints are read-only and return only published content to unauthenticated requests.
Base URL
`` https://blog.nexwinds.com/api
`
Endpoints
GET /public/posts
List published posts with pagination.
Query Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| blogId | number | Yes | - | Blog identifier |
| page | number | No | 1 | Page number |
| limit | number | No | 10 | Items per page (max 20) |
| locale | string | No | blog default | en \| pt \| es \| fr |
| categoryId | number | No | - | Filter by category |
| tagId | number | No | - | Filter by tag |
Response Fields
| Field | Description |
|-------|-------------|
| id | Post ID |
| title | Post title |
| slug | URL-friendly identifier |
| seoDescription | SEO meta description |
| excerpt | Short summary |
| featuredImage | Image URL or null |
| isFeatured | Featured flag |
| publishedAt | ISO 8601 date |
| updatedAt | ISO 8601 date |
| authorId | Author ID |
| categoryId | Category ID |
| tagIds | Array of tag IDs |
| localeId | Locale record ID |
---
GET /public/posts?id=\
Get a single post by internal ID.
Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| blogId | number | Yes | Blog identifier |
| id | string | Yes* | Internal numeric ID |
| locale | string | No | en \| pt \| es \| fr |
*\* Required if slug not provided*
Response Fields
| Field | Description |
|-------|-------------|
| id | Post ID |
| title | Post title |
| slug | URL-friendly identifier |
| seoDescription | SEO meta description |
| excerpt | Short summary |
| content | HTML content |
| featuredImage | Image URL or null |
| isFeatured | Featured flag |
| publishedAt | ISO 8601 date |
| updatedAt | ISO 8601 date |
| author | Object with id and name |
| categorie | Object with id and localized name |
| tags | Array of {id, name} objects |
| localeId | Locale record ID |
---
GET /public/posts?slug=\
Get a single post by slug.
Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| blogId | number | Yes | Blog identifier |
| slug | string | Yes* | URL-friendly identifier |
| locale | string | No | en \| pt \| es \| fr |
*\* Required if id not provided*
Response fields are identical to the by-id endpoint.
---
GET /public/categories
List categories with pagination.
Query Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| blogId | number | Yes | - | Blog identifier |
| page | number | No | 1 | Page number |
| limit | number | No | 10 | Items per page (max 20) |
| locale | string | No | blog default | en \| pt \| es \| fr |
Response Fields
| Field | Description |
|-------|-------------|
| id | Category ID |
| name | Localized name |
| description | Category description |
---
GET /public/categories/:id
Get a single category by ID.
Path Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| :id | number | Yes | Internal numeric ID |
Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| locale | string | No | en \| pt \| es \| fr |
Response Fields
| Field | Description |
|-------|-------------|
| id | Category ID |
| name | Localized name |
---
GET /public/tags
List tags with pagination.
Query Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| blogId | number | Yes | - | Blog identifier |
| page | number | No | 1 | Page number |
| limit | number | No | 10 | Items per page (max 20) |
| locale | string | No | blog default | en \| pt \| es \| fr |
Response Fields
| Field | Description |
|-------|-------------|
| id | Tag ID |
| name | Localized name |
| description | Tag description |
---
GET /public/tags/:id
Get a single tag by ID.
Path Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| :id | number | Yes | Internal numeric ID |
Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| locale | string | No | en \| pt \| es \| fr |
Response Fields
| Field | Description |
|-------|-------------|
| id | Tag ID |
| name | Localized name |
---
GET /public/authors/:id
Get an author by ID.
Path Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| :id | number | Yes | Internal numeric ID |
Response Fields
| Field | Description |
|-------|-------------|
| id | Author ID |
| name | Author name |
| bio | Author biography |
| image | Author image URL |
---
Response Format
All endpoints return responses in the following format:
List Endpoints
`json
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 10,
"total": 100,
"totalPages": 10
}
}
`
Single Item Endpoints
`json
{
"success": true,
"data": {...}
}
`
---
Rate Limiting
- Window: 15 minutes
- Limit: 100 requests per IP address per window
- Response includes 429 Too Many Requests
when rate limit is exceeded
---
Error Responses
| Status Code | Description |
|-------------|-------------|
| 400 | Bad Request - Invalid parameters |
| 404 | Not Found - Resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Error Response Format
`json
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
`
---
Examples
List Posts
`bash
curl "https://blog.nexwinds.com/api/public/posts?blogId=1&page=1&limit=10"
`
Get Post by Slug
`bash
curl "https://blog.nexwinds.com/api/public/posts?blogId=1&slug=my-first-post"
`
List Categories
`bash
curl "https://blog.nexwinds.com/api/public/categories?blogId=1&locale=en"
`
Get Author
`bash
curl "https://blog.nexwinds.com/api/public/authors/1"
``
Implementation Prompt
# NEXBLOG API - Implementation Prompt Use this prompt to implement a blog listing page at `/blog`: ``` Implement a blog listing page at '/blog' that fetches and displays published posts using the NEXBLOG API documentation at /docs. Key requirements: - Use the API endpoint GET /public/posts (list) and GET /public/posts?id=<id> or ?slug=<slug> (single post) - All endpoints require blogId parameter (use blogId=1 for testing) - Support pagination, locale switching (en, pt, es, fr), and filtering by categoryId/tagId - Display post title, excerpt, featured image, author, category, tags, and published date - Create a single post view page at /blog/[slug] - Render post content as HTML (use dangerouslySetInnerHTML with caution) - Maintain existing UI theme and components from the app - No additional packages; use fetch for API calls ```