QR Code Generator API: Barcodes, EAN-13, SVG, PNG, PDF avatar

QR Code Generator API: Barcodes, EAN-13, SVG, PNG, PDF

Pricing

from $0.43 / 1,000 code generateds

Go to Apify Store
QR Code Generator API: Barcodes, EAN-13, SVG, PNG, PDF

QR Code Generator API: Barcodes, EAN-13, SVG, PNG, PDF

Bulk QR codes (URL, vCard, Wi-Fi, text) and barcodes (EAN-13, UPC-A, Code 128, DataMatrix) as SVG, PNG or PDF with colors, logo, URLs and a ZIP. No API key, no login. MCP-ready for Claude, Cursor, ChatGPT and AI agents. Pay per result, errors and duplicates are free. $0.50 per 1,000 codes.

Pricing

from $0.43 / 1,000 code generateds

Rating

0.0

(0)

Developer

ABM

ABM

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

21 hours ago

Last modified

Share

QR Code Generator API: Bulk QR Codes & Barcodes (EAN-13, Code 128, DataMatrix)

Price: $0.50 per 1,000 codes ($0.0005 per generated file). Pay per result, no monthly rental. Invalid inputs, duplicates and failed items are listed with a clear message and are never charged.

Generate thousands of QR codes and barcodes in one run, from a JSON list or a simple list of lines. Each code is saved as an SVG, PNG or PDF file in the run's key-value store. The dataset gives you one row per code with its public URL, and every file is also bundled into one ZIP.

  • QR codes: URL, plain text, vCard contact, Wi-Fi login, email, phone call, SMS, geo location
  • Barcodes: EAN-13, EAN-8, UPC-A, Code 128, Code 39, ITF (Interleaved 2 of 5), DataMatrix
  • Styling: foreground and background colors (or transparent), center logo for QR codes, error correction level (L/M/Q/H), module size, bar size, quiet zone, human-readable text under barcodes
  • Validation: EAN/UPC check digits are computed if you leave them out, and verified if you include them. A wrong check digit is reported, never silently changed.
  • No API key, no login, no external website: everything is computed by the actor, so nothing breaks when a third-party site changes. Static codes: they never expire and do not go through a redirect service.
  • MCP-ready: Claude, Cursor, ChatGPT and other AI agents can call it and get back file URLs.

How much does it cost?

CodesPrice
1$0.0005
1,000$0.50
10,000$5
100,000 (maximum per run)$50

Only codes whose file was stored and delivered in the dataset are charged (code-generated event). Errors, duplicates of an earlier item in the same run, and the ZIP file are free. If you set a maximum cost per run, the actor stops cleanly when it is reached and never delivers uncharged extras.

How to use

  1. Add your codes to Codes to generate (JSON), or paste one value per line into Quick list and pick a Default type.
  2. Pick the file format and, if you want, colors and a logo URL.
  3. Run it. Then download the files from the dataset (fileUrl) or get everything at once from codes.zip.

Input example

{
"items": [
{ "type": "url", "data": "https://example.com", "fileName": "homepage" },
{ "type": "wifi", "ssid": "Guest-WiFi", "password": "welcome2024", "security": "WPA" },
{ "type": "vcard", "name": "Jane Doe", "phone": "+33612345678", "email": "jane@example.com", "organization": "Example Inc.", "title": "CEO", "website": "https://example.com" },
{ "type": "email", "to": "hello@example.com", "subject": "Hello" },
{ "type": "sms", "phone": "+33612345678", "message": "I want the promo" },
{ "type": "geo", "lat": 48.8584, "lng": 2.2945 },
{ "type": "ean13", "data": "590123412345" },
{ "type": "code128", "data": "SKU-000123", "format": "pdf" },
{ "type": "datamatrix", "data": "LOT 2026-10 / SN 4815162342" }
],
"format": "png",
"foregroundColor": "#1a237e",
"backgroundColor": "#ffffff",
"errorCorrection": "M",
"logoUrl": "https://example.com/logo.png",
"logoSizeRatio": "0.22",
"moduleSize": 10
}

