Unique identifier for the post
GET
/postsList Posts
Retrieve a paginated list of all blog posts with optional filtering by author, status, and publication date
Overview
Returns a list of all blog posts. Supports filtering by user ID and pagination.
Query Parameters
Query Parameters
userIdFilter posts by a specific user ID
_limitMaximum number of posts to return
_startNumber of posts to skip for pagination
Response
Returns an array of post objects.
id integeruserId integerID of the user who created the post
title stringTitle of the post
body stringContent of the post
Filtering Examples
Get posts by a specific user
GET /posts?userId=1Paginate results
GET /posts?_start=10&_limit=5curl -X GET "https://jsonplaceholder.typicode.com/posts?_limit=10"const response = await fetch("https://jsonplaceholder.typicode.com/posts?_limit=10");const data = await response.json();console.log(data);import requests
response = requests.get( "https://jsonplaceholder.typicode.com/posts", params={"_limit": 10})print(response.json())[ { "userId": 1, "id": 1, "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita..." }, { "userId": 1, "id": 2, "title": "qui est esse", "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor..." }]Was this page helpful?
Request
curl -X GET "https://jsonplaceholder.typicode.com/posts" \
-H "Content-Type: application/json"const response = await fetch("https://jsonplaceholder.typicode.com/posts", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"https://jsonplaceholder.typicode.com/posts",
headers={'Content-Type':'application/json'},
)
print(response.json())package main
import (
"fmt"
"net/http"
"io"
)
func main() {
req, _ := http.NewRequest("GET", "https://jsonplaceholder.typicode.com/posts", nil)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Response
Send a request to see the response
Headers
Response