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..."
}

Notes

Limitations
  • All data is fake (not persistent).
  • POST, PUT, PATCH, DELETE requests won’t actually change data (they simulate success).
  • Great for mocking APIs in front-end apps.

Use Cases

  • Testing API integrations.
  • Learning REST API basics.
  • Prototyping apps before real backend is ready.
  • Mocking data in UI components.
success

Now you’re ready to start making requests to JSONPlaceholder!