# Bulk QR Code Generator — PNG & SVG for URLs, vCards, WiFi (`openregistry/qr-code-generator`) Actor

Generate hundreds of QR codes in one run: URLs, text, vCard contact cards, WiFi logins, email, phone and SMS. PNG and/or SVG, custom size, colors and error correction. Each code gets a public download link. Pay per QR code.

- **URL**: https://apify.com/openregistry/qr-code-generator.md
- **Developed by:** [Mahé Perrin](https://apify.com/openregistry) (community)
- **Categories:** Automation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 qr code generateds

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

## Bulk QR Code Generator — PNG & SVG for URLs, vCards, WiFi

Generate hundreds or thousands of QR codes in a single run, each with its own public download link. No account on a QR website, no watermark, no expiring "dynamic" redirect: the code contains your data directly and works forever.

Supported content:

| Type | What the phone does | Fields |
|---|---|---|
| `url` | opens the link | `url` |
| `text` | shows the text | `text` |
| `vcard` | offers to save the contact | `firstName`, `lastName`, `organization`, `title`, `phone`, `mobile`, `email`, `website`, `street`, `city`, `region`, `zip`, `country`, `note` |
| `wifi` | joins the network | `ssid`, `password`, `encryption` (WPA, WEP, none), `hidden` |
| `email` | opens a pre-filled email | `to`, `subject`, `body` |
| `phone` | calls the number | `phone` |
| `sms` | opens a pre-filled SMS | `phone`, `message` |

Output as **PNG** (64 to 4,096 px), **SVG** (vector, for print) or both, with custom colors (transparent background possible), quiet zone and error-correction level.

### What it is for

- **Events and badges**: one vCard QR per attendee or employee from a spreadsheet export.
- **Product labels and packaging**: one URL QR per SKU pointing to its product page or manual.
- **Restaurants, hotels, offices**: menu links and WiFi login codes per table or room.
- **Marketing**: campaign links with UTM parameters, printed on flyers in SVG.
- **Automation**: call the Actor from Make, Zapier, n8n or the API and get image links back in seconds.

### Input example

```json
{
  "texts": ["https://apify.com"],
  "items": [
    { "type": "wifi", "name": "office-wifi", "ssid": "Office", "password": "secret123" },
    { "type": "vcard", "name": "jane", "firstName": "Jane", "lastName": "Doe", "organization": "Acme", "email": "jane@acme.com" }
  ],
  "format": "both",
  "sizePx": 512,
  "errorCorrection": "M"
}
```

- `texts` — quick mode: one code per line; lines starting with `http`/`www.` become links, the rest plain text.
- `items` — typed objects (table above). `name` is optional and used in the file name.
- `format`, `sizePx`, `margin`, `errorCorrection`, `darkColor`, `lightColor` — rendering options.
- `maxResults` — stop condition, you control the cost.

### Output example

One dataset row per code; the image files are in the run's key-value store.

```json
{
  "index": 2,
  "name": "office-wifi",
  "type": "wifi",
  "content": "WIFI:T:WPA;S:Office;P:secret123;;",
  "pngUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/qr-00002-office-wifi.png?signature=<signature>",
  "svgUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/qr-00002-office-wifi.svg?signature=<signature>",
  "key": "qr-00002-office-wifi",
  "sizePx": 512,
  "errorCorrection": "M",
  "error": null
}
```

Export the table to CSV/Excel to merge the links back into your spreadsheet, or download the images from the key-value store.

### Good to know

- An item with a missing field (e.g. WiFi without `ssid`) or content too long for a QR code (about 2,900 bytes at level L) returns a row with an `error` message and is **not charged**; the other items still run.
- Links are signed, so they open without an Apify token even when your storages are private. They stay valid as long as the run's storage is kept (Apify keeps unnamed storages according to your plan's data retention, 7 days on the free plan). Download the files or copy them to a named store if you need them longer.
- Codes are static: to change the destination later, you need a new code (or encode a URL you control and redirect it).
- Keep strong contrast between dark and light colors; some phone cameras fail on light-on-dark codes.

### Privacy

Your content is only used to draw the codes and stays in your own Apify storage. WiFi passwords are encoded in plain text inside the code, as with any WiFi QR code: anyone who scans it can read them.

### Pricing

**$0.001 per QR code** ($1 per 1,000). PNG + SVG of the same code count as one. Skipped items are free. Set a maximum charge per run in the Apify console and the Actor stops cleanly when it is reached.

# Actor input Schema

## `texts` (type: `array`):

One QR code per entry. Entries starting with http://, https:// or www. are encoded as links, anything else as plain text.

## `items` (type: `array`):

Array of objects. type = url (url), text (text), vcard (firstName, lastName, organization, title, phone, mobile, email, website, street, city, region, zip, country, note), wifi (ssid, password, encryption WPA/WEP/none, hidden), email (to, subject, body), phone (phone), sms (phone, message). Optional name: used in the file name.

## `format` (type: `string`):

Both formats count as one QR code.

## `sizePx` (type: `integer`):

PNG only; SVG scales freely.

## `margin` (type: `integer`):

White border around the code. 4 is the standard; below 2 some phones struggle.

## `errorCorrection` (type: `string`):

Higher levels survive damage or a logo overlay but hold less data.

## `darkColor` (type: `string`):

Hex, e.g. #1a1a1a. Keep strong contrast with the light color.

## `lightColor` (type: `string`):

Hex; #ffffff00 for a transparent background.

## `maxResults` (type: `integer`):

The run stops once this many codes are generated, so you control the cost.

## Actor input object example

```json
{
  "texts": [
    "https://apify.com",
    "Hello from a QR code"
  ],
  "items": [
    {
      "type": "wifi",
      "name": "office-wifi",
      "ssid": "Office",
      "password": "secret123",
      "encryption": "WPA"
    },
    {
      "type": "vcard",
      "name": "jane",
      "firstName": "Jane",
      "lastName": "Doe",
      "organization": "Acme",
      "email": "jane@acme.com",
      "mobile": "+1 555 0100",
      "website": "https://acme.com"
    }
  ],
  "format": "png",
  "sizePx": 512,
  "margin": 4,
  "errorCorrection": "M",
  "darkColor": "#000000",
  "lightColor": "#ffffff",
  "maxResults": 10000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `files` (type: `string`):

No description

# 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 = {
    "texts": [
        "https://apify.com",
        "Hello from a QR code"
    ],
    "items": [
        {
            "type": "wifi",
            "name": "office-wifi",
            "ssid": "Office",
            "password": "secret123",
            "encryption": "WPA"
        },
        {
            "type": "vcard",
            "name": "jane",
            "firstName": "Jane",
            "lastName": "Doe",
            "organization": "Acme",
            "email": "jane@acme.com",
            "mobile": "+1 555 0100",
            "website": "https://acme.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openregistry/qr-code-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 = {
    "texts": [
        "https://apify.com",
        "Hello from a QR code",
    ],
    "items": [
        {
            "type": "wifi",
            "name": "office-wifi",
            "ssid": "Office",
            "password": "secret123",
            "encryption": "WPA",
        },
        {
            "type": "vcard",
            "name": "jane",
            "firstName": "Jane",
            "lastName": "Doe",
            "organization": "Acme",
            "email": "jane@acme.com",
            "mobile": "+1 555 0100",
            "website": "https://acme.com",
        },
    ],
}

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

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

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

```

## CLI example

```bash
echo '{
  "texts": [
    "https://apify.com",
    "Hello from a QR code"
  ],
  "items": [
    {
      "type": "wifi",
      "name": "office-wifi",
      "ssid": "Office",
      "password": "secret123",
      "encryption": "WPA"
    },
    {
      "type": "vcard",
      "name": "jane",
      "firstName": "Jane",
      "lastName": "Doe",
      "organization": "Acme",
      "email": "jane@acme.com",
      "mobile": "+1 555 0100",
      "website": "https://acme.com"
    }
  ]
}' |
apify call openregistry/qr-code-generator --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

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