# QR Code Generator: bulk text and URLs to PNG and SVG (`examsens.ai/qr-code-generator`) Actor

Turns every text or URL you list into a QR code as PNG, SVG or both, with your pixel size, error correction level, colors, transparent background and quiet zone. Returns a download link for each file.

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

## Pricing

from $27.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

## QR Code Generator: bulk text and URLs to PNG and SVG

Give it a list of texts or URLs and it makes one QR code for each, as a PNG, an SVG, or both. Every file goes into the run's key value store, and the dataset gives you a direct download link for each one.

Use it for product labels, event badges, menus, flyers, packaging and print runs where you need many codes at once.

### What you can encode

Anything a QR scanner reads: URLs, plain text in any language (Unicode and emoji included), Wi-Fi strings such as `WIFI:S:GuestNet;T:WPA;P:welcome123;;`, and vCards. Every test code in each of these kinds was decoded back to its exact input.

### Options

- File format: PNG and SVG (default), PNG only, or SVG only
- PNG size: width and height in pixels (default 512). The PNG is always exactly this size. Modules are whole pixels, so the code stays sharp; any leftover pixels widen the border evenly on all sides. The SVG uses the same module size and scales to any size in print.
- Error correction level: L, M (default), Q or H. The QR Code standard lets a code be read with about 7%, 15%, 25% or 30% of it damaged or covered, in that order. Higher levels make denser codes. The level you choose is the level you get.
- Quiet zone: the blank border, in modules (default 4, the width the QR Code standard asks for). Set 0 to remove it.
- Code color and background color: any CSS color, such as `#000000`, `navy` or `#fde68a`
- Transparent background for placing codes over your own artwork

### Output

Dataset: one item per entry with `content`, `pngUrl` and `svgUrl` (download links), `pngKey` and `svgKey` (file names in the key value store), `version` (the QR version, 1 to 40), `errorCorrection`, `modules` (squares per side, without the quiet zone), `margin` and `pngSize`. Files are named by their position in your list and the start of the content, such as `0001-apify-com.png`.

Empty entries are skipped. An entry that cannot be encoded gets `ok: false` and an `error`, for example content too long for a QR code at the chosen level, or a PNG size too small to hold the code (the error gives the smallest size that works). One bad entry never stops the run.

### Pricing

Pay per event: one event per QR code generated. PNG and SVG of the same entry count as one code. Entries that fail are not charged. The run stops when it reaches the maximum charge you set.

### Scope and conduct

Codes are generated inside the run. Nothing is fetched from the internet and no outside service is used.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

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

One QR code per entry: a URL, plain text in any language, or any string a scanner understands, such as a Wi-Fi string (WIFI:S:Name;T:WPA;P:secret;;) or a vCard.

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

PNG for screens, documents and messaging. SVG is a vector file that scales to any size for print.

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

Width and height of the PNG in pixels. The SVG uses the nearest whole module size below it.

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

How much of the code can be damaged or covered and still scan: L about 7%, M about 15%, Q about 25%, H about 30%. Higher levels make denser codes.

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

Blank border around the code, in modules (the small squares). The QR standard asks for 4. Set 0 for no border.

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

Color of the modules, such as #000000 or navy.

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

Background color, such as #ffffff or white.

## `transparentBackground` (type: `boolean`):

Leave the background transparent. The background color is then ignored.

## Actor input object example

```json
{
  "items": [
    "https://apify.com",
    "Hello from a QR code"
  ],
  "format": "both",
  "size": 512,
  "errorCorrection": "M",
  "margin": 4,
  "darkColor": "#000000",
  "lightColor": "#ffffff",
  "transparentBackground": false
}
```

# Actor output Schema

## `results` (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": [
        "https://apify.com",
        "Hello from a QR code"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/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",
        "Hello from a QR code",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/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",
    "Hello from a QR code"
  ]
}' |
apify call examsens.ai/qr-code-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/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/naLY4Sl5MRHi0dmec/builds/3s3xuXqRxEPFuifS6/openapi.json
