Public API.

Public APIs you can use freely. No authentication required.

Base URL

Endpoints

GET/api/blogs

Get paginated list of blog posts

Parameters

pagenumber(optional)Page number (default: 1)
tagstring(optional)Filter by tag
yearstring(optional)Filter by year
searchstring(optional)Search by title, excerpt, tags

Examples

/api/blogsGet all posts (first page)
/api/blogs?page=2Get page 2
/api/blogs?tag=ReactFilter posts by React tag
/api/blogs?year=2024Filter posts by year 2024
/api/blogs?search=hooksSearch posts containing "hooks"
/api/blogs?tag=React&year=2024&page=1Combine multiple filters

Response

{
  "data": [
    {
      "slug": "react-hooks-first-look",
      "title": { "vi": "...", "en": "..." },
      "excerpt": { "vi": "...", "en": "..." },
      "date": "2018-11-15",
      "readTime": 8,
      "tags": ["React", "Hooks"]
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 3,
    "total": 10,
    "totalPages": 4,
    "hasMore": true
  }
}
> try it
GET/api/blogs/:slug

Get a single blog post by slug

Examples

/api/blogs/react-hooks-first-lookGet post detail by slug

Response

{
  "data": {
    "slug": "react-hooks-first-look",
    "title": { "vi": "...", "en": "..." },
    "excerpt": { "vi": "...", "en": "..." },
    "date": "2018-11-15",
    "readTime": 8,
    "tags": ["React", "Hooks"],
    "content": { "vi": ["..."], "en": ["..."] }
  }
}
> try it

Terminal.

Type a command and press Enter. Try 'help' to see available commands.

~/api-docs
$