JSON Placeholder API

Why JSON Placeholder

  • Need a placeholder api that can provide fake users, fake posts or fake todo items - JSONPlaceholder has you covered
  • Provides free, fake data via a RESTFUL API
  • Great for developers who want to have some data to develop against so that screens / functionality can be tested outside the null case
  • The endpoints are super easy to use, no auth, no specific need for query parameters
  • Lets you send GET POST PUT PATCH and DELETE requests to emulate getting, editing, deleting data
  • Supports HTTP and HTTPS

Popular Endpoints

Fake Users - /users

 
[{ "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" } }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { "name": "Romaguera-Crona", "catchPhrase": "Multi-layered client-server neural-net", "bs": "harness real-time e-markets" } }, { "id": 2, "name": "Ervin Howell", "username": "Antonette", "email": "Shanna@melissa.tv", "address": { "street": "Victor Plains", "suite": "Suite 879", "city": "Wisokyburgh", "zipcode": "90566-7771", "geo": { "lat": "-43.9509", "lng": "-34.4618" } }, "phone": "010-692-6593 x09125", "website": "anastasia.net", "company": { "name": "Deckow-Crist", "catchPhrase": "Proactive didactic contingency", "bs": "synergize scalable supply-chains" } }]
  • supports the query param id so you could get a specific user by ID eg
    • https://jsonplaceholder.typicode.com/users?id=3 returns the following code
    • [ { "id": 3, "name": "Clementine Bauch", "username": "Samantha", "email": "Nathan@yesenia.net", "address": { "street": "Douglas Extension", "suite": "Suite 847", "city": "McKenziehaven", "zipcode": "59590-4157", "geo": { "lat": "-68.6102", "lng": "-47.0653" } }, "phone": "1-463-123-4447", "website": "ramiro.info", "company": { "name": "Romaguera-Jacobson", "catchPhrase": "Face to face bifurcated interface", "bs": "e-enable strategic applications" } } ]

Try it Out

users

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

id
name
username
email
address
phone
website
company
        
        
        

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Patching / Deleting / Updating

  • In all cases we need to specify the id of the user via a URL param
  • Eg to specify user 3 we use /users/3
  • When changing a record we must include the changes as JSON
    • In the case of updating (PUT) we need to update all the information
    • In the case of patching (PATCH) we need can up date just a single field
  • In the case of delete there is nothing to provide the user will be “deleted”
For example, if we wanted to patch user 3 with a new email and phone number we’d send the following JSON in the body:
{ "email":"newemail@gmail.com", "phone":"111-111-1111" }

Try Patching Out

user patch

Please fill in any necessary fields and click Run.

PATCH

Preview

View the API data, get a live Google Sheet dashboard

id
name
username
email
address.street
address.suite
address.city
address.zipcode
address.geo
phone
website
company.name
company.catchPhrase
company.bs
              
              
              

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Fake Posts - /posts

  • Each post has
    • userId
    • id
    • title
    • body
[ { "userId": 1, "id": 1, "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" }, { "userId": 1, "id": 2, "title": "qui est esse", "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla" }, { "userId": 1, "id": 3, "title": "ea molestias quasi exercitationem repellat qui ipsa sit aut", "body": "et iusto sed quo iure\nvoluptatem occaecati omnis eligendi aut ad\nvoluptatem doloribus vel accusantium quis pariatur\nmolestiae porro eius odio et labore et velit aut" } ]
  • Takes id and userId as query parameters to provide basic filtering (careful params are case sensitive)
