Free API to Create Fake JSON Data for Testing

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




FakeJSON is a free API to create fake JSON data for testing. This is a freemium API that allows you to generate a fake JSON data with custom field types. Using this API, you can create JSON data about names, locations, phone numbers, random string, color, filename, currency, person, commerce, function, integers, and many others. You just have to make a request to the server by specifying what fields you want. In addition to that, you will need a unique access token that this websites will give after creating an account. And to make requests to this API, you can use cURL or code snippets in various programming languages that it gives you.

If you are an application developer then you surely have to test it. And the best way to test application is via fake data. Since creating fake data manually will take a lot of time, so you can use a free service to do that for you. And FakeJSON lets you do that. You just have to make simple API requests and get the data in fraction of a second. However, in the free plan, there are some limits. In free plan, you only get 1000 fake units per day. And in the data, you can have maximum of 10 array elements.

Free API to Create Fake JSON Data for Testing

Using this Free API to Create Fake JSON Data for Testing:

FakeJSON is a very nice tool for application and web developers to test their applications. You can generate fake data about a lot of entities and then use that as test input for your applications. And you can use it easily on any platform right from the command line. Also, there is detailed documentation on the website that you can use to see how it works.

Here is how to use this website to create fake JSON data for testing.

Step 1: Go to the homepage of FakeJSON and then sign up for a free account. After that, it will give you an access token that you will have to use while making the API requests.

Step 2: Now, you can either use cURL or a code snippet to make requests. I have some issues with cURL so I will be using a Python code snippet to make the request. But the Python code requires a library called “requests” to be installed before executing it. And you can install it by running “pip install requests” command.

Pip install requests

import requests
body = {
'token': 'YourAPIKey',
'data': {
'numberInt': 'numberInt',
'numberFloat': 'numberFloat',
'numberBool': 'numberBool'
}}
r = requests.post('https://app.fakejson.com/q', json = body)
print r.text

python code snippet to make API calls for fake JSON

Step 3: Give your file a name and then execute it. After that, you will see the response in the terminal or command prompt window. You can see the screenshot below.

Python code to make API calls to get the fake data

In this way, you can use this free API to create fake JSON data for testing. And for that, you just have to make simple API calls. And also there are some other code snippets given on the website that you can use to generate fake JSON data about various entities.

Final thoughts

FakeJSON is a very nice tool to test applications with fake JSON data. You can generate a fake JSON data by running simple commands or code snippets. So, if you are looking for a way to generate fake JSON data, then you can try this API by yourself and do let me know what you think about it.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer