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.

No API Key Instant Setup Faker.js Powered
POST

/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

FieldTypeRequiredDescription
jsonSchemaobjectYesThe schema definition. Keys are field names, values are generators.
recordsintegerNoNumber of records to generate. Default: 1

Request Example

cURL
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

JSON 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"
    }
  ]
}
GET

/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

FieldTypeRequiredDescription
shareIdstringYesThe ID returned in apiUrl from POST /generate

Request Example

cURL
curl -X GET https://jsontoall-tools.vercel.app/mock-api/share/d6e6e81c-59f4-4b4f-a464-68e253a85328

200 Success Response

JSON 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

PropertyTypeExampleNotes
firstNamestringSouravRandom first name
lastNamestringHalderRandom last name
middleNamestringJamesRandom middle name
fullNamestringJohn James DoeFull name (first + middle + last)
genderstringMaleReturns "male" or "female"
jobTitlestringSoftware EngineerRandom professional title
jobTypestringFull-timeJob type (Full-time, Contract, etc.)
biostringPassionate developer...Short biography text

Address / Location

PropertyTypeExampleNotes
streetstring42 StreetStreet address
secondaryAddressstringApt. 12BDXApartment, suite, etc.
buildingNumberstring221BBuilding/house number
citystringKolkataRandom city name
statestringWest BengalFull state/region name
stateAbbrstringWBAbbreviated state code
countrystringIndiaRandom country
countryCodestringINISO 2-letter country code
zipstring700001Postal/ZIP code
coordinatesobject{ lat: -57.67, lng: 153.38 } Lat/lng coordinates
timezonestringAsia/KolkataIANA timezone string

Commerce / Business

PropertyTypeExampleNotes
productstringShoesSimple product type
productNamestringErgonomic Wooden ChairFull product name
productDescriptionstringStylish chair with comfortMarketing description
departmentstringElectronicsCommerce department
pricestring199.99Random price
currencystringUSDISO 4217 currency code
companystringGlobex CorporationCompany name
catchPhrasestringEmpowering next-gen solutionsCompany catch phrase

Tech / Internet

PropertyTypeExampleNotes
emailstringjohn.doe@ example.comValid-looking email
usernamestringjohndoe92Random username
passwordstringpassW0rd!Random password
urlstringhttps://example.comRandom URL
domainstringexample.orgDomain name
ipstring192.168.1.10IPv4 address
ipv6string2001:0db8:85a3...IPv6 address
macstring00:1B:44:11:3A:B7MAC address

Date & Time

PropertyTypeExampleNotes
datestring (ISO)2025-08-20T14:32:00.000ZRandom date-time
pastDatestring (ISO)2021-05-14T09:22:00.000ZDate in the past
futureDatestring (ISO)2026-03-02T18:45:00.000ZDate in the future
recentDatestring (ISO)2025-08-18T07:12:00.000ZRecent past date
birthdatestring (ISO)1993-04-25T00:00:00.000ZPlausible birthdate
monthstringAugustMonth name
weekdaystringWednesdayDay of the week

Text / Content

PropertyTypeExampleNotes
wordstringinnovationSingle random word
wordsstringcreative smart designMultiple random words
sentencestringThe quick brown fox jumps.Single sentence
paragraphstringLorem ipsum dolor sit amet...Single paragraph
slugstringcreative-design-ideasURL-friendly slug

System / Misc

PropertyTypeExampleNotes
uuidstring7c9e6679-7425-40de...UUID v4
nanoidstringV1StGXR8_Z5jdHi6B-myTNanoID string
fileNamestringdocument_report.pdfFile name with extension
mimeTypestringapplication/jsonMIME type
colorstringorchidColor name
hexstring#ff6347Hex color code
rgbstringrgb(255, 99, 71)RGB color string

Media

PropertyTypeExampleNotes
imageUrlstring (URL)https://loremflickr.com/640/480Random image URL
avatarstring (URL)https://avatars.github...Avatar image URL
abstractImagestring (URL)https://loremflickr.com/.../abstractAbstract image URL

Numbers & Boolean

PropertyTypeExampleNotes
numberinteger42Random integer (1-100)
floatfloat57.34Random float (1-100, 2 decimals)
booleanbooleantrueRandom true or false

Ready to Start Building?

Start generating realistic mock data for your applications in seconds. No authentication required.

Built with ❤️ by the JSONToAll team

Powered by faker.js • No authentication required • Free to use