Realistic mock data. Instantly.
One endpoint, 36 schema types. Generate users, products, invoices, logs, and more with optional field selection and CSV export — all in-memory, no persistence.
Why Sample Data API
Everything your tests need.
Instant generation
Fully in-memory using Faker.js — no cold starts, no file writes. Results are returned in a single fast response.
36 schema types
Personal data, business, financial, product, location, tech, and system schemas — covering the surfaces most apps need to test.
JSON & CSV export
Return structured JSON by default or set format=csv to get a properly headered, escaped CSV string — ready to download.
Field selection
Pick exactly the fields you need via the fields param. For GET: comma-separated. For POST: JSON array. Unrecognized fields are ignored.
Batch processing
Generate up to 10 different datasets in a single request. Each item can target a different schema type, count, and field list.
Safe by design
No uploads, no local file saves, no external API calls. Pure generation — great for internal tooling and public-facing APIs alike.
GET /api/v1/schemas
36 schemas, 7 categories.
Pass any schema name as the type parameter. Combine with fields to get exactly what you need.
Personal
Business
Financial
Product
Location
Technology
System
Example — list all schemas
GET https://datpaq.com/api/v1/schemas?api_key=YOUR_API_KEY
/api/v1/sample-data
Endpoints, at a glance.
POST for full control. GET for quick scripts and browser testing. Both support the same core params.
Generate sample data
Full-featured generation via JSON body. Supports type, count (up to 10,000), fields array, and format. Recommended over the GET variant.
Batch generate
Submit up to 10 generation requests in one call. Each request specifies its own type, count (max 1,000), and fields.
Generate via query params
GET-compatible alternative to /generate. Use type, count, fields (comma-separated), and format as query params.
Batch via query params
GET batch endpoint. Pass a JSON-encoded requests array as a URL-encoded query param. Fully compatible with query-string auth.
List schemas
Returns all 36 available schema names with their default field lists — handy for discovery.
Service health
Status, version, schema count, and Faker.js version. Root / redirects here.
Prometheus metrics
Generation counts, processing times, and schema utilization statistics.
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | yes | Schema to generate: "user", "product", "transaction", etc. See /api/v1/schemas for the full list. |
| count | integer | no | Number of records to generate. Default 10. Max 10,000 (single); max 1,000 per item in batch. |
| fields | string / array | no | Fields to include. Comma-separated string for GET; JSON array for POST. Defaults to all schema fields. |
| format | string | no | "json" (default) or "csv". CSV includes headers and proper escaping. |
| requests | array | batch only | Array of up to 10 generation objects, each with type, count, and fields. POST: JSON body. GET: URL-encoded JSON. |
Requests & responses.
GET for quick queries. POST for full control. Both return the same response shape.
Query params for simple scripts and browser testing.
GET https://datpaq.com/api/v1/sample-data?api_key=YOUR_API_KEY&type=user&count=3&fields=name,email,phone
Full body control, multi-dataset batches, and CSV export.
POST https://datpaq.com/api/v1/generate
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"type": "product",
"count": 5,
"fields": ["name", "price", "category", "sku"],
"format": "json"
}| Endpoint | Auth | Max records | Best for |
|---|---|---|---|
| POST /generate | x-api-key header | 10,000 | Production integrations, full control |
| POST /generate-batch | x-api-key header | 1,000 per item × 10 | Seeding multiple tables at once |
| GET /sample-data | api_key query param | 10,000 | Quick scripts, browser, curl |
| GET /sample-data/batch | api_key query param | 1,000 per item × 10 | QA workflows, URL-only tooling |
Error reference
Structured errors, always.
Every error response includes a correlationId and a plain-English error message.
Required type parameter not provided. Include ?type=user or "type": "user" in the POST body.
Schema name not recognized. Call GET /api/v1/schemas to see the full list of 36 valid types.
Count is out of range. Single: 1–10,000. Batch items: 1–1,000 each.
One or more field names don't exist in the requested schema. Unrecognized fields are ignored by some tiers.
Format must be exactly "json" or "csv". Any other value returns a 400.
More than 10 requests in a single batch call. Split into multiple requests.
The requests param for GET /sample-data/batch must be a valid URL-encoded JSON array.
Field names valid in format but not available for the given schema type.
Internal Faker.js generation failure. The correlationId in the response helps trace the issue.
Example error response
{
"success": false,
"error": "Invalid schema type. Available types: user, company, product...",
"correlationId": "req_stu901vwx234",
"timestamp": "2026-04-06T00:00:00.000Z"
}Seed your dev environment in seconds.
Pick a schema, set a count, add your fields — get realistic JSON or CSV instantly. No setup, no persistence, no cleanup required.