How to use the JsonExamples API

Last updated 2026-05-20

JsonExamples works with any frontend or backend that needs realistic JSON data — users, products, carts, posts, comments, todos, recipes, quotes, and more. No sign-up, no API key, no rate-limit anxiety for casual use.

The examples below cover the patterns you will hit on almost every endpoint: query params for pagination, simulated network delay, field selection, and authenticated requests.

Intro

  • See if your internet is working.
// Could be GET or POST/PUT/PATCH/DELETE
fetch('//jsonexamples.com/test')
  .then(res => res.json())
  .then(console.log);

/* { status: 'ok', method: 'GET' } */
  • All resources accept limit, skip, and select query params. limit=0 returns every item.
fetch('https://jsonexamples.com/RESOURCE/?limit=10&skip=5&select=key1,key2,key3');

OR — repeated select keys:

fetch('https://jsonexamples.com/RESOURCE/?limit=10&skip=5&select=key1&select=key2&select=key3');
  • Use the delay param to simulate latency. Range: 0–5000 ms.
fetch('https://jsonexamples.com/RESOURCE/?delay=1000');
  • All resources can be accessed via an authentication token to test as a logged-in user.
  • Go to the auth module to generate a token.
/* providing token in bearer */
fetch('https://jsonexamples.com/auth/RESOURCE', {
  method: 'GET', /* or POST/PUT/PATCH/DELETE */
  headers: {
    'Authorization': 'Bearer /* YOUR_TOKEN_HERE */',
    'Content-Type': 'application/json'
  },
})
  .then(res => res.json())
  .then(console.log);