Which fields can I request?
Any of the 101 field names listed by GET /api/v1/sample-data/fields. Add ?type=user (or any type) to get that type's default fields instead.
One endpoint, 36 schema types. Generate users, products, invoices, logs, and more with optional field selection and CSV export. All in-memory, no persistence.
Change the type, shape, count, and response format. The URL and raw response update with the same parameters you would send to the API.
Tune the request without writing payload boilerplate.
Live CSV is paused in this demo. The CSV tab shows the same rows as CSV.
Demo capped at 10 rows here. The API supports up to 10,000 records per request.
Any field works with any type. GET /sample-data/fields lists all 101. Unknown names come back empty instead of failing.
Inspect the shaped rows, raw response, CSV, and request command.
| name | phone | |
|---|---|---|
| Run the request to load live records. | ||
| Endpoint | Auth | Max records | Best for |
|---|---|---|---|
| POST /sample-data/generate | x-api-key header | 10,000 | Production integrations, full control |
| POST /sample-data/generate-batch | x-api-key header | 1,000 per item x 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 x 10 | QA workflows, URL-only tooling |
Why Sample Data API
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 the fields you need: comma-separated for GET, a JSON array for POST. Any field works with any type; GET /sample-data/fields lists them all. Unknown fields are dropped.
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/sample-data/schemas
Pass any schema name as the type parameter. Any of the 101 fields works with any type, so you can mix them freely.
Personal
Business
Financial
Product
Location
Technology
System
Discover types and fields
# Every type with its default fields GET https://datpaq.com/api/v1/sample-data/schemas?api_key=YOUR_API_KEY # Every field name the fields parameter accepts GET https://datpaq.com/api/v1/sample-data/fields?api_key=YOUR_API_KEY # One type's default fields GET https://datpaq.com/api/v1/sample-data/fields?type=vendor&api_key=YOUR_API_KEY
Unknown field names are dropped rather than rejected. A request with only unknown fields returns empty {} records, so check spelling against /fields.
/api/v1/sample-data
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.
List fields
Returns every field name the fields parameter accepts. Add ?type= to get that schema's default fields instead.
Service health
Returns status, service name, version, and a timestamp.
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | yes | Schema to generate: "user", "product", "transaction", etc. See /api/v1/sample-data/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 the type's fields. Any field works with any type; see /api/v1/sample-data/fields for the full list. Unknown fields are dropped, so a request with only unknown fields returns empty {} records. |
| 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. |
Error reference
Every error response includes a plain-English error, validation details, and a metadata.correlationId for tracing.
Required type parameter not provided. Include ?type=user or "type": "user" in the POST body.
Schema name not recognized. Call GET /api/v1/sample-data/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.
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.
Missing or invalid API key. Send x-api-key or api_key on the public gateway.
Internal Faker.js generation failure. The correlationId in the response helps trace the issue.
Example error response
{
"success": false,
"error": "Invalid input parameters",
"details": [
"\"type\" must be one of [user, employee, customer, ...]"
],
"metadata": {
"correlationId": "req-1792504902711-eaagje9om",
"timestamp": "2026-04-06T00:00:00.000Z"
}
}FAQ
Any of the 101 field names listed by GET /api/v1/sample-data/fields. Add ?type=user (or any type) to get that type's default fields instead.
Yes. Any field works with any type, so type=vendor with fields=email,stockLevel returns vendor records with just those two fields.
Unknown field names are dropped, not rejected. If every requested field is unknown, each record comes back as an empty {} object, so check names against /fields.
10. Set count from 1 to 10,000 for a single request, or 1 to 1,000 per item in a batch of up to 10 requests.
Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.
Pick a schema, set a count, add your fields - get realistic JSON or CSV instantly. No setup, no persistence, no cleanup required.