# Bulk QR Code & Barcode Generator: PNG & SVG (`bite-sized-insights/bulk-qr-code-generator`) Actor

Generate QR codes and barcodes in bulk as PNG or SVG. Supports URLs, text, vCard, WiFi, email, phone, SMS, EAN-13, UPC-A, Code 128 and more. Set size, colors, error correction and module style, and get download links for every image.

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

***Generate QR codes and barcodes in bulk - URL, text, vCard, WiFi, email, phone and SMS payloads plus Code128, EAN-13, UPC-A and more - as crisp PNG or SVG files with your own size, colors and error correction.***

Give the actor a list of things to encode and get back one image per entry, stored in the run's key-value store, with a download link in every result row. Everything is computed inside the run: no external service is called and no account is needed. Pay-per-event pricing, charged only for codes that were generated.

### Why Choose This Actor?

- **Many payload types**: plain text, URLs, contact cards (vCard), WiFi login codes, pre-filled emails, phone numbers and SMS messages - the payload format is built for you, including escaping
- **Common barcodes**: Code128, Code39, EAN-13, EAN-8, UPC-A, ITF and ISBN-13, with check digits calculated or verified
- **PNG and SVG**: raster files for quick use, vector files for print; request both in one run
- **Full control over the look**: size, error correction level, margin, foreground and background color, a transparent background, and dot or rounded module styles - no logo required
- **Per-entry results**: a bad entry never fails the run; it gets its own row with a clear error and is not charged
- **Cost-effective**: `$1.20 / 1,000 codes` on the Free plan, down to `$0.78` on Gold, plus a tiny start fee

### Quick Start

```json
{
  "items": [
    "https://apify.com",
    { "type": "wifi", "ssid": "Office", "password": "correct-horse", "security": "WPA" },
    { "type": "ean13", "data": "5901234123457" }
  ],
  "outputFormat": "png",
  "size": 512
}
```

### Entry Types

| Type | Fields |
|---|---|
| `text` | `data` |
| `url` | `data` (https:// is added when no scheme is given) |
| `phone` | `data` |
| `sms` | `data` (number), `body` |
| `email` | `data` (address), `subject`, `body` |
| `wifi` | `ssid`, `password`, `security` (`WPA`, `WEP`, `nopass`), `hidden` |
| `vcard` | `firstName`, `lastName`, `organization`, `title`, `note` |
| `vcard` contact fields | `phone`, `mobile`, `email`, `website`, `street`, `city`, `region`, `postalCode`, `country` |
| `code128`, `code39`, `ean13`, `ean8`, `upca`, `itf`, `isbn13` | `data` |

An optional `id` on any entry is echoed back in its result row. A plain string entry is treated as a URL code when it starts with `http://` or `https://`, otherwise as text.

### Usage Examples

#### A contact card as a styled SVG

```json
{
  "items": [
    { "type": "vcard", "firstName": "Jane", "lastName": "Doe", "organization": "Acme", "phone": "+4930123456",
      "email": "jane@acme.example", "website": "https://acme.example" }
  ],
  "outputFormat": "svg",
  "moduleStyle": "rounded",
  "foregroundColor": "#1a2b6d",
  "backgroundColor": "transparent",
  "errorCorrection": "Q"
}
```

#### Product barcodes

```json
{
  "items": [
    { "type": "ean13", "data": "590123412345", "id": "sku-1" },
    { "type": "upca", "data": "03600029145", "id": "sku-2" },
    { "type": "code128", "data": "ORDER-2024-0042", "id": "sku-3" }
  ],
  "outputFormat": "both"
}
```

Give EAN-13, EAN-8, UPC-A and ISBN-13 either without the check digit (it is calculated) or complete (it is verified).

### Output Example

```json
{
  "id": null,
  "type": "ean13",
  "kind": "barcode",
  "content": "5901234123457",
  "status": "ok",
  "error": null,
  "width": 460,
  "height": 213,
  "png_key": "barcode-00003-0b5d0f2e.png",
  "svg_key": null,
  "png_url": "https://api.apify.com/v2/key-value-stores/.../records/barcode-00003-0b5d0f2e.png",
  "svg_url": null
}
```

### Input Options

| Option | Description |
|---|---|
| `outputFormat` | `png` (default), `svg` or `both` |
| `size` | Target width in pixels, 64 to 2048 (default 512) |
| `errorCorrection` | QR error correction: `L`, `M` (default), `Q`, `H` |
| `margin` | QR blank border in modules, 0 to 20 (default 4) |
| `foregroundColor`, `backgroundColor` | Hex colors; the background may be `transparent` |
| `moduleStyle` | `square` (default), `dots`, `rounded`; the three corner squares always stay square |
| `showText` | Print the readable code under barcodes (default true) |

Up to 5,000 entries per run. A QR code holds up to roughly 2,900 bytes at the lower error correction levels.

### Pricing

Pay-per-event. `code-generated` is charged only for codes that were generated; error rows are free, including codes not started because the run's time limit was close (`time_limit` error). The start fee ($0.0001) is charged once per GB of memory (minimum one), i.e. once for runs at or under 1 GB.

| Plan | `code-generated` price |
|---|---|
| Free | $1.20 / 1,000 codes |
| Bronze | $1.14 / 1,000 codes |
| Silver | $1.02 / 1,000 codes |
| Gold, Platinum, Diamond | $0.78 / 1,000 codes |

### FAQ

**Where are the images?** In the run's default key-value store; every result row has the key and a download URL.

**Why is my QR code a little smaller than the size I asked for?** QR codes are drawn at a whole number of pixels per module so edges stay sharp; the real width and height are in the result.

**Is the free plan limited?** Test and free-plan runs create the first 10 codes of the list.

# Actor input Schema

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

One entry per code: a URL or text string, or an object with a `type` and fields.

## `outputFormat` (type: `string`):

Image file(s) to create for every code. `both` creates a PNG and an SVG.

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

Target width in pixels. QR codes use the largest whole-pixel scale that fits.

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

QR damage tolerance: L about 7%, M 15%, Q 25%, H 30%. Higher means denser.

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

Blank border around a QR code, in modules. Scanners need about 4.

## `foregroundColor` (type: `string`):

Hex color of the dark modules or bars, for example #000000.

## `backgroundColor` (type: `string`):

Hex color of the background, for example #ffffff, or `transparent`.

## `moduleStyle` (type: `string`):

Shape of QR data modules. The three corner squares always stay square.

## `showText` (type: `boolean`):

Print the readable code under barcodes, including the check digit.

## Actor input object example

```json
{
  "items": [
    "https://apify.com",
    {
      "type": "wifi",
      "ssid": "Office",
      "password": "correct-horse",
      "security": "WPA"
    },
    {
      "type": "ean13",
      "data": "5901234123457"
    }
  ],
  "outputFormat": "png",
  "size": 512,
  "errorCorrection": "M",
  "margin": 4,
  "foregroundColor": "#000000",
  "backgroundColor": "#ffffff",
  "moduleStyle": "square",
  "showText": true
}
```

# Actor output Schema

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

One row per code with its encoded content, status and download links for the image files

# 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": [
        "https://apify.com",
        {
            "type": "wifi",
            "ssid": "Office",
            "password": "correct-horse",
            "security": "WPA"
        },
        {
            "type": "ean13",
            "data": "5901234123457"
        }
    ],
    "size": 512
};

// Run the Actor and wait for it to finish
const run = await client.actor("bite-sized-insights/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": [
        "https://apify.com",
        {
            "type": "wifi",
            "ssid": "Office",
            "password": "correct-horse",
            "security": "WPA",
        },
        {
            "type": "ean13",
            "data": "5901234123457",
        },
    ],
    "size": 512,
}

# Run the Actor and wait for it to finish
run = client.actor("bite-sized-insights/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": [
    "https://apify.com",
    {
      "type": "wifi",
      "ssid": "Office",
      "password": "correct-horse",
      "security": "WPA"
    },
    {
      "type": "ean13",
      "data": "5901234123457"
    }
  ],
  "size": 512
}' |
apify call bite-sized-insights/bulk-qr-code-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bite-sized-insights/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/Od1G7ZakjeIS7zEw0/builds/sdFxFIXM3RisIrClW/openapi.json
