Overview

Mockaroo lets you generate realistic fake datasets in JSON, CSV, SQL, or XML with fully customizable schemas. You define field names and types (name, email, phone, etc.) and the API returns rows of structured mock data. An API key is required and the free tier allows up to 1,000 rows per request.

Beginner Tip

Design your schema visually on the Mockaroo website first, then copy the generated API URL to use in your code — this is much easier than constructing the schema payload by hand.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

randomly generated data
customizable output format
Mockaroo data via REST API

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "status": "success",
  "data": {
    "result": "Data from Mockaroo",
    "description": "Generate fake data to JSON, CSV, TXT, SQL and XML",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

id Auto-incremented row number (if Row Number type is used)
name Generated name value according to the chosen type (e.g. Full Name)
email Randomly generated email address
phone Generated phone number in the chosen format

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.mockaroo.com/api/generate.json?count=10&key=YOUR_API_KEY";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

401 Unauthorized Missing or invalid API key
Pass your key as the key query parameter: ?key=YOUR_API_KEY
Exceeds row limit Requesting more than 1,000 rows on the free tier
Keep count to 1000 or fewer; upgrade your plan for larger datasets
Invalid field type error Using a field type name that Mockaroo does not recognize
Check the full list of supported field types in the Mockaroo docs before defining your schema

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Test Data
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →