# Bulk QR Code Generator (`badboxx_newlife/bulk-qr-code-generator`) Actor

Turn a list of URLs, texts, WiFi networks and vCard contacts into QR codes in one run: one PNG or SVG per item, all in a single ZIP, plus one dataset row per code. For flyers, event badges, WiFi cards and product labels.

- **URL**: https://apify.com/badboxx_newlife/bulk-qr-code-generator.md
- **Developed by:** [Francesco Correnti](https://apify.com/badboxx_newlife) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 qr codes

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: URL, Text, WiFi, vCard to PNG/SVG ZIP

Turn a list of URLs, texts, WiFi networks and contacts into QR codes in one run: one PNG or SVG per item, all in a single ZIP, plus one dataset row per code.

### Use cases

- Print flyers with a QR per campaign URL
- Event badges: one vCard code per attendee
- WiFi cards for guests, rooms or rentals
- Product labels: one code per SKU page

### Features

- 4 types: url, text, WiFi, vCard
- PNG or SVG, any size 64-2000 px
- JSON list and/or CSV input (merged)
- Error correction M, 4-module quiet border, black on white
- Bad items are skipped, listed in the `ERRORS` record, and not billed
- Unicode and long data (up to QR version 40)

### Input

| Field | Type | Description |
|---|---|---|
| `items` | array | Objects: `type` (url/text/wifi/vcard), `data`, `ssid`, `password`, `encryption` (WPA/WEP/nopass), `name`, `phone`, `email`, `filename`. Nested `wifi{ssid,pass,enc}` and `vcard{name,phone,email}` also work |
| `csv` | string | CSV with header `type,data,ssid,password,encryption,name,phone,email,filename` |
| `format` | `png`|`svg` | Default `png` |
| `size` | integer | Target width in px, 64-2000, default 300 (whole-pixel modules): at most `size`, except very dense codes at small sizes (1 px per module) |

### Example input (JSON)

```json
{
  "format": "png",
  "size": 300,
  "items": [
    {"type": "url", "data": "https://apify.com"},
    {"type": "text", "data": "Hello, wörld 😀"},
    {"type": "wifi", "wifi": {"ssid": "Home", "pass": "secret", "enc": "WPA"}},
    {"type": "vcard", "vcard": {"name": "Doe;Jane", "phone": "+15550100", "email": "jane@example.com"}}
  ]
}
```

### Example input (CSV)

```
type,data,ssid,password,encryption,name,phone,email,filename
url,https://apify.com,,,,,,,apify
wifi,,Home,secret,WPA,,,,
vcard,,,,,Doe;Jane,+15550100,jane@example.com,
```

### Output

Dataset row (all images are in key-value store record `qr-codes.zip`):

```json
{"index": 0, "type": "url", "payload": "https://apify.com", "file": "qr-0000-url.png", "format": "png", "size": 300, "version": 2, "zipKey": "qr-codes.zip"}
```

### Pricing

**$0.02 per QR code.** Pay per result, 1 result = 1 QR code.

- Invalid items are free: they produce no result and are listed in `ERRORS`.
- Max paid items is respected: with a spending limit set, no more codes than paid for are delivered; the rest are listed in `ERRORS` as `not charged: max paid items reached`.

### Limits

- Max 10000 items per run; extra items are dropped.
- Invalid items (unknown type, empty data/ssid/name, too long for QR v40) produce no row; see `ERRORS`.
- Width is at most `size`, except very dense codes at small sizes (1 px per module).
- The run fails only if no code could be generated.

### FAQ

**What goes in the QR?** `url` and `text` encode `data` as is. `wifi` encodes a `WIFI:` join code, `vcard` a vCard 3.0 contact.

**Where are my images?** In the run's key-value store, record `qr-codes.zip`. Dataset rows give the file name of each code inside.

**Am I charged for bad rows?** No. Only successfully generated codes are results.

**PNG or SVG?** Set `format`. SVG scales without loss for print.

**Can I mix JSON and CSV?** Yes, both are merged.

# Actor input Schema

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

List of QR codes: {type: url|text|wifi|vcard, data, ssid, password, encryption, name, phone, email, filename}.

## `csv` (type: `string`):

CSV text with header: type,data,ssid,password,encryption,name,phone,email,filename. Merged with Items.

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

Image format.

## `size` (type: `integer`):

Target image width in pixels.

## Actor input object example

```json
{
  "items": [
    {
      "type": "url",
      "data": "https://apify.com"
    },
    {
      "type": "text",
      "data": "Hello"
    },
    {
      "type": "wifi",
      "wifi": {
        "ssid": "Home",
        "pass": "secret",
        "enc": "WPA"
      }
    },
    {
      "type": "vcard",
      "vcard": {
        "name": "Doe;Jane",
        "phone": "+15550100",
        "email": "jane@example.com"
      }
    }
  ],
  "csv": "type,data,ssid,password,encryption,name,phone,email,filename\nurl,https://apify.com,,,,,,,apify\nwifi,,Home,secret,WPA,,,,\nvcard,,,,,Jane Doe,+15550100,jane@example.com,\n",
  "format": "png",
  "size": 300
}
```

# Actor output Schema

## `codes` (type: `string`):

No description

## `zip` (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 = {
    "items": [
        {
            "type": "url",
            "data": "https://apify.com"
        },
        {
            "type": "text",
            "data": "Hello"
        },
        {
            "type": "wifi",
            "wifi": {
                "ssid": "Home",
                "pass": "secret",
                "enc": "WPA"
            }
        },
        {
            "type": "vcard",
            "vcard": {
                "name": "Doe;Jane",
                "phone": "+15550100",
                "email": "jane@example.com"
            }
        }
    ],
    "csv": `type,data,ssid,password,encryption,name,phone,email,filename
url,https://apify.com,,,,,,,apify
wifi,,Home,secret,WPA,,,,
vcard,,,,,Jane Doe,+15550100,jane@example.com,`
};

