# Random Data Generator API

> Random Data Generator is a random data API that produces random numbers in any range (whole or decimal, with or without repeats), dice of any size, coin flips, booleans, random strings, UUIDs, and mock names, emails, addresses and dates for application testing. Numbers, dice, coins, booleans and strings come from a cryptographically secure generator. Paid plans can generate batches up to 100 items.

**Endpoint:** `GET https://api.apiverve.com/v1/randomgenerator`  
**Category:** Data Generation  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/randomgenerator

## Overview

A random data API and random number generator API in one: pick a type and get JSON test data back. There are fourteen types: number, dice, coin, boolean, string, uuid, guid, color, phone, name, email, username, address and date. Numbers, dice, coins, booleans and strings come from a cryptographically secure generator, with min, max, decimals and unique (no repeats) for numbers, sides for dice, and length and charset for strings. Names, emails, usernames, phone numbers, addresses and dates are realistic fake values for seeding test databases and mock APIs; they don't belong to real people. Phone numbers are valid US numbers in national format with no extension, and each address pairs its state with a ZIP code from that state's range, so both pass form validation. The Free plan returns one value per call; paid plans return up to 100 at a time and can attach an AI-generated face to each name.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/randomgenerator?type=phone&count=10&includeAvatar=true&min=1&max=100&decimals=2&unique=true&sides=20&length=16&charset=alphanumeric" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | No | The type of random data to generate. default number. One of: number, dice, phone, date, coin, uuid, guid, color, name, email, username, address, string, boolean |
| `count` | integer | No | The number of random data to generate (1 to 100). default 1. range 1-100. Premium field |
| `includeAvatar` | boolean | No | Include an AI-generated face avatar (only applies when type=name). default false. Premium field |
| `min` | number | No | Smallest number to draw, inclusive (type=number). Defaults to 0. default 0 |
| `max` | number | No | Largest number to draw, inclusive (type=number). Defaults to 999999. default 999999 |
| `decimals` | integer | No | Decimal places for type=number (0 to 10); 0 draws whole numbers. default 0. range 0-10 |
| `unique` | boolean | No | Draw without repeats (type=number with whole numbers, or type=dice). default false |
| `sides` | integer | No | Number of sides on each die for type=dice (2 to 1000). default 6. range 2-1000 |
| `length` | integer | No | Length of each value for type=string (1 to 256). default 16. range 1-256 |
| `charset` | string | No | Characters for type=string. default alphanumeric. One of: alphanumeric, alpha, numeric, hex, lowercase, uppercase |

## Response fields

- `type` — string · The kind of random data generated (e.g. phone, name, email)
- `count` — number · Number of random values generated
- `data` — array · The generated random values; item shape depends on the requested type

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "type": "phone",
    "count": 10,
    "data": [
      "967-950-4587",
      "792-611-7468 x1293",
      "(933) 311-9829",
      "389.357.7403 x793",
      "1-621-490-6394",
      "1-699-562-6833 x8558",
      "875.226.1530 x641",
      "744-991-0150 x1974",
      "1-393-784-0533 x15199",
      "954-876-6958 x0398"
    ]
  }
}
```

## Use cases

- **Database Seeding** — Populate staging tables with synthetic names, addresses, and phone numbers before running integration tests against newly deployed schemas.
- **UI Prototype Mocking** — Front-end developers render placeholder user profiles with generated usernames, emails, and color names while building interface layouts.
- **Unique Key Generation** — When verifying record deduplication pipelines, QA engineers inject generated UUIDs and timestamps into intake streams.
- **Game Mechanics Simulation** — To test random drop rates and turn orders, game creators draw coin flips and dice rolls directly into prototype loops.

## SDKs

- **npm** — `npm install @apiverve/randomgenerator` (https://www.npmjs.com/package/@apiverve/randomgenerator)
- **NuGet** — `dotnet add package APIVerve.API.RandomDataGenerator` (https://www.nuget.org/packages/APIVerve.API.RandomDataGenerator)
- **Source** — https://github.com/apiverve/randomgenerator-api

## More

- Full reference: https://docs.apiverve.com/ref/randomgenerator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
