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

Generate UUID v1, v3, v4, v5 instantly. Perfect for test data, unique IDs, database seeding, and development workflows. Choose random v4 (most common), time-based v1, or deterministic v3/v5. Customize hyphen format. Export results via Dataset or API. Fast, no-code tool with scheduling and monitoring

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## UUID Generator

Generate **UUID v1, v3, v4, v5** instantly for testing, unique IDs, API tokens, and database seeding. No coding needed – just select version, hyphen format, and optionally provide **name** and **namespace** for v3/v5. Get results via Dataset, Key-value store `OUTPUT`, or API. Fast, scalable, free trial.

### Why Use UUID Generator?

- **Instant IDs**: Single-click generation for dev workflows.
- **Multiple versions**: Random (v4), time-based (v1), deterministic (v3/v5).
- **Deterministic support**: Use `name` and `namespace` for repeatable v3/v5 UUID generation.
- **Apify platform**: Schedule runs, API access, monitoring, integrations.
- **Export ready**: JSON/CSV download, perfect for test data.

### Features

- Generate v1 (time-based), v3 (MD5 hash), v4 (random), v5 (SHA-1 hash).
- Hyphen on/off formatting.
- Optional `name`, `namespaceType`, and `namespace` inputs for v3/v5.
- Free trial covers hundreds of runs.
- Run via API, schedule, or webhook.

### Input Options

