# Password Generator (`prospect_camel/password-generator`) Actor

Generate Passwords at minimal pricing whether it is single or thousands.

- **URL**: https://apify.com/prospect\_camel/password-generator.md
- **Developed by:** [Weper](https://apify.com/prospect_camel) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## password-generator
Helps you Generate Passwords

## 🔐 Password Generator & Compliance Actor

Generate **secure, policy-driven passwords at scale** with enterprise-ready defaults, hashing, entropy scoring, rotation metadata, and export support — all in a **single Apify Actor run**.

This Actor is designed for:

* Developers
* DevOps & CI/CD pipelines
* Security & IAM teams
* Regulated environments (enterprise IT, banking, government)

---

### ✨ Key Features

* 🛡 **Security presets** (Personal, Enterprise, Banking, Government, Vault-Safe)
* 🔐 **Cryptographically secure password generation**
* 🔢 **Bulk password generation** (hundreds or thousands per run)
* 🧮 **Entropy calculation & strength classification**
* 🔑 **Hashing support** (bcrypt / SHA-256)
* 🚫 **Hash-only / vault-safe mode** (no plaintext output)
* 🔁 **Password rotation metadata**
* 📄 **CSV / TXT / JSON export**
* ⚙️ **Automation & CI/CD friendly**
* 💰 **Simple pay-per-run pricing**

---

### 🧠 How It Works

1. Select a **security preset**
2. (Optional) Override with advanced options
3. Passwords are generated using cryptographically secure randomness
4. Optional hashing, entropy scoring, and rotation metadata are applied
5. Results are returned as structured output

The Actor is **stateless**:

* No passwords are persisted
* No secrets survive the run
* No external services are contacted by default

---

### 📥 Input Configuration

Due to Apify platform constraints, inputs are **flattened** and validated at runtime.

#### 🔹 Common Inputs

| Field            | Description                     |
| ---------------- | ------------------------------- |
| `preset`         | Security preset to apply        |
| `count`          | Number of passwords to generate |
| `passwordLength` | Length of each password         |

---

#### 🔹 Advanced Inputs

| Field              | Description                           |
| ------------------ | ------------------------------------- |
| `entropyEnabled`   | Enable entropy & strength calculation |
| `hashingEnabled`   | Enable password hashing               |
| `hashingAlgorithm` | `bcrypt` or `sha256`                  |
| `hidePlaintext`    | Suppress plaintext passwords          |
| `rotationEnabled`  | Add rotation metadata                 |
| `rotationDays`     | Rotation interval in days             |
| `exportFormat`     | `json`, `csv`, or `txt`               |

> 💡 **Presets apply secure defaults**. Advanced options override preset behavior when specified.

---

### 🛡 Security Presets

| Preset       | Intended Use                       |
| ------------ | ---------------------------------- |
| `personal`   | Individual or low-risk use         |
| `enterprise` | Corporate & internal systems       |
| `banking`    | Higher entropy & stricter policies |
| `government` | Maximum entropy & rotation         |
| `vaultSafe`  | Hash-only, no plaintext output     |

Presets are **enforced contracts**, not suggestions.
Invalid combinations fail fast.

---

### 📤 Output Format

Each Actor run produces a structured JSON result.

#### Top-level structure

```json
{
  "metadata": { ... },
  "passwords": [ ... ],
  "export": "optional"
}
````

***

#### 🔹 `metadata`

| Field       | Description                   |
| ----------- | ----------------------------- |
| `preset`    | Applied security preset       |
| `timestamp` | ISO-8601 run timestamp        |
| `count`     | Number of passwords generated |

***

#### 🔹 `passwords[]`

Each entry represents one generated credential.

| Field         | Description                                    |
| ------------- | ---------------------------------------------- |
| `id`          | Sequential identifier                          |
| `password`    | Plaintext password (omitted in hash-only mode) |
| `hash`        | bcrypt or SHA-256 hash                         |
| `entropy`     | Calculated entropy score                       |
| `strength`    | Strength classification                        |
| `rotateAfter` | Recommended rotation date                      |

> 🔐 In **hash-only / vault-safe mode**, plaintext passwords are never returned.

***

#### 🔹 `export`

Optional CSV or TXT export content when requested.

***

### 📦 Data Storage

- **Dataset**: One record per Actor run (structured JSON)
- **Key-Value Store**: Optional, used only when integrations are enabled

By default, no additional storage keys are created.

***

### 🔌 Optional Integrations (Enterprise & Automation)

By default, this Actor is intentionally **minimal and secure**:

- Results are returned via the **Apify Dataset**
- No external systems are contacted
- No data leaves Apify unless explicitly configured

This keeps the Actor:

- Secure by default
- Easy to audit
- Predictable to operate

***

#### Available Optional Integrations

The following integrations can be **enabled on demand** for automation or enterprise workflows:

##### 🔑 Key-Value Store Exports

- Store outputs under named keys
- Retrieve files directly via Apify API
- Useful for:

  - Large CSV / TXT exports
  - Direct download links
  - Downstream automation

##### 🔔 Webhook Automation

- Receive notifications when runs succeed or fail
- Trigger CI/CD, provisioning, or vault ingestion workflows
- Webhook payloads include run metadata and storage identifiers

> 🔐 Passwords are **never sent directly in webhook payloads**.
> Downstream systems must explicitly fetch data using Apify API credentials.

***

#### Security-First Integration Design

Optional integrations are **disabled by default** to minimize attack surface.

When enabled:

- Hash-only / vault-safe mode is strongly recommended
- Plaintext output can be fully suppressed
- No outbound data transfer occurs without explicit configuration

This aligns with **zero-trust and compliance-first environments**.

***

### 💼 Enterprise & Paid Integrations

Optional integrations are treated as **enterprise features**.

They are intended for:

- CI/CD pipelines
- Identity & access management systems
- Secrets managers
- Regulated production environments

Integration features may require:

- Explicit enablement
- Additional configuration
- Enterprise pricing tier

This ensures:

- Predictable costs
- Controlled usage
- Dedicated support when required

***

### 💰 Pricing

#### Pricing model

**Pay per run**

#### Price

**$0.03 USD per run**

One run can generate **hundreds or thousands of passwords**, making the effective cost per credential extremely low.

***

#### Example costs

| Usage                     | Runs |  Cost |
| ------------------------- | ---: | ----: |
| Development testing       |   10 | $0.30 |
| Nightly CI/CD rotation    |   30 | $0.90 |
| HR onboarding (500 users) |    1 | $0.03 |

***

### 🔐 Security & Compliance Notes

- Cryptographically secure randomness
- No password persistence
- No logging of secrets
- Hash-only / vault-safe mode supported
- Designed for auditability and automation

⚠️ This Actor **generates credentials** but **does not store or manage them long-term**.
It is not a password manager.

***

### 🚫 What This Actor Does NOT Do

- ❌ No live HTTP server
- ❌ No streaming or long-running processes
- ❌ No automatic vault writes
- ❌ No password recovery

These exclusions are intentional for security and predictability.

***

### ⚙️ Automation & CI/CD

The Actor integrates cleanly with:

- Apify API
- Webhooks (optional)
- GitHub Actions
- CI/CD pipelines
- Internal provisioning systems

One API call = one run = predictable billing.

***

### 🧩 Versioning & Stability

- Output fields are backward-compatible
- New fields may be added
- Breaking changes only occur in major versions

***

### 🏁 Summary

> **Generate secure, policy-driven credentials at scale — safely, predictably, and affordably.**

This Actor is ideal when you need:

- Automation
- Compliance
- Strong defaults
- Predictable costs

# Actor input Schema

## `preset` (type: `string`):

Predefined security profile that applies recommended settings automatically.

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

How many passwords should be generated in this run.

## `passwordLength` (type: `integer`):

Length of each generated password in characters.

## `entropyEnabled` (type: `boolean`):

Whether to calculate and include password entropy and strength classification.

## `hashingEnabled` (type: `boolean`):

Generate hashed versions of passwords using the selected algorithm.

## `hashingAlgorithm` (type: `string`):

Algorithm used to hash passwords when hashing is enabled.

## `hidePlaintext` (type: `boolean`):

Exclude plaintext passwords from output and return hashes only.

## `rotationEnabled` (type: `boolean`):

Include recommended password rotation dates in the output.

## `rotationDays` (type: `integer`):

Number of days after which the password should be rotated.

## `exportFormat` (type: `string`):

Optional export format for generated passwords.

## Actor input object example

```json
{
  "preset": "enterprise",
  "count": 1,
  "passwordLength": 16,
  "entropyEnabled": true,
  "hashingEnabled": false,
  "hashingAlgorithm": "bcrypt",
  "hidePlaintext": false,
  "rotationEnabled": false,
  "rotationDays": 90,
  "exportFormat": "json"
}
```

# 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("prospect_camel/password-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("prospect_camel/password-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 prospect_camel/password-generator --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Password Generator",
        "description": "Generate Passwords at minimal pricing whether it is single or thousands.",
        "version": "0.0",
        "x-build-id": "jTmJ6o04ltDS9qKo5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/prospect_camel~password-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-prospect_camel-password-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/prospect_camel~password-generator/runs": {
            "post": {
                "operationId": "runs-sync-prospect_camel-password-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/prospect_camel~password-generator/run-sync": {
            "post": {
                "operationId": "run-sync-prospect_camel-password-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": {
                    "preset": {
                        "title": "Security preset",
                        "enum": [
                            "personal",
                            "enterprise",
                            "banking",
                            "government",
                            "vaultSafe"
                        ],
                        "type": "string",
                        "description": "Predefined security profile that applies recommended settings automatically.",
                        "default": "enterprise"
                    },
                    "count": {
                        "title": "Number of passwords",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "How many passwords should be generated in this run.",
                        "default": 1
                    },
                    "passwordLength": {
                        "title": "Password length",
                        "minimum": 8,
                        "maximum": 128,
                        "type": "integer",
                        "description": "Length of each generated password in characters.",
                        "default": 16
                    },
                    "entropyEnabled": {
                        "title": "Calculate entropy",
                        "type": "boolean",
                        "description": "Whether to calculate and include password entropy and strength classification.",
                        "default": true
                    },
                    "hashingEnabled": {
                        "title": "Enable hashing",
                        "type": "boolean",
                        "description": "Generate hashed versions of passwords using the selected algorithm.",
                        "default": false
                    },
                    "hashingAlgorithm": {
                        "title": "Hashing algorithm",
                        "enum": [
                            "bcrypt",
                            "sha256"
                        ],
                        "type": "string",
                        "description": "Algorithm used to hash passwords when hashing is enabled.",
                        "default": "bcrypt"
                    },
                    "hidePlaintext": {
                        "title": "Hide plaintext passwords",
                        "type": "boolean",
                        "description": "Exclude plaintext passwords from output and return hashes only.",
                        "default": false
                    },
                    "rotationEnabled": {
                        "title": "Enable rotation metadata",
                        "type": "boolean",
                        "description": "Include recommended password rotation dates in the output.",
                        "default": false
                    },
                    "rotationDays": {
                        "title": "Rotation period (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Number of days after which the password should be rotated.",
                        "default": 90
                    },
                    "exportFormat": {
                        "title": "Export format",
                        "enum": [
                            "json",
                            "csv",
                            "txt"
                        ],
                        "type": "string",
                        "description": "Optional export format for generated passwords.",
                        "default": "json"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
