QR Code API for Apps, Automation & Dynamic Workflows

Generate QR codes from your own app with API keys, usage limits, file responses, saved codes, dynamic options, and tracking support for product or print automation at scale.

Free QR code generator

Create a QR code online

Generate QR codes for websites, email, phone numbers, vCards, Wi-Fi, plain text, forms, PDF files, and campaign links. Customize colors, add a logo or frame, then download a print-ready PNG or SVG.

1

Choose QR code type

Website QR code, Email QR code, Phone QR code, vCard QR code, Wi-Fi QR code, Text QR code, SMS, WhatsApp, event, and download links.

2

Add your content

Enter your website URL, contact details, message, phone number, location, or file destination before generating the QR code.

3

Customize and download

Adjust QR colors, error correction, logo, frame, size, and margin. Generate QR Code, Download PNG, Download SVG, or Save and track scans.

Generate QR CodeDownload PNGDownload SVGDynamic QR trackingScan analytics

API documentation

Generate QR codes from your app with one authenticated request

Use the QR Code Lab API when your product, CRM, ecommerce flow, internal tool, or print workflow needs to create QR codes automatically instead of asking a person to copy settings into the dashboard.

EndpointPOST /api/qr/api/generate
AuthenticationSend x-api-key header or apiKey query parameter.
Default responseJSON with QR data URL, metadata, config, output format, and size.
File responseSet response: "file" to receive PNG, JPG, SVG, or PDF bytes.

Request body

ParameterTypeRequiredAllowed valuesDescription
datastringYesURL, text, email, phone, vCard, Wi-Fi stringMain QR content. Use this field for new integrations.
textstringNoAny text payloadAlternative QR content field when data is not provided.
titlestringNoShort titleName for saved QR codes and generated filenames.
typestringNourl, text, email, phone, vcard, wifi, api, customSemantic QR type stored with saved records.
savebooleanNotrue, falseWhen true, saves a trackable QR code with analytics.
responsestringNojson, fileChoose JSON metadata or direct binary output.
downloadbooleanNotrue, falseFor file responses, controls attachment versus inline delivery.
sizenumberNo400-1000Output width and height in pixels.
filestringNopng, jpg, jpeg, svg, pdfOutput format. JPEG is normalized to JPG.

Design config and QR options

config.bodyQR module style: square, dots, rounded, mosaic, classy, plus, cross, star, heart, dash, vertical.
config.eyeFinder frame style: square, rounded, circle, dotted, none, and frame variants.
config.eyeBallInner finder style: square, circle, rounded, diamond, star, or heart.
config.bodyColorForeground hex color for the main QR modules.
config.bgColorBackground color. Keep it light for reliable scanning.
config.logoPreset logo path or image data URL.
options.errorCorrectionLevelL, M, Q, or H. Use H when placing a logo in the center.
options.marginQuiet zone around the QR, measured in modules.

API keys, request limits, saved QR limits, and paid usage behavior depend on your current account plan and available balance.

API examples

Copy-ready examples for common QR Code API responses

Start with JSON while integrating, then switch to a file response when your workflow needs a downloadable QR image or PDF.

cURL: JSON response with base64 QR

curl -X POST https://qr-code-lab.com/api/qr/api/generate \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "data": "https://example.com",
    "save": false,
    "response": "json",
    "size": 800,
    "file": "png",
    "config": {
      "body": "dots",
      "eye": "frame-rounded",
      "eyeBall": "ball-circle",
      "bodyColor": "#111111",
      "bgColor": "#ffffff"
    }
  }'

cURL: binary PNG download

curl -X POST https://qr-code-lab.com/api/qr/api/generate \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --output qr-code.png \
  -d '{
    "data": "https://example.com",
    "save": true,
    "response": "file",
    "download": true,
    "size": 1000,
    "file": "png"
  }'

Node.js fetch

const response = await fetch("https://qr-code-lab.com/api/qr/api/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_API_KEY"
  },
  body: JSON.stringify({
    data: "https://example.com",
    save: true,
    response: "json",
    size: 800,
    file: "png",
    config: {
      body: "rounded",
      bodyColor: "#111111",
      bgColor: "#ffffff",
      logoSize: 0.2
    }
  })
});

const result = await response.json();
console.log(result.qr || result.dataUrl);

Python requests

import requests

response = requests.post(
    "https://qr-code-lab.com/api/qr/api/generate",
    headers={
        "Content-Type": "application/json",
        "x-api-key": "YOUR_API_KEY",
    },
    json={
        "data": "https://example.com",
        "save": True,
        "response": "json",
        "size": 800,
        "file": "png",
        "config": {
            "body": "dots",
            "bodyColor": "#111111",
            "bgColor": "#ffffff",
        },
    },
)

print(response.json())

API workflow choice

Choose the QR API setup by what your app has to create and control

API setup

A QR Code API workflow is useful when codes must be generated from products, users, campaigns, tickets, labels, documents, or internal systems instead of one at a time in a browser.

Open

URL QR code

Use for websites, landing pages, menus, product pages, portfolios, booking pages, and campaign pages.

Best dynamic when links may change
Download

PDF / File QR code

Use for menus, manuals, worksheets, bonus materials, brochures, certificates, ZIP archives, and checklists.

Dynamic is safer for print
Save

vCard QR code

