Fake JSON API

Access fake APIs with dummy data ๐ŸŽญ

Create Your Own Fake JSON API

The editor below allows you to create a fake JSON API with your own fake data. Scroll down for ready-to-use examples of different fake APIs.

Free API Editor

If you want to create a simple API for testing purposes, simply enter a response body below and press Create API to get your custom API URL.

mocki logo

Use Mocki to create a fully fledged mock API. Sign up for a 7-day free trial and get:

  • Multiple API endpoints
  • Monitoring dashboard
  • Simulated errors and delays
  • Generated test data
Sign Up (Free Trial)

Jan, Architect

Mocki is a great tool for creating and designing REST APIs for data ingestion

Oskar, CTO

We use Mocki for simulating API responses in our enterprise OAuth service

Joshua, Developer

When testing how our apps handle different API responses, Mocki is a key tool.

Ready to Use Fake APIs

Below we have created APIs that serve test data for you to use. We created them with the form above. If you want to create your own API instead of using ours, feel free!

Users

Users are one of the most fundamental components for a lot of apps. Therefore we will start out by using some endpoints providing a fake JSON API for users.

List users

A simple list of users. Call the endpoint we have prepared below to get started.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

To test the request you can open you terminal and use cURL. You will receive you fake JSON data back as a list of users shown below.

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

Response:

[
  {
    "name": "Harry Potter",
    "city": "London"
  },
  {
    "name": "Don Quixote",
    "city": "Madrid"
  },
  {
    "name": "Joan of Arc",
    "city": "Paris"
  },
  {
    "name": "Rosa Park",
    "city": "Alabama"
  }
]

Get user

If you want to simulate a detail request for a single user you can create another endpoint in the form above. Or just use the one we have provided below.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

Response:

{
   "name": "Rosa Parks",
   "city": "Alabama"
}

To Dos

Many tutorials and getting started guides consist of to do apps. Below we provide you with endpoints serving fake to do JSON data. You can use these APIs for building your own to do app or simply while learning a new programming language.

List To Dos

This list endpoint returns three TODOs as response.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

Response:

[
   {
      "title": "Clean the kitchen",
      "description": "Mop the floor, wipe the countertop and don't forget to take out the trash!"
   },
   {
      "title": "Call Mom",
      "description": "It's her birthday!"
   },
   {
      "title": "Water flowers",
      "description": "They need water, or they will die."
   }
]

Get To Do Details

This endpoint returns the details of a single to do item.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

Response:

{
   "title": "Clean the kitchen",
   "description": "Mop the floor, wipe the countertop and don't forget to take out the trash!"
}

Create Your Own Fake API

If you want to create your own fake API with multiple endpoints, dynamic responses and more advanced features, you can use Mocki. We created the tool to make development and testing APIs a lot easier.

If you for example wanted to mock the endpoints provided above in a single API, it would require the following endpoints:

 https://mocki.io/v1/users
 https://mocki.io/v1/users/{id}
 https://mocki.io/v1/todos
 https://mocki.io/v1/todos/{id}

When using Mocki you can do this by using our API editor. It lets you select response code and data to return for each endpoint. You can also create conditions for serving dynamic responses, simulated delays and errors.

Editor

Testing Using a Fake API

Developing a fake API can be useful for testing purposes as well. Let us say you have two different systems communicating. When developing one of the systems locally you might not be able to start and run the other system on your developer machine. This is where a fake JSON API can come in handy. You could point all calls to the second system over to your fake API instead. If the fake API returns the expected JSON responses, you can make sure that the functionality of the system we develop locally is doing what it is supposed to do.

Version Control Your API

Version control is fundamental in all development processes. It makes it easy to track changes in your code and if need be revert to previous versions. This can also be applied on your mock configuration. A Mocki API can be defined using a configuration file that you can put inside a Git repository. When you make changes to the API configuration, Mocki will update it automatically.

Conclusion

Using our ready made fake APIs you can build your own applications while learning a new language. You can also create your own APIs with custom data both using our free tool and the more advanced Mocki editor.

Testing external dependencies can be made easier using a fake API to simulate responses and enabling development without the external service actually being up and running.

Version controlling your API is made easy using Mocki. Simply put your configuration file inside a GitHub repository and Mocki will update it on the fly when you push changes.

Do you have any ideas or requests on fake data you would like to see on this page? Reach out to us through the chat!