Quick list (one code per line):

{
"dataLines": ["https://example.com/p/1", "https://example.com/p/2", "https://example.com/p/3"],
"defaultType": "url",
"format": "svg"
}

Item fields

FieldUsed forNotes
typeallurl (default), text, vcard, wifi, email, phone, sms, geo, ean13, ean8, upca, code128, code39, itf, datamatrix
dataallValue to encode. Fields of structured types can also go inside data as an object
ssid, password, security (WPA/WEP/nopass), hiddenwifi
name or firstName/lastName, phone, workPhone, email, organization, title, website, street, city, region, zip, country, notevcardvCard 3.0, UTF-8 (accents and non-Latin names work)
to, subject, bodyemailmailto: link
phone, messagesms
lat, lnggeoor data: "48.8584,2.2945"
fileName, format, foregroundColor, backgroundColor, errorCorrection, logoUrlallPer-item overrides

Output example

One dataset row per code:

{
"index": 1,
"type": "url",
"format": "svg",
"input": "https://example.com",
"status": "success",
"encodedData": "https://example.com",
"fileKey": "00001-url.svg",
"fileUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/00001-url.svg",
"contentType": "image/svg+xml",
"fileSizeBytes": 3105,
"widthPx": 290,
"heightPx": 290,
"modules": "21x21",
"errorCorrection": "M",
"qrVersion": 1,
"humanReadableText": null,
"foregroundColor": "#000000",
"backgroundColor": "#ffffff",
"hasLogo": false,
"errorMessage": null
}

A rejected item (not charged):

{
"index": 2,
"type": "ean13",
"format": "svg",
"input": "5901234123458",
"status": "error",
"errorMessage": "EAN-13 \"5901234123458\" has a wrong check digit (expected 7)."
}

An identical request already generated in the same run gets "status": "duplicate" with the first file's fileUrl, and is not charged.

The key-value store also has codes.zip (every file) and OUTPUT (generated, failed, requested, stoppedByBudget, zipUrl).

Use cases

1. Retail: EAN-13 labels for a new product range

A category manager receives 400 new GTINs from GS1 and needs print-ready barcodes for packaging and shelf labels. The check digits are verified, so a typo in the spreadsheet is caught before printing.

Input:

{ "dataLines": ["590123412345", "4006381333931", "3017620422003"], "defaultType": "ean13", "format": "pdf", "barHeight": 120 }

Output (extract):

[{ "index": 1, "status": "success", "humanReadableText": "5901234123457", "fileUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/00001-ean13.pdf" }]

Next: the designer drops the PDFs (vector, one per product) into the packaging artwork. 400 codes = $0.20.

2. Marketing: one tracked QR code per flyer channel

A growth marketer prints 1,200 door-hanger flyers for 60 neighbourhoods and wants one UTM link per neighbourhood to measure response in analytics.

Input:

{
"items": [
{ "type": "url", "data": "https://shop.example.com/?utm_source=flyer&utm_campaign=oct&utm_content=lyon-3", "fileName": "lyon-3" },
{ "type": "url", "data": "https://shop.example.com/?utm_source=flyer&utm_campaign=oct&utm_content=lyon-6", "fileName": "lyon-6" }
],
"format": "svg", "foregroundColor": "#1a237e", "logoUrl": "https://example.com/logo.png", "fileNamePrefix": "flyer-oct"
}

Output (extract):

[{ "index": 1, "status": "success", "fileKey": "flyer-oct-lyon-3.svg", "errorCorrection": "Q", "hasLogo": true }]

Next: the print shop gets codes.zip; each neighbourhood's scans show up separately in analytics. 60 codes = $0.03.

3. Hospitality: Wi-Fi and contact QR codes for every room

A hotel operations manager prints a Wi-Fi QR code card for 85 rooms (one network per floor) and a vCard for the front desk.

Input:

