# 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 simple **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 and no separate platform-usage charge to reason about, so the cost of a run is completely predictable. The Actor runs at the platform's minimum memory (128 MB) and finishes in seconds for typical batches.

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

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rl1987/uuid-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UUID Generator",
        "description": "Generate bulk universally unique identifiers (UUID v1, v3, v4, v5, v7) on demand. Export as JSON, CSV, Excel or plain text.",
        "version": "1.1",
        "x-build-id": "6XeMdRZ24i5O3q5y8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rl1987~uuid-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rl1987-uuid-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rl1987~uuid-generator/runs": {
            "post": {
                "operationId": "runs-sync-rl1987-uuid-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rl1987~uuid-generator/run-sync": {
            "post": {
                "operationId": "run-sync-rl1987-uuid-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "version"
                ],
                "properties": {
                    "version": {
                        "title": "UUID version",
                        "enum": [
                            "v1",
                            "v3",
                            "v4",
                            "v5",
                            "v7"
                        ],
                        "type": "string",
                        "description": "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.",
                        "default": "v4"
                    },
                    "count": {
                        "title": "Count",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "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\".",
                        "default": 10
                    },
                    "macAddress": {
                        "title": "MAC address (for v1)",
                        "type": "string",
                        "description": "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": {
                        "title": "Namespace (for v3 / v5)",
                        "enum": [
                            "dns",
                            "url",
                            "oid",
                            "x500",
                            "custom"
                        ],
                        "type": "string",
                        "description": "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.",
                        "default": "dns"
                    },
                    "customNamespace": {
                        "title": "Custom namespace UUID",
                        "type": "string",
                        "description": "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": {
                        "title": "Names (for v3 / v5)",
                        "type": "array",
                        "description": "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.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "uppercase": {
                        "title": "Uppercase",
                        "type": "boolean",
                        "description": "Output UUIDs in uppercase letters (e.g. 9B1DEB4D-... instead of 9b1deb4d-...).",
                        "default": false
                    },
                    "hyphens": {
                        "title": "Include hyphens",
                        "type": "boolean",
                        "description": "Include the standard hyphens in the UUID string. Disable to output a compact 32-character hex form without dashes.",
                        "default": true
                    },
                    "savePlainText": {
                        "title": "Save plain-text file",
                        "type": "boolean",
                        "description": "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.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