// Run the Actor and wait for it to finish
const run = await client.actor("badboxx_newlife/bulk-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 = {
    "items": [
        {
            "type": "url",
            "data": "https://apify.com",
        },
        {
            "type": "text",
            "data": "Hello",
        },
        {
            "type": "wifi",
            "wifi": {
                "ssid": "Home",
                "pass": "secret",
                "enc": "WPA",
            },
        },
        {
            "type": "vcard",
            "vcard": {
                "name": "Doe;Jane",
                "phone": "+15550100",
                "email": "jane@example.com",
            },
        },
    ],
    "csv": """type,data,ssid,password,encryption,name,phone,email,filename
url,https://apify.com,,,,,,,apify
wifi,,Home,secret,WPA,,,,
vcard,,,,,Jane Doe,+15550100,jane@example.com,
""",
}

# Run the Actor and wait for it to finish
run = client.actor("badboxx_newlife/bulk-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 '{
  "items": [
    {
      "type": "url",
      "data": "https://apify.com"
    },
    {
      "type": "text",
      "data": "Hello"
    },
    {
      "type": "wifi",
      "wifi": {
        "ssid": "Home",
        "pass": "secret",
        "enc": "WPA"
      }
    },
    {
      "type": "vcard",
      "vcard": {
        "name": "Doe;Jane",
        "phone": "+15550100",
        "email": "jane@example.com"
      }
    }
  ],
  "csv": "type,data,ssid,password,encryption,name,phone,email,filename\\nurl,https://apify.com,,,,,,,apify\\nwifi,,Home,secret,WPA,,,,\\nvcard,,,,,Jane Doe,+15550100,jane@example.com,\\n"
}' |
apify call badboxx_newlife/bulk-qr-code-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badboxx_newlife/bulk-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/gyhuLzFPysbbEI9xg/builds/QeseCPNmh2QxJCx4Y/openapi.json
