QR Code Generator
Pricing
Pay per event
QR Code Generator
Generate QR codes from URLs and text strings in bulk. Supports PNG and SVG formats with configurable sizes and error correction levels. Outputs data URIs and saves images to key-value store for direct download. Ideal for marketing campaigns and product labeling workflows.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
Generate QR codes from URLs and text in bulk. Export as PNG images or scalable SVG, save them to the Apify key-value store for easy download, and push structured results to a dataset — all in one automated run.
What does it do?
QR Code Generator takes a list of URLs or text strings as input and converts each one into a QR code image. Each QR code is:
- Saved to the key-value store as a downloadable PNG or SVG file
- Pushed to the dataset as a structured record including the data URI (embeddable directly in HTML/CSS)
- Configurable in size (100–1000 px), error correction level (L/M/Q/H), and foreground/background color
The actor runs entirely server-side with no browser — it uses the well-established qrcode npm library (18M+ weekly downloads) for fast, reliable generation.
Who is it for?
📦 Product managers and marketers
Generate QR codes for product pages, landing pages, or campaign URLs in bulk. No need to open a browser tool for each one — submit a list and download all files at once.
🛒 E-commerce teams
Create QR codes for product listings, invoice links, or loyalty program URLs automatically within your data pipeline.
🏗 Developers and automation engineers
Integrate QR code generation into a Zapier workflow, Make scenario, or custom API pipeline. Use the dataset output (data URIs) to embed QR codes directly in HTML emails or web pages without separate image hosting.
🖨 Print and signage production
Generate large batches of QR codes for menus, event tickets, packaging labels, or venue signage with custom sizes and error correction levels optimized for print.
📊 Data teams and analysts
Automate QR code creation as part of a larger Apify workflow: scrape URLs from a website, pipe them here, and export the resulting QR codes — all without writing custom code.
Why use this actor?
- Bulk processing — encode dozens or hundreds of items in a single run
- Two export formats — PNG for print/email, SVG for web (resolution-independent, infinitely scalable)
- Data URI output — embed QR codes directly in HTML without external image hosting:
<img src="data:image/png;base64,..."> - Key-value store download — each QR code file is available via the Apify API as a downloadable binary file
- Custom colors — set dark/light module colors in hex to match your brand
- Error correction control — choose the recovery level appropriate for your use case (logos over QR? Use H)
- No browser required — fast, low-cost, pure server-side generation
What data does it extract?
Each dataset item contains the following fields:
| Field | Type | Description |
|---|---|---|
input | string | The original text/URL that was encoded |
format | string | Output format: png or svg |
size | integer | Image size in pixels (PNG only; SVG is always scalable) |
errorCorrectionLevel | string | Error correction level used: L, M, Q, or H |
kvStoreKey | string | Key in the Apify key-value store where the image file is saved |
qrCodeUrl | string | Base64 data URI — embed directly in HTML: <img src="..."> |
error | string or null | Error message if generation failed; null on success |
How much does it cost to generate QR codes in bulk?
QR Code Generator uses pay-per-event pricing — you only pay for what you use.
| Event | Price |
|---|---|
| Actor start | $0.01 (one-time per run) |
| Per QR code generated | $0.001 |
Examples:
- 10 QR codes: $0.01 + 10 × $0.001 = $0.02
- 100 QR codes: $0.01 + 100 × $0.001 = $0.11
- 500 QR codes: $0.01 + 500 × $0.001 = $0.51
The Apify free plan includes $5 of free usage per month — enough for approximately 490 QR codes at no cost.
There are no additional proxy or compute surcharges — QR generation is purely computational and requires no web requests.
How to use QR Code Generator
Step 1 — Prepare your input list
Collect all the URLs or text strings you want to encode. These can be product page links, marketing URLs, text labels, Wi-Fi credentials (WIFI:S:MyNetwork;T:WPA;P:password;;), contact cards (vCard format), or any UTF-8 text.
Step 2 — Configure the actor
Open the actor in Apify Console and fill in:
- URLs or text to encode — paste your list (one item per line in the UI)
- Output format — choose PNG (default) or SVG
- Size — set 300px for standard use, 600px for print-quality output
- Error correction level — use M (default) for most cases; use H if you plan to overlay a logo on the QR code
Step 3 — Run the actor
Click Run. The actor processes all inputs, generates QR codes, and stores results.
Step 4 — Download your QR codes
- Go to the Key-Value Store tab in the run detail to download individual PNG/SVG files
- Go to the Dataset tab to view the structured output with data URIs
- Use the Apify API to retrieve files programmatically (see API section below)
Step 5 — Embed or use the QR codes
Use the qrCodeUrl field (a base64 data URI) to embed QR codes directly:
<img src="data:image/png;base64,iVBORw0KGgo..." alt="QR Code" width="200" />
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
texts | array of strings | Yes | — | URLs or text strings to encode as QR codes |
format | string | No | png | Output format: png or svg |
size | integer | No | 300 | Image width/height in pixels (PNG only). Range: 100–1000 |
errorCorrectionLevel | string | No | M | Error correction: L (7%), M (15%), Q (25%), H (30%) |
darkColor | string | No | #000000 | Hex color for dark QR modules (PNG only) |
lightColor | string | No | #ffffff | Hex color for QR background (PNG only) |
Error correction levels explained
| Level | Recovery | Use case |
|---|---|---|
| L | 7% | Simple URLs, clean print environments |
| M | 15% | General purpose (recommended default) |
| Q | 25% | Environments with potential smudging or wear |
| H | 30% | When overlaying a logo or icon on the QR code |
Higher error correction = slightly larger/denser QR code but more robust scanning.
Output example
{"input": "https://apify.com","format": "png","size": 300,"errorCorrectionLevel": "M","kvStoreKey": "qr-1-https-apify-com","qrCodeUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAE...","error": null}
The kvStoreKey can be used to construct a direct download URL:
https://api.apify.com/v2/key-value-stores/{STORE_ID}/records/{KEY}
Tips for best results
- For print use — set size to 600px or higher and use error correction level Q or H for durability
- For web embedding — SVG format is preferred as it scales without pixelation
- For logos on QR codes — always use error correction level H (30% recovery) so the QR still scans with a logo overlay
- Wi-Fi QR codes — use the format:
WIFI:S:NetworkName;T:WPA;P:YourPassword;; - vCard QR codes — use standard vCard 3.0 format for maximum scanner compatibility
- Custom colors — ensure sufficient contrast between dark and light colors; avoid light-on-light or dark-on-dark combinations
- Large batches — the actor processes items sequentially; runs of 100+ items may take a minute or two
- Data URI embedding — the
qrCodeUrlfield works directly in<img src="...">HTML attributes with no additional hosting required
Integrations
Zapier — auto-generate QR codes for new form submissions
Use the Apify Zapier integration to trigger QR Code Generator whenever a new form response arrives in Typeform or Google Forms. Map the submission URL to the texts input, then send the generated qrCodeUrl back to the form platform or email it to the submitter.
Make (Integromat) — product page QR batch
In a Make scenario: pull product URLs from a Google Sheet → run QR Code Generator → write the qrCodeUrl data URIs back to the sheet. No external image storage needed.
Apify workflows — scrape-then-encode pipeline
Chain with another Apify actor: run a web scraper to collect landing page URLs, then pipe the results into QR Code Generator to produce QR codes for each scraped URL. Use the Apify dataset-to-dataset chaining pattern.
n8n — automated QR generation for CMS content
Use n8n's Apify node to call QR Code Generator whenever new content is published in your CMS (e.g., WordPress or Contentful). Store the resulting data URIs as custom fields on the content record.
Google Sheets + Apify API
Use =IMAGE("data:image/png;base64,...") in Google Sheets to display QR codes directly in cells by fetching the qrCodeUrl from the dataset via the Apify API.
API usage
Run this actor programmatically using the Apify API. Replace YOUR_API_TOKEN with your token from Apify Console settings.
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/qr-code-generator').call({texts: ['https://apify.com', 'https://example.com'],format: 'png',size: 300,errorCorrectionLevel: 'M',});const { items } = await client.dataset(run.defaultDatasetId).listItems();for (const item of items) {console.log(`QR for ${item.input}: ${item.kvStoreKey}`);}
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("automation-lab/qr-code-generator").call(run_input={"texts": ["https://apify.com", "https://example.com"],"format": "png","size": 300,"errorCorrectionLevel": "M",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(f"QR for {item['input']}: {item['kvStoreKey']}")
cURL
curl -X POST \"https://api.apify.com/v2/acts/automation-lab~qr-code-generator/runs?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"texts": ["https://apify.com", "https://example.com"],"format": "png","size": 300,"errorCorrectionLevel": "M"}'
To retrieve results after the run completes:
# Get dataset itemscurl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN"# Download a specific QR code imagecurl "https://api.apify.com/v2/key-value-stores/STORE_ID/records/qr-1-https-apify-com" \-o qr-code.png
Use with Claude AI (MCP)
This actor is available as a tool in Claude AI through the Model Context Protocol (MCP). Add it to Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com"
Setup for Claude Desktop, Cursor, or VS Code
Add this to your MCP config file:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
Example prompts
- "Generate QR codes for these 5 product URLs as 600px SVGs with high error correction for print: [list]."
- "Create a QR code for my Wi-Fi network: SSID=HomeNetwork, password=secret123, encryption=WPA."
- "Generate a PNG QR code for https://example.com at 300px and give me the base64 data URI to embed in HTML."
Learn more in the Apify MCP documentation.
Legal and terms of use
QR Code generation is a purely computational process — this actor does not scrape any website or access any third-party service. All processing happens locally within the Apify actor environment.
- No third-party APIs are called
- No web requests are made during QR code generation
- Input data is processed in-memory and not stored beyond the actor run
- Generated QR codes and their data remain in your Apify account's storage
The actor is subject to Apify's Terms of Service. Users are responsible for ensuring that content encoded into QR codes complies with applicable laws and platform policies.
FAQ
Q: What text/URL length is supported?
A: The qrcode library supports QR codes up to approximately 7,089 numeric characters or 4,296 alphanumeric characters depending on the error correction level. For longer URLs, higher error correction levels reduce the maximum payload capacity.
Q: Can I use custom colors for my brand?
A: Yes — use the darkColor and lightColor fields with hex color codes. This applies to PNG output only; SVG output uses the qrcode library's default colors. Ensure sufficient contrast (at least 3:1 ratio) for reliable scanning.
Q: Why does my QR code not scan reliably when printed? A: Increase the error correction level to Q or H, and make sure the printed size is at least 2cm × 2cm. Also ensure the printer output has good contrast — avoid printing on colored or textured paper without adjusting colors.
Q: How do I embed the QR code in an HTML email?
A: Use the qrCodeUrl field directly as the src of an <img> tag. Most email clients (Gmail, Outlook, Apple Mail) support base64 data URIs in image tags. Example: <img src="data:image/png;base64,..." width="200" height="200" />.
Q: The actor returned error: null but the KV store file is missing. What happened?
A: This should not occur in normal operation. If it does, check that the actor run completed successfully (status SUCCEEDED) and that the key-value store was not purged. Purging local storage before a run is expected behavior in development — on Apify cloud, storage persists after the run.
Q: Can I generate QR codes with a logo in the middle? A: This actor does not overlay logos. However, you can download the PNG output and overlay a logo using an image editing tool or another automation step. When doing so, always use error correction level H (30%) so the QR code remains scannable after the logo covers part of it.
Q: The SVG output size field shows 0 — is that correct?
A: Yes. SVG is a vector format and has no fixed pixel size — it scales to any dimension. The size field is only meaningful for PNG output. The actor sets size: 0 for SVG to indicate this.
Related tools from automation-lab
- Base64 Converter — encode/decode strings to Base64 in bulk
- Canonical URL Checker — verify canonical URL tags on web pages
- Broken Link Checker — find and report broken links on any website
- Robots & Sitemap Analyzer — analyze robots.txt and sitemap files