Mock Data API Documentation
The Mock Data API allows developers to generate realistic random data from a JSON Schema. Each request returns a share link that can be used directly in your frontend applications to fetch consistent mock data for prototyping or testing.
Quick Start
Get started in seconds with our simple REST API. No authentication required for testing.
/mock-api/generate
Generates random data from a JSON schema and returns a share link with a preview of the generated records.
https://jsontoall-tools.vercel.app/mock-api/generate
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
jsonSchema | object | Yes | The schema definition. Keys are field names, values are generators. |
records | integer | No | Number of records to generate. Default: 1 |
Request Example
curl -X POST https://jsontoall-tools.vercel.app/mock-api/generate \
-H "Content-Type: application/json" \
-d '{
"jsonSchema": {
"id": "uuid",
"firstName": "firstName",
"lastName": "lastName",
"email": "email",
"phone": "phone",
"company": "company",
"price": "price",
"createdAt": "date"
},
"records": 2
}'
200 Success Response
{
"apiUrl": "/mock-api/share/3d08bb76-0041-44dd-95bb-a19e9c173b29",
"preview": [
{
"id": "24059a6d-4370-4ea3-95fa-c89c1c4a289b",
"firstName": "Cody",
"lastName": "Abernathy",
"email": "Sterling_Crona-Will@
yahoo.com",
"phone": "(335) 730-3808 x778",
"company": "Koepp, Hagenes and Stroman",
"price": "583.77",
"createdAt": "2025-12-21T20:06:46.652Z"
}
]
}
/mock-api/share/:shareId
Retrieves the previously generated mock data using the share ID. This endpoint is ideal for embedding directly in your frontend application.
https://jsontoall-tools.vercel.app/mock-api/share/:shareId
URL Parameters
| Field | Type | Required | Description |
|---|---|---|---|
shareId | string | Yes | The ID returned in apiUrl from POST /generate |
Request Example
curl -X GET https://jsontoall-tools.vercel.app/mock-api/share/d6e6e81c-59f4-4b4f-a464-68e253a85328200 Success Response
{
"status": "success",
"data": [
{
"id": "24059a6d-4370-4ea3-95fa-c89c1c4a289b",
"firstName": "Cody",
"lastName": "Abernathy",
"email": "Sterling_Crona-Will@yahoo.com",
"phone": "(335) 730-3808 x778",
"company": "Koepp, Hagenes and Stroman",
"price": "583.77",
"createdAt": "2025-12-21T20:06:46.652Z"
}
]
}Error Responses
400 Bad Request
{
"status": "error",
"message": "Invalid schema format"
}
404 Not Found
{
"status": "error",
"message": "Share ID not found"
}
Supported Schema Properties
Use the following property keys in jsonSchema. Each key maps to a generator powered by faker.js.
Identity / User
| Property | Type | Example | Notes |
|---|---|---|---|
firstName | string | Sourav | Random first name |
lastName | string | Halder | Random last name |
middleName | string | James | Random middle name |
fullName | string | John James Doe | Full name (first + middle + last) |
gender | string | Male | Returns "male" or "female" |
jobTitle | string | Software Engineer | Random professional title |
jobType | string | Full-time | Job type (Full-time, Contract, etc.) |
bio | string | Passionate developer... | Short biography text |
Address / Location
| Property | Type | Example | Notes |
|---|---|---|---|
street | string | 42 Street | Street address |
secondaryAddress | string | Apt. 12BDX | Apartment, suite, etc. |
buildingNumber | string | 221B | Building/house number |
city | string | Kolkata | Random city name |
state | string | West Bengal | Full state/region name |
stateAbbr | string | WB | Abbreviated state code |
country | string | India | Random country |
countryCode | string | IN | ISO 2-letter country code |
zip | string | 700001 | Postal/ZIP code |
coordinates | object | { lat: -57.67, lng: 153.38 } | Lat/lng coordinates |
timezone | string | Asia/Kolkata | IANA timezone string |
Commerce / Business
| Property | Type | Example | Notes |
|---|---|---|---|
product | string | Shoes | Simple product type |
productName | string | Ergonomic Wooden Chair | Full product name |
productDescription | string | Stylish chair with comfort | Marketing description |
department | string | Electronics | Commerce department |
price | string | 199.99 | Random price |
currency | string | USD | ISO 4217 currency code |
company | string | Globex Corporation | Company name |
catchPhrase | string | Empowering next-gen solutions | Company catch phrase |
Tech / Internet
| Property | Type | Example | Notes |
|---|---|---|---|
email | string | john.doe@ example.com | Valid-looking email |
username | string | johndoe92 | Random username |
password | string | passW0rd! | Random password |
url | string | https://example.com | Random URL |
domain | string | example.org | Domain name |
ip | string | 192.168.1.10 | IPv4 address |
ipv6 | string | 2001:0db8:85a3... | IPv6 address |
mac | string | 00:1B:44:11:3A:B7 | MAC address |
Date & Time
| Property | Type | Example | Notes |
|---|---|---|---|
date | string (ISO) | 2025-08-20T14:32:00.000Z | Random date-time |
pastDate | string (ISO) | 2021-05-14T09:22:00.000Z | Date in the past |
futureDate | string (ISO) | 2026-03-02T18:45:00.000Z | Date in the future |
recentDate | string (ISO) | 2025-08-18T07:12:00.000Z | Recent past date |
birthdate | string (ISO) | 1993-04-25T00:00:00.000Z | Plausible birthdate |
month | string | August | Month name |
weekday | string | Wednesday | Day of the week |
Text / Content
| Property | Type | Example | Notes |
|---|---|---|---|
word | string | innovation | Single random word |
words | string | creative smart design | Multiple random words |
sentence | string | The quick brown fox jumps. | Single sentence |
paragraph | string | Lorem ipsum dolor sit amet... | Single paragraph |
slug | string | creative-design-ideas | URL-friendly slug |
System / Misc
| Property | Type | Example | Notes |
|---|---|---|---|
uuid | string | 7c9e6679-7425-40de... | UUID v4 |
nanoid | string | V1StGXR8_Z5jdHi6B-myT | NanoID string |
fileName | string | document_report.pdf | File name with extension |
mimeType | string | application/json | MIME type |
color | string | orchid | Color name |
hex | string | #ff6347 | Hex color code |
rgb | string | rgb(255, 99, 71) | RGB color string |
Media
| Property | Type | Example | Notes |
|---|---|---|---|
imageUrl | string (URL) | https://loremflickr.com/640/480 | Random image URL |
avatar | string (URL) | https://avatars.github... | Avatar image URL |
abstractImage | string (URL) | https://loremflickr.com/.../abstract | Abstract image URL |
Numbers & Boolean
| Property | Type | Example | Notes |
|---|---|---|---|
number | integer | 42 | Random integer (1-100) |
float | float | 57.34 | Random float (1-100, 2 decimals) |
boolean | boolean | true | Random true or false |
Ready to Start Building?
Start generating realistic mock data for your applications in seconds. No authentication required.