Sample Data API
36 Schema Types
Faker.js · In-Memory
JSON & CSV

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.

36 · schema types10,000 · max records10 · batch requestsJSON + CSV · output formats

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

useremployeecustomeraccount

Business

companystartupvendororganizationlegalEntity

Financial

transactioninvoicecreditCardpaymentfinanceSummarycryptoWallet

Product

productinventoryItemskucatalogItemsubscriptionPlan

Location

addressgeoCoordinatescityProfilezipcodecountryMetadata

Technology

ipAddressdeviceProfilebrowserSessionloginAttemptnetworkActivity

System

surveyResponsesupportTicketeventLogfeedbackfileMetadatalogEntry

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.

POST/api/v1/generate

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.

PRIMARY
POST/api/v1/generate-batch

Batch generate

Submit up to 10 generation requests in one call. Each request specifies its own type, count (max 1,000), and fields.

GET/api/v1/sample-data

Generate via query params

GET-compatible alternative to /generate. Use type, count, fields (comma-separated), and format as query params.

GET/api/v1/sample-data/batch

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.

GET/api/v1/schemas

List schemas

Returns all 36 available schema names with their default field lists — handy for discovery.

GET/health

Service health

Status, version, schema count, and Faker.js version. Root / redirects here.

GET/metrics

Prometheus metrics

Generation counts, processing times, and schema utilization statistics.

ParameterTypeRequiredDescription
typestringyesSchema to generate: "user", "product", "transaction", etc. See /api/v1/schemas for the full list.
countintegernoNumber of records to generate. Default 10. Max 10,000 (single); max 1,000 per item in batch.
fieldsstring / arraynoFields to include. Comma-separated string for GET; JSON array for POST. Defaults to all schema fields.
formatstringno"json" (default) or "csv". CSV includes headers and proper escaping.
requestsarraybatch onlyArray 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.

GET — single generation

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
POST, batch & CSV

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"
}
EndpointAuthMax recordsBest for
POST /generatex-api-key header10,000Production integrations, full control
POST /generate-batchx-api-key header1,000 per item × 10Seeding multiple tables at once
GET /sample-dataapi_key query param10,000Quick scripts, browser, curl
GET /sample-data/batchapi_key query param1,000 per item × 10QA workflows, URL-only tooling

Error reference

Structured errors, always.

Every error response includes a correlationId and a plain-English error message.

400Missing Type

Required type parameter not provided. Include ?type=user or "type": "user" in the POST body.

400Invalid Schema Type

Schema name not recognized. Call GET /api/v1/schemas to see the full list of 36 valid types.

400Invalid Count

Count is out of range. Single: 1–10,000. Batch items: 1–1,000 each.

400Invalid Fields

One or more field names don't exist in the requested schema. Unrecognized fields are ignored by some tiers.

400Invalid Format

Format must be exactly "json" or "csv". Any other value returns a 400.

400Batch Limit Exceeded

More than 10 requests in a single batch call. Split into multiple requests.

400Invalid JSON (GET batch)

The requests param for GET /sample-data/batch must be a valid URL-encoded JSON array.

422Invalid Fields

Field names valid in format but not available for the given schema type.

500Generation Error

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.