# UUID Generator (`rl1987/uuid-generator`) Actor

Generate bulk universally unique identifiers (UUID v1, v3, v4, v5, v7) on demand. Export as JSON, CSV, Excel or plain text.

- **URL**: https://apify.com/rl1987/uuid-generator.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / actor invocation

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### What does UUID Generator do?

**UUID Generator** creates **universally unique identifiers (UUIDs)** on demand, in bulk, directly on the Apify platform. It supports **UUID versions 1, 3, 4, 5 and 7** following the [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562) standard (the successor to RFC 4122), so you get spec-compliant identifiers every time — no custom scripts required.

Generate anywhere from a single UUID to **one million in one run**, then download them as **JSON, CSV, Excel, or plain text**, or pull them straight from the [Apify API](https://docs.apify.com/api/v2). Because it runs on Apify, you also get scheduling, integrations (Make, Zapier, n8n, webhooks), and programmatic access out of the box.

### Why use UUID Generator?

- **Stop reinventing UUID scripts.** Reusable, hosted, and callable from any language via the API.
- **Seed test data and databases.** Generate primary keys, fixtures, and mock records for QA and load testing.
- **Build microservices and distributed systems.** Produce correlation IDs, request IDs, and entity keys at scale.
- **Deterministic IDs when you need them.** Versions 3 and 5 turn the same name into the same UUID every time — ideal for idempotent keys derived from domains, URLs, or other stable inputs.
- **Sortable identifiers.** Version 7 is time-ordered, so IDs sort chronologically — great for database indexes.

### How to use UUID Generator

1. Click **Try for free** / **Start**.
2. Pick a **UUID version** (v4 random is the default and the most common choice).
3. Set the **Count** for how many you want (or, for v3/v5, fill in the **Names** list).
4. Optionally toggle **Uppercase**, **Include hyphens**, or the **plain-text file** output.
5. Click **Save & Start**. When the run finishes, open the **Output** tab to view, or **Export** the dataset as JSON/CSV/Excel.

### Input

Configure the run from the **Input** tab or via the API. All fields are optional except the UUID version (which defaults to `v4`).

| Field | Type | Description |
|---|---|---|
| `version` | string | UUID version: `v1`, `v3`, `v4`, `v5`, or `v7`. Default `v4`. |
| `count` | integer | How many UUIDs to generate (v1, v4, v7). Default `10`, max `1,000,000`. |
| `macAddress` | string | (v1 only) Optional MAC address to use as the node, e.g. `00:1a:2b:3c:4d:5e`. Leave empty for a random node. |
| `names` | array | List of names to hash (required for v3 / v5). One UUID is produced per name. |
| `namespaceType` | string | Namespace for v3 / v5: `dns`, `url`, `oid`, `x500`, or `custom`. Default `dns`. |
| `customNamespace` | string | A custom namespace UUID, used when `namespaceType` is `custom`. |
| `uppercase` | boolean | Output uppercase letters. Default `false`. |
| `hyphens` | boolean | Include standard hyphens. Disable for compact 32-char hex. Default `true`. |
| `savePlainText` | boolean | Also save `uuids.txt` to the key-value store. Default `true`. |

#### Example input

```json
{
    "version": "v4",
    "count": 1000,
    "uppercase": false,
    "hyphens": true
}
```

Name-based (deterministic) example:

```json
{
    "version": "v5",
    "namespaceType": "dns",
    "names": ["example.com", "apify.com"]
}
```

### Output

Each generated UUID is stored as a separate item in the run's dataset. You can download the dataset in various formats such as **JSON, HTML, CSV, or Excel**. When `savePlainText` is enabled, a newline-separated `uuids.txt` file is also written to the default key-value store.

#### Example output

```json
[
    {
        "uuid": "4e7788c6-f084-4734-b65f-65bcbb3b968f",
        "version": "v4",
        "index": 0
    },
    {
        "uuid": "0cf1742f-7ffd-412b-896f-5498f6f41344",
        "version": "v4",
        "index": 1
    }
]
```

For name-based versions, each item also includes the source `name` and the `namespace` UUID used.

#### Data table

| Field | Description |
|---|---|
| `uuid` | The generated UUID string (formatted per your options). |
| `version` | The UUID version that produced it (`v1`–`v7`). |
| `index` | Zero-based position within the run. |
| `name` | (v3/v5 only) The source name that was hashed. |
| `namespace` | (v3/v5 only) The namespace UUID used. |

### How much does it cost?

This Actor uses a **pay-per-event** price: a flat **$0.01 per run**, charged once each time you start the Actor — no matter whether you generate one UUID or a million. There is no per-result fee, so the event cost of a run is completely predictable. On top of the $0.01 event fee, **platform usage (compute, storage) is passed through to you at cost**, but the Actor is tuned to run at the platform's minimum memory (128 MB) and finishes in seconds for typical batches, so that usage is negligible.

### Tips and advanced options

- **Need sortable IDs for a database?** Use `v7` — identifiers are time-ordered and index-friendly.
- **Need the same ID for the same input?** Use `v3` or `v5` with a fixed namespace and names; the output is fully deterministic.
- **Want compact IDs?** Set `hyphens` to `false` for a 32-character hex string.
- **Big batches:** raise `count` (up to 1,000,000). Items are pushed in batches for efficiency.
- **Automate it:** schedule recurring runs or call the Actor from your own code with the Apify API/SDK to generate IDs on demand.

### FAQ, disclaimers, and support

**Which version should I pick?** Use **v4** (random) unless you have a specific need: **v7** for sortable IDs, **v1** for timestamp-based IDs, **v3/v5** for deterministic name-based IDs.

**Can I control the MAC address in v1 UUIDs?** Yes. Set the `macAddress` input to embed a specific node, e.g. `00:1a:2b:3c:4d:5e`. If you leave it empty, the Actor randomizes the node (and always randomizes the clock sequence), so v1 UUIDs never leak the host's real hardware address.

**Are the UUIDs cryptographically random?** Versions 4 and 7 use the system CSPRNG (Python's `secrets`), making them suitable for unpredictable identifiers. UUIDs are not a substitute for secret tokens, however.

**Found a bug or have a feature request?** Open an issue on the Actor's **Issues** tab. Custom solutions and tweaks are available on request.

### Data pipeline toolkit

Part of the **Data pipeline toolkit** — small, chainable Actors for cleaning, transforming, and generating data inside a larger pipeline:

- [jq Helper – transform JSON with jq](https://apify.com/rl1987/jq-helper) — Run jq programs over inline JSON or a linked Apify dataset.
- [DuckDB Helper – SQL over CSV, JSON, Parquet, Excel, SQLite](https://apify.com/rl1987/duckdb-wrapper) — Run a DuckDB SQL query over remote/local files, push results to a dataset.
- [Regex Helper](https://apify.com/rl1987/regex-helper) — Apply named regular expressions to strings, extract structured matches.
- [URL Wrangler](https://apify.com/rl1987/url-wrangler) — Join, decompose, and rewrite URLs and query params in batch.
- [ZIP Code Helper](https://apify.com/rl1987/zip-code-helper) — Resolves US ZIP codes into city, state, county, and more.
- [Postal Address Normaliser](https://apify.com/rl1987/postal-address-normaliser) — Parses and normalises postal addresses using libpostal.
- [Phone Number Wrangler](https://apify.com/rl1987/phone-number-wrangler) — Validate, format, and parse phone numbers using libphonenumber.
- [Secure Password & Passphrase Generator](https://apify.com/rl1987/password-generator) — Generate secure passwords and diceware passphrases per NIST guidance.
- [Thumbnail Maker](https://apify.com/rl1987/thumbnail-maker) — Generates thumbnails from image URLs using ImageMagick.
- [Katana Web Crawler (ProjectDiscovery)](https://apify.com/rl1987/pd-katana) — Crawl websites with Katana, stream results as JSONL.
- [ProjectDiscovery Notify](https://apify.com/rl1987/pd-notify) — Stream records to Slack, Discord, Telegram, Email, and more.

### Did you find this useful?

⭐ Rate this actor on Apify! Your feedback helps other users find it and helps us keep improving it.

# Actor input Schema

## `version` (type: `string`):

Which UUID version to generate. v1 is timestamp-based, v4 is random (most common), v7 is time-ordered and sortable, while v3 and v5 are name-based (deterministic) and require a namespace and names.

## `count` (type: `integer`):

How many UUIDs to generate. Used by versions v1, v4 and v7. For the name-based versions (v3, v5) the count is determined by the number of entries in "Names".

## `macAddress` (type: `string`):

Optional MAC address used as the node field of version 1 UUIDs. Accepts colon, hyphen, or dot separators, or 12 bare hex digits (e.g. 00:1a:2b:3c:4d:5e). If left empty, a random node is used so the host MAC is never leaked. Ignored for other versions.

## `namespaceType` (type: `string`):

The namespace used by the name-based versions v3 and v5. Choose one of the standard RFC 9562 namespaces, or "custom" to supply your own namespace UUID.

## `customNamespace` (type: `string`):

A custom namespace UUID to use when "Namespace" is set to "custom". Must be a valid UUID string, e.g. 6ba7b810-9dad-11d1-80b4-00c04fd430c8.

## `names` (type: `array`):

The list of names to hash into UUIDs for the name-based versions v3 and v5. One deterministic UUID is produced per name within the chosen namespace.

## `uppercase` (type: `boolean`):

Output UUIDs in uppercase letters (e.g. 9B1DEB4D-... instead of 9b1deb4d-...).

## `hyphens` (type: `boolean`):

Include the standard hyphens in the UUID string. Disable to output a compact 32-character hex form without dashes.

## `savePlainText` (type: `boolean`):

Also save all generated UUIDs as a newline-separated plain-text file (uuids.txt) in the default key-value store, in addition to the dataset.

## Actor input object example

```json
{
  "version": "v4",
  "count": 10,
  "macAddress": "00:1a:2b:3c:4d:5e",
  "namespaceType": "dns",
  "customNamespace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "names": [
    "example.com",
    "apify.com"
  ],
  "uppercase": false,
  "hyphens": true,
  "savePlainText": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "names": [
        "example.com",
        "apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/uuid-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "names": [
        "example.com",
        "apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("rl1987/uuid-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "names": [
    "example.com",
    "apify.com"
  ]
}' |
apify call rl1987/uuid-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/uuid-generator"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qZqjyMZg460yUofFR/builds/ngukk2hMgTGtx6RWQ/openapi.json
