# PasswordGenerator (`crawlpilot/passwordgenerator`) Actor

Secure password generator using crypto

- **URL**: https://apify.com/crawlpilot/passwordgenerator.md
- **Developed by:** [CrawlPilot](https://apify.com/crawlpilot) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 8 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $500.00 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Secure Password Generator

[![Apify](https://img.shields.io/badge/Apify-Actor-brightgreen.svg)](https://apify.com/mood-sagar/passwordgenerator)
[![Version](https://img.shields.io/badge/version-0.0.1-blue.svg)](https://console.apify.com)
[![Node.js](https://img.shields.io/badge/Node.js-v20.19.5-green.svg)](https://nodejs.org)

**Generate cryptographically secure passwords — 1 result = 1 password.**

### Features

- **True Randomness**: `crypto.randomBytes()` — **no `Math.random()`**
- **Custom Length**: 4–128 characters
- **Flexible Char Sets**: Uppercase, lowercase, numbers, symbols
- **Avoid Ambiguity**: Skip `0/O`, `1/l`, `I` (optional)
- **Batch Output**: **1 password = 1 dataset item** (ideal for export)
- **Lightning Fast**: <1s per run

***

### Input Schema

```json
{
  "length": 16,
  "num_passwords": 5,
  "include_uppercase": true,
  "include_lowercase": true,
  "include_numbers": true,
  "include_symbols": false,
  "avoid_ambiguous": true
}
```

| Field | Type | Default | Description |
|------|------|---------|-------------|
| `length` | Integer | 12 | 4–128 |
| `include_uppercase` | Boolean | true | A-Z |
| `include_lowercase` | Boolean | true | a-z |
| `include_numbers` | Boolean | true | 0-9 |
| `include_symbols` | Boolean | true | !@#$ etc. |
| `num_passwords` | Integer | 1 | Max 1,000 |
| `avoid_ambiguous` | Boolean | false | Skip confusing chars |

> **At least one char set required.**

***

### Output (Dataset)

**1 password = 1 result** → Clean, billable, exportable

```json
{ "password": "XyKpM2qR8vN4jLbC", "length": 16, "config": { ... }, "generated_at": "2025-11-07T06:00:00.000Z" }
{ "password": "A7tU3eW5rY9mP2fG", "length": 16, "config": { ... }, "generated_at": "2025-11-07T06:00:00.000Z" }
```

**Export as CSV/JSON** → Ready for scripts, DBs, Make.com, n8n, or Zapier.

### Use Cases

- Generate API keys, tokens, or user passwords
- Seed test databases
- Automate onboarding
- Integrate with Make.com, Zapier, or scripts

### Example Runs

```json
// 3 readable passwords (no symbols, no ambiguity)
{ "num_passwords": 3, "include_symbols": false, "avoid_ambiguous": true }
```

**Logs**:

```
Generated 3 password(s) of length 12:
- AbCdEfGhIjKl
- MnOpQrStUvWx
- YzAbCdEfGhIj
```

***

### Troubleshooting

- **"Char set" error** → Enable at least one character type
- **Length clamped** → Input outside 4–128 is adjusted
- **No dataset?** → Check logs for generated passwords

***

### Built With

- [Apify SDK](https://sdk.apify.com)
- [Node.js `crypto`](https://nodejs.org/api/crypto.html)
- Love from India

***

### License

MIT © 2025 **CrawlPilot**

***

# Actor input Schema

## `length` (type: `integer`):

Password length (min 4, max 128)

## `include_uppercase` (type: `boolean`):

Include uppercase letters (A-Z)

## `include_lowercase` (type: `boolean`):

Include lowercase letters (a-z)

## `include_numbers` (type: `boolean`):

Include numbers (0-9)

## `include_symbols` (type: `boolean`):

Include symbols (!@#$ etc.)

## `num_passwords` (type: `integer`):

Number of passwords to generate

## `avoid_ambiguous` (type: `boolean`):

Avoid ambiguous characters (0, O, 1, l, I)

## Actor input object example

```json
{
  "length": 12,
  "include_uppercase": true,
  "include_lowercase": true,
  "include_numbers": true,
  "include_symbols": true,
  "num_passwords": 1,
  "avoid_ambiguous": false
}
```

# 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("crawlpilot/passwordgenerator").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("crawlpilot/passwordgenerator").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call crawlpilot/passwordgenerator --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vt15bzU1dLYPK86x1/builds/89QPyCmnLiF2WYlT0/openapi.json