Use for business cards, badges, counters, portfolios, sales materials, and follow-up contact details.

Static opens native contact save
Connect

Wi-Fi QR code

Use for cafes, hotels, offices, classrooms, venues, rental spaces, and guest networks.

Usually best as static
Submit

Form QR code

Use for feedback, registrations, quote requests, surveys, support requests, applications, and check-in.

Dynamic helps forms evolve
Message

WhatsApp / messaging QR

Use when the next step is a conversation: support, sales, booking, delivery questions, or consultation.

Prefilled messages reduce friction
Navigate

Maps QR code

Use for venues, offices, stores, events, pickup points, property listings, booths, and meeting locations.

Great for physical destinations
Follow

Social QR code

Use for Instagram, TikTok, YouTube, X, LinkedIn, Behance, creator pages, and community profiles.

Best when relationship continues
Pay

Payment link QR code

Use for invoices, tips, donations, event payments, deposits, checkout pages, and payment requests.

Make amount and context clear

Native action?

Wi-Fi, vCard, email, phone, and SMS often work best when the action is encoded directly, especially if the native phone interface matters.

Editable or measurable?

Use a dynamic QR code when the destination may change, files may be replaced, campaigns need analytics, or printed material must stay useful later.

Several actions?

Use a microlanding page when one scan should offer buttons, files, contact, feedback, booking, social links, or multiple next steps.

API design starts with naming and ownership

A clean QR API workflow should define who owns destinations, how codes are named, which formats are exported, and how failed rows are handled.

After-print control

Use dynamic QR in API workflows when generated codes need life after export

Dynamic

Automated QR creation often feeds print, packaging, tickets, campaigns, classrooms, or product systems. Dynamic routing protects those generated codes when destinations change later.

Static API risk

A generated static code is still locked after export

The API can create thousands of static QR images quickly, but each image still contains a final payload.

If a product page, PDF, support URL, or campaign destination moves, the exported code cannot be fixed from the API later.

Dynamic API control

Managed links keep generated codes editable and measurable

Dynamic API creation stores a managed destination behind each code, so your system can update the target without regenerating the printed image.

It also gives reporting by code name, campaign, placement, product, branch, batch, or source when those identifiers are passed consistently.

QR Code API generating dynamic codes that keep printed exports editable after launch.

Product and packaging systems

Generate unique codes for SKUs, batches, regions, languages, manuals, warranty, support, and product education.

Campaign automation

Create tracked QR codes for channels, placements, teams, partners, events, mailers, and local ads.

Ticketing and access

Create codes for attendees, rooms, check-in flows, schedules, instructions, or post-event actions.

Internal operations

Automate labels, assets, equipment, training sheets, documents, and service workflows while keeping destinations maintainable.

Use dynamic API output when exported codes need maintenance

If the QR images will be printed, distributed, or embedded at scale, keep destinations editable and code names audit-friendly.

API reporting

Build API-generated QR analytics around names your team can read later

Analytics

API-generated codes are only useful in reports when the request includes clear campaign, product, placement, batch, branch, or source context before the codes go live.

API-generated QR codes grouped into analytics by campaign, product, placement, and source.
Unnamed exports

Thousands of generated codes can become one reporting mess

If an API job creates QR codes with generic names, scan history may exist but the team will not know which label, asset, product, or campaign produced it.

Bad naming turns analytics into cleanup work.

Structured names

Good parameters make reports useful from day one

Pass stable identifiers for product, SKU, campaign, channel, placement, team, location, or batch when the code is created.

Then scan reports can compare real business objects instead of anonymous QR records.

Scan volume

Compare generated codes by product, campaign, placement, batch, or source over the selected period.

Time and device

Review when scans happened and which device, browser, or operating system opened the destination.

Broad location

Use approximate location signals to spot regional patterns without treating them as exact customer identity.

Code comparison

Group codes by the identifiers your API sends so reporting matches the systems that generated them.

Campaign exports

Compare scans across channels, creative versions, regions, teams, and print placements.

Product labels

Review scans by SKU, batch, language, package type, store, or region.

Event operations

Compare attendee materials, booth signs, handouts, badges, rooms, or post-event follow-ups.

Support and documentation

Spot which manuals, labels, assets, or equipment tags drive help-seeking scans.

API analytics depend on creation-time metadata

Decide the naming scheme before generating codes, because reports can only compare the context you captured.

Automation fit

Design the API workflow around the data your system already owns

Start with the object that needs the QR code. For ecommerce, that may be a product, order, package insert, warranty page, reorder link, or setup guide. For SaaS, it may be an onboarding page, support flow, demo workspace, or customer resource. For agencies, it may be a repeatable campaign asset with the same brand rules and output format every time.

The API works best when the source system sends clean data. Store the destination, code name, owner, campaign, placement, output format, and any notes that will help someone understand the code later. A QR image alone is not enough context after the file has been printed, emailed, embedded in packaging, or handed to a designer.

Before producing API-generated codes at scale, keep a review step. Test a small sample, open the destinations on mobile, confirm the exported files match the print need, and use dynamic QR codes when the destination may change. Automation should reduce manual work without making mistakes harder to notice. A few checked examples can protect a much larger batch.

Related QR API workflows

QR API workflow next steps

Next

Move to a related workflow when API QR creation should become bulk generation, dynamic routing, analytics, product labels, documentation, or print-safe output.