{ JSON : Placeholder }

Fake Online REST API for Testing and Prototyping
Serving ~200 millions API requests per month

Powered by JSON Server and LowDB

Sponsors 🙏

[Become a sponsor]

Intro

JSONPlaceholder is a free online REST service that you can use whenever you need some fake data.
It's great for tutorials, testing new libraries, sharing code examples, ...

Example

Run this code in a console or from anywhere

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

Awesome 👍

Tip you can use http or https when making requests to JSONPlaceholder.

Resources

JSONPlaceholder comes with a set of common resources.

/posts 100 posts
/comments 500 comments
/albums 100 albums
/photos 5000 photos
/todos 200 todos
/users 10 users

Note resources have relations. For example: posts have many comments, albums have many photos, ...

Routes

All HTTP methods are supported.

GET /posts
GET /posts/1
GET /posts/1/comments
GET /comments?postId=1
GET /posts?userId=1
POST /posts
PUT /posts/1
PATCH /posts/1
DELETE /posts/1

Note you can view detailed examples here

Use your own data

JSON Server powers this website. You can use it to create the same fake API in less than 30 seconds with your own data.

npm install json-server

You can also try My JSON Server free service.