Get All Blogs
The Get All Blogs API endpoint retrieves a paginated list of blog entries from the Jsonpress. It supports filtering by:
- Search terms (e.g., keyword in the blog title or content)
- Blog status such as DRAFT or PUBLISHED.
This endpoint is publicly accessible, but requires a valid API key in the request headers. You can obtain your API key from the Settings → API Key page within your Jsonpress account. Use this POST API to:
- Fetch blogs for listing or display in your frontend
- Review blog content for moderation
1. cURL Example
curl --location 'https://api.jsonpress.in/api/v1/public/blog/get-all',--header 'x-api-key: YOUR_API_KEY',--header 'Content-Type: application/json'--data '{ "limit": 15, "page": 1, "search": "abc", "status": "DRAFT"}'2. Node.js (Axios) Example
const axios = require('axios');let data = JSON.stringify({ "limit": 15, "page": 1, "search": "abc", "status": "DRAFT"});
let config = { method: 'post', maxBodyLength: Infinity, url: 'https://api.jsonpress.in/api/v1/public/blog/get-all', headers: { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, data : data};
axios.request(config).then((response) => { console.log(JSON.stringify(response.data));})
.catch((error) => { console.log(error);});