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

Generate the dataset you need.

Change the type, shape, count, and response format. The URL and raw response update with the same parameters you would send to the API.

Request builder

Tune the request without writing payload boilerplate.

GET /sample-data

Live CSV is paused in this demo. The CSV tab shows the same rows as CSV.

3 records

Demo capped at 10 rows here. The API supports up to 10,000 records per request.

3 selected

Any field works with any type. GET /sample-data/fields lists all 101. Unknown names come back empty instead of failing.

Output preview

Inspect the shaped rows, raw response, CSV, and request command.

nameemailphone
Run the request to load live records.
36 schema types
Users, products, invoices, logs, geo, devices, finance, and more.
Batch generation
Seed multiple app surfaces with one request using /generate-batch.
JSON or CSV
Use structured JSON for apps or CSV for scripts, spreadsheets, and fixtures.
EndpointAuthMax recordsBest for
POST /sample-data/generatex-api-key header10,000Production integrations, full control
POST /sample-data/generate-batchx-api-key header1,000 per item x 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 x 10QA workflows, URL-only tooling

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 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

36 schemas, 7 categories.

Pass any schema name as the type parameter. Any of the 101 fields works with any type, so you can mix them freely.

Personal

useremployeecustomeraccount

Business

companystartupvendororganizationlegalEntity

Financial

transactioninvoicecreditCardpaymentfinanceSummarycryptoWallet

Product

productinventoryItemskucatalogItemsubscriptionPlan

Location

addressgeoCoordinatescityProfilezipcodecountryMetadata

Technology

ipAddressdeviceProfilebrowserSessionloginAttemptnetworkActivity

System

surveyResponsesupportTicketeventLogfeedbackfileMetadatalogEntry

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

Endpoints, at a glance.

POST for full control. GET for quick scripts and browser testing. Both support the same core params.
POST/api/v1/sample-data/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/sample-data/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/sample-data/schemas

List schemas

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

GET/api/v1/sample-data/fields

List fields

Returns every field name the fields parameter accepts. Add ?type= to get that schema's default fields instead.

GET/api/v1/sample-data/health

Service health

Returns status, service name, version, and a timestamp.

ParameterTypeRequiredDescription
typestringyesSchema to generate: "user", "product", "transaction", etc. See /api/v1/sample-data/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 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.
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.

Error reference

Structured errors, always.

Every error response includes a plain-English error, validation details, and a metadata.correlationId for tracing.

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/sample-data/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 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.

401Unauthorized

Missing or invalid API key. Send x-api-key or api_key on the public gateway.

500Generation Error

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"
  }
}
Working example

See the Sample Data sample app

An open-source single-page app that calls this API from JavaScript, with auth and rendering wired up.

FAQ

API questions developers ask first.

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.

Can I use a field from one type with another type?

Yes. Any field works with any type, so type=vendor with fields=email,stockLevel returns vendor records with just those two fields.

What happens if I request a field that does not exist?

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.

How many records do I get by default?

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.

How do I authenticate 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.

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.