{
"items": [
{ "type": "wifi", "ssid": "Hôtel-Étage-1", "password": "bienvenue-2026", "security": "WPA", "fileName": "wifi-floor-1" },
{ "type": "vcard", "name": "Réception Hôtel du Parc", "phone": "+33140000000", "email": "contact@hotel.example" }
],
"format": "png", "moduleSize": 12
}

Output (extract):

[{ "index": 1, "status": "success", "encodedData": "WIFI:T:WPA;S:Hôtel-Étage-1;P:bienvenue-2026;;", "widthPx": 396 }]

Next: guests join the Wi-Fi by scanning, without typing the password. 86 codes = $0.04.

Other uses: Code 128 for warehouse bins and shipping labels, DataMatrix for lot and serial numbers on small parts, vCard QR codes on attendee badges.

API examples

Python:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("<username>/qr-barcode-generator").call(run_input={
"dataLines": ["https://example.com/a", "https://example.com/b"],
"format": "png",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["status"], row["fileUrl"])

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('<username>/qr-barcode-generator').call({
items: [{ type: 'ean13', data: '590123412345' }],
format: 'svg',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((r) => r.fileUrl));

Integrations (Make, Zapier, n8n, Google Sheets)

Example automation with n8n or Make: a new row in a Google Sheet (product name + GTIN) triggers "Run Actor" with {"items": [{"type": "ean13", "data": "{{GTIN}}", "fileName": "{{SKU}}"}], "format": "png"}, then "Get dataset items" writes fileUrl back into the sheet, next to the product. The same works with Zapier's Apify integration, or with any HTTP client via the Apify API (run-sync-get-dataset-items returns the rows in one call).

Use with AI agents (MCP)

Through the Apify MCP server, Claude, Cursor, ChatGPT and other agents can call this actor as a tool: "make QR codes for these 20 URLs" → the agent passes dataLines and gets back the public fileUrl of each file to insert into a document, an email or a CMS. Each row is plain JSON with stable camelCase fields.

FAQ

Which format should I pick? SVG for web and professional printing (vector, tiny files). PDF to send directly to a printer (vector, one page per code). PNG when a tool only accepts images.

Can I add my logo? Yes, for QR codes: give a public PNG/JPEG/WebP/GIF URL in logoUrl. The error correction is raised automatically (Q or H), so the code still scans with the logo covering the center.

Do the codes expire? No. These are static codes: the data is stored in the code itself and does not go through a redirect service. The files stay in your Apify storage according to your retention settings. Download the ZIP to keep them forever.

Are the files public? The fileUrl links work without your API token, so anyone you share them with can open the file. Don't share the links if the codes contain private data (e.g. Wi-Fi passwords).

What if one value is invalid? That row gets status: "error" and a message, the rest of the run continues, and you are not charged for it.

What if I send the same value twice? The second one gets status: "duplicate", points to the first file, and is free. Give a different fileName if you really want two files.

Can I cap my spending? Yes. Set a maximum cost per run in Apify and the actor stops before it generates codes it could not bill. You can also set maxItems.

Can I use colored codes? Yes, but keep a dark foreground on a light background. Inverted or low-contrast codes are refused by many scanners (the log warns you).

Limits

  • Up to 100,000 codes per run (split bigger jobs into several runs).
  • QR capacity depends on the error correction level: about 2,900 bytes at level L and about 1,200 at level H. Longer data is reported as an error.
  • DataMatrix supports ASCII text only (no accents or emoji). Code 39 supports uppercase letters, digits and -. $/+%. Code 128 supports ASCII. EAN/UPC/ITF accept digits only.
  • Logos must be PNG, JPEG, WebP or GIF (no SVG logos), 5 MB maximum, and are used for QR codes only.
  • Static codes only: no dynamic QR codes that redirect, and no scan analytics.
  • The text printed under barcodes in PNG uses a standard sans-serif font; for strict OCR-B packaging requirements, use SVG/PDF and set your own font in your design tool.