Click the [input tab](#input) for full schema.

| Field           | Type    | Description                                                    | Default                                  |
| --------------- | ------- | -------------------------------------------------------------- | ---------------------------------------- |
| `version`       | Select  | UUID version: v1, v3, v4, v5                                   | `v4`                                     |
| `hyphen`        | Boolean | Include hyphens (-)                                            | `true`                                   |
| `name`          | String  | Used for v3/v5. Same name + same namespace = same UUID         | `"default-name"`                         |
| `namespaceType` | Select  | Namespace type for v3/v5: `DNS`, `URL`, `custom`               | `DNS`                                    |
| `namespace`     | String  | Custom namespace UUID, used only when `namespaceType = custom` | `"6ba7b810-9dad-11d1-80b4-00c04fd430c8"` |

**Notes:**

- `name`, `namespaceType`, and `namespace` are mainly used for **v3** and **v5**.
- For **v1** and **v4**, those fields are ignored.
- For **v3/v5**, the same `name` and `namespace` will always generate the same UUID.

**Example input (v4):**

```json
{
  "version": "v4",
  "hyphen": false
}
````

**Example input (v3 + custom namespace):**

```json
{
  "version": "v3",
  "hyphen": true,
  "name": "my-user-id",
  "namespaceType": "custom",
  "namespace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
```

**Example input (v5 + DNS namespace):**

```json
{
  "version": "v5",
  "hyphen": false,
  "name": "example.com",
  "namespaceType": "DNS"
}
```

### Output Data

Results saved to **default Dataset** (export JSON/CSV) and **Key-value store `OUTPUT`**.

#### Output Table

| Field           | Type    | Description                    | Example                              |
| --------------- | ------- | ------------------------------ | ------------------------------------ |
| `uuid`          | String  | Generated UUID                 | `"550e8400e29b41d4a716446655440000"` |
| `version`       | String  | Used version                   | `"v4"`                               |
| `hyphen`        | Boolean | Hyphen setting                 | `true`                               |
| `createdAt`     | String  | ISO timestamp                  | `"2026-03-17T05:37:00Z"`             |
| `name`          | String  | Provided name for v3/v5 only   | "example.com"                        |
| `namespaceType` | String  | Namespace type for v3/v5 only  | "DNS"                                |
| `namespace`     | String  | Namespace value for v3/v5 only | "DNS"                                |

**Example output (v4):**

```json
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "version": "v4",
  "hyphen": true,
  "createdAt": "2026-03-17T05:37:00.000Z"
}
```

**Example output (v5 + DNS namespace):**

```json
{
  "uuid": "cfbff0d1-9375-5685-968c-48ce8b15ae17",
  "version": "v5",
  "hyphen": true,
  "createdAt": "2026-03-17T05:37:00.000Z",
  "name": "example.com",
  "namespaceType": "DNS",
  "namespace": "DNS"
}
```

### How to Use UUID Generator

1. **Run Actor** (default generates v4 with hyphens).
2. **Customize** via input: select version, toggle hyphen.
3. For **v3** or **v5**, optionally provide `name`, `namespaceType`, and `namespace`.
4. If using `custom` namespace, provide a valid namespace UUID.
5. **Download** Dataset (JSON/CSV) or fetch `OUTPUT` via API.
6. **Schedule/API** for automation.

> 💡 **Quick test**: Run now – get UUID in seconds!

### Pricing

- **Free trial**: ~$5 credits = thousands of UUIDs.
- **Pay-per-run**: Low CU usage (minimal compute).
- Scales to millions of IDs without extra cost.

### Tips

- **v4**: Default for random unique IDs.
- **v1**: Useful when you want time-based UUIDs.
- **v3**/**v5**: Deterministic – same input = same UUID.
- **No hyphen**: Compact 32-char format for URLs.
- **API**: `curl` or SDK for batch generation.

### FAQ

#### Is UUID Generator free?

Free trial covers extensive testing. Production: pay-per-compute (very low).

#### v3 vs v5?

v3 (MD5): Legacy. v5 (SHA-1): Modern deterministic.

#### Why do v3 and v5 need name and namespace?

Because v3 and v5 are name-based UUIDs. The same name and namespace combination always produces the same UUID.

#### Legal to use?

UUIDs are standard – generate unlimited test data ethically.

***

**Feedback?** [Create issue](https://apify.com/apizy/uuid-generator/issues/open) – open to suggestions!

# Actor input Schema

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

UUID version (v1/v3/v4/v5)

## `hyphen` (type: `boolean`):

Include hyphens in the UUID

## `name` (type: `string`):

Used only for v3 and v5. Same name + same namespace = same UUID.

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

Used only for v3 and v5.

## `namespace` (type: `string`):

Used only when Namespace type is custom.

## Actor input object example

```json
{
  "version": "v4",
  "hyphen": true,
  "name": "default-name",
  "namespaceType": "DNS",
  "namespace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all UUID results

## `output` (type: `string`):

Single UUID result from key-value store OUTPUT

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("apizy/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("apizy/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 '{}' |
apify call apizy/uuid-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apizy/uuid-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UUID Generator",
        "description": "Generate UUID v1, v3, v4, v5 instantly. Perfect for test data, unique IDs, database seeding, and development workflows. Choose random v4 (most common), time-based v1, or deterministic v3/v5. Customize hyphen format. Export results via Dataset or API. Fast, no-code tool with scheduling and monitoring",
        "version": "0.0",
        "x-build-id": "xSUlux4iddcaogpD3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apizy~uuid-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apizy-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/apizy~uuid-generator/runs": {
            "post": {
                "operationId": "runs-sync-apizy-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/apizy~uuid-generator/run-sync": {
            "post": {
                "operationId": "run-sync-apizy-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",
                "properties": {
                    "version": {
                        "title": "UUID Version",
                        "enum": [
                            "v1",
                            "v3",
                            "v4",
                            "v5"
                        ],
                        "type": "string",
                        "description": "UUID version (v1/v3/v4/v5)",
                        "default": "v4"
                    },
                    "hyphen": {
                        "title": "Include Hyphens",
                        "type": "boolean",
                        "description": "Include hyphens in the UUID",
                        "default": true
                    },
                    "name": {
                        "title": "Name",
                        "type": "string",
                        "description": "Used only for v3 and v5. Same name + same namespace = same UUID.",
                        "default": "default-name"
                    },
                    "namespaceType": {
                        "title": "Namespace type",
                        "enum": [
                            "DNS",
                            "URL",
                            "custom"
                        ],
                        "type": "string",
                        "description": "Used only for v3 and v5.",
                        "default": "DNS"
                    },
                    "namespace": {
                        "title": "Custom namespace UUID",
                        "type": "string",
                        "description": "Used only when Namespace type is custom.",
                        "default": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