[ { "userId": 2, "id": 11, "title": "et ea vero quia laudantium autem", "body": "delectus reiciendis molestiae occaecati non minima eveniet qui voluptatibus\naccusamus in eum beatae sit\nvel qui neque voluptates ut commodi qui incidunt\nut animi commodi" }, { "userId": 2, "id": 12, "title": "in quibusdam tempore odit est dolorem", "body": "itaque id aut magnam\npraesentium quia et ea odit et ea voluptas et\nsapiente quia nihil amet occaecati quia id voluptatem\nincidunt ea est distinctio odio" }, { "userId": 2, "id": 13, "title": "dolorum ut in voluptas mollitia et saepe quo animi", "body": "aut dicta possimus sint mollitia voluptas commodi quo doloremque\niste corrupti reiciendis voluptatem eius rerum\nsit cumque quod eligendi laborum minima\nperferendis recusandae assumenda consectetur porro architecto ipsum ipsam" }, { "userId": 2, "id": 14, "title": "voluptatem eligendi optio", "body": "fuga et accusamus dolorum perferendis illo voluptas\nnon doloremque neque facere\nad qui dolorum molestiae beatae\nsed aut voluptas totam sit illum" }, { "userId": 2, "id": 15, "title": "eveniet quod temporibus", "body": "reprehenderit quos placeat\nvelit minima officia dolores impedit repudiandae molestiae nam\nvoluptas recusandae quis delectus\nofficiis harum fugiat vitae" }, { "userId": 2, "id": 16, "title": "sint suscipit perspiciatis velit dolorum rerum ipsa laboriosam odio", "body": "suscipit nam nisi quo aperiam aut\nasperiores eos fugit maiores voluptatibus quia\nvoluptatem quis ullam qui in alias quia est\nconsequatur magni mollitia accusamus ea nisi voluptate dicta" }, { "userId": 2, "id": 17, "title": "fugit voluptas sed molestias voluptatem provident", "body": "eos voluptas et aut odit natus earum\naspernatur fuga molestiae ullam\ndeserunt ratione qui eos\nqui nihil ratione nemo velit ut aut id quo" }, { "userId": 2, "id": 18, "title": "voluptate et itaque vero tempora molestiae", "body": "eveniet quo quis\nlaborum totam consequatur non dolor\nut et est repudiandae\nest voluptatem vel debitis et magnam" }, { "userId": 2, "id": 19, "title": "adipisci placeat illum aut reiciendis qui", "body": "illum quis cupiditate provident sit magnam\nea sed aut omnis\nveniam maiores ullam consequatur atque\nadipisci quo iste expedita sit quos voluptas" }, { "userId": 2, "id": 20, "title": "doloribus ad provident suscipit at", "body": "qui consequuntur ducimus possimus quisquam amet similique\nsuscipit porro ipsam amet\neos veritatis officiis exercitationem vel fugit aut necessitatibus totam\nomnis rerum consequatur expedita quidem cumque explicabo" } ]

Patching / Deleting / Updating

  • In all cases we need to specify the id of the post via a URL param
  • Eg to specify post 3 we use /posts/3
  • When changing a record we must include the changes as JSON
    • In the case of updating (PUT) we need to update all the information
    • In the case of patching (PATCH) we need can up date just a single field
  • In the case of delete there is nothing to provide the post will be “deleted”

Try It Out

posts

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

userId
id
title
body
    
    
    

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Other Endpoints

Post Comment - /comments

  • Provides the comments for a given post
  • Has a postId id name email and body
  • Comments are by a specific user
  • Works the same as all the other endpoints as described above for users & posts
  • Filter by id or postID

Try It Out

comments

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

postId
id
name
email
body
     
     
     

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Albums - /albums

  • Simple object for an album
  • Has a userId id and title
  • Works the same as all the other endpoints as described above for users & posts
  • Filter by id or userID

Try It Out

albums

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

userId
id
title
   
   
   

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Photos - /photos

  • Provides the photos for a given album
  • Has a albumId title url and thumbnailUrl
  • Works the same as all the other endpoints as described above for users & posts
  • Filter by id or albumID
 

Todos - /todos

  • Provides the photos for a given album
  • Has a userId id title and completed
  • Works the same as all the other endpoints as described above for users & posts
  • Filter by id or userID
 
If you’d like to use the jsonplaceholder api to move data into Google Sheets you can use the SyncWith Google sheets add on. There are other json place holder options for use but we’ve found that best free placeholder api for json is this one.