Skip to main content

Overview

Welcome!

JSONPlaceholder is a free online REST API that you can use for testing and prototyping.
It provides fake endpoints for common resources such as posts, comments, users, todos, and more.

Base URL


[https://jsonplaceholder.typicode.com](https://jsonplaceholder.typicode.com)

Resources

Here are the main resources you can interact with:

ResourceEndpointDescription
Posts/postsBlog posts with title and body.
Comments/commentsComments tied to posts.
Albums/albumsCollections of photos.
Photos/photosPhotos inside albums.
Todos/todosTo-do tasks with completion state.
Users/usersUser profiles with details.

How to Use

fetch('https://jsonplaceholder.typicode.com/posts/1')
.then(response => response.json())
.then(json => console.log(json))

Example Response

{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum..."
}