QR Code Generator API
Generate QR codes programmatically with a simple REST API. Included with all paid subscriptions.
GET https://api.useqrkit.com/v1/qr?text=https://example.com&size=300Quick start
Get Started in 60 Seconds
Make a Request
The simplest way to generate a QR code is a single GET request. Use your API key to authenticate requests.
curl "https://api.useqrkit.com/v1/qr?text=https://example.com&size=300" \
--output qr-code.pngCustomize Your Code
Add parameters to change size, colors, error correction, and logo:
https://api.useqrkit.com/v1/qr?text=https://example.com&size=400&dark=1a73e8&light=ffffff&ecLevel=H&logo=https://example.com/logo.pngChoose Your QR Type
Set the type parameter to generate WiFi, vCard, SMS, or other QR code types. The API handles the correct data encoding automatically.
https://api.useqrkit.com/v1/qr?type=wifi&text=SSID:MyNetwork;PASSWORD:secret123;ENCRYPTION:WPA&size=300Try it
API Playground
Build your QR code generator API request interactively. Adjust the parameters below and copy the generated URL or cURL command directly into your project.
Generated API Request
https://api.useqrkit.com/v1/qr?text=https%3A%2F%2Fexample.comcurl "https://api.useqrkit.com/v1/qr?text=https%3A%2F%2Fexample.com" \
-H "Authorization: Bearer YOUR_API_KEY" \
--output qr-code.pngQR types
QR Code Types
| Type | Parameter | Example text Format | Use Case |
|---|---|---|---|
| URL | type=url | https://example.com | Website links, landing pages |
| WiFi | type=wifi | SSID:Name;PASSWORD:pass;ENCRYPTION:WPA | Guest WiFi access |
| vCard | type=vcard | FN:John Doe;TEL:+1234567890;EMAIL:john@example.com | Contact cards, employee badges |
| SMS | type=sms | +1234567890:Hello from our app | Customer support, feedback |
type=email | support@example.com:Subject:Body text | Contact links | |
| Location | type=location | 40.7484,-73.9857:Empire State Building | Store locations, event venues |
| App Download | type=app | IOS:https://apps.apple.com/...;ANDROID:https://play.google.com/... | App install prompts |
| Plain Text | type=text | Any text string | Asset tags, serial numbers |
Each type is automatically encoded using the correct protocol (WIFI:, BEGIN:VCARD, sms:, mailto:, geo:, etc.).
How it works
What Is a QR Code API?
A QR code generator API lets developers generate QR codes programmatically through HTTP requests instead of using a manual web-based QR code generator. You send a request with your data and customization parameters, and the API returns a QR code image or data URI.
This is essential when QR codes need to be generated dynamically — inside a web application, mobile app, automated workflow, or print pipeline. Rather than manually creating each code, the API integrates directly into your existing systems and generates codes on demand.
Common use cases for a QR code API include generating unique codes for e-commerce order confirmations, embedding QR codes in automated emails, adding dynamic codes to invoices and shipping labels, and integrating QR-based authentication into mobile applications. For non-developers who need batch generation without code, the bulk QR code generator creates hundreds of codes from a CSV or Excel file.
QRKIT's API supports both static and dynamic QR codes. Static codes encode data permanently, while dynamic QR codes use a redirect URL that can be changed anytime, with scan analytics tracking. Dynamic codes never expire as long as your subscription is active.
Common Integration Patterns
E-Commerce & Receipts
Generate a unique QR code for every order confirmation, receipt, or return label. Customers scan to track shipments, access digital receipts, or initiate returns — all without typing a URL.
Marketing & Print Campaigns
Embed QR codes in automated email campaigns, direct mail, or packaging. Use dynamic codes so you can update the destination after printing and track every scan with analytics.
Document Generation
Add QR codes to invoices, shipping labels, event tickets, and certificates during PDF generation. The API returns images in PNG, SVG, or PDF format for pixel-perfect embedding in any document pipeline.
Authentication & Access Control
Generate one-time QR codes for two-factor authentication, event check-in, or temporary access passes. Pair with password-protected QR codes for an additional security layer.
API reference
API Parameters
Core Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | — | Content to encode in the QR code |
type | string | No | url | QR type: url, wifi, vcard, sms, email, location, app, text |
size | integer | No | 300 | Image width/height in pixels (50–2000) |
format | string | No | png | Output format: png, svg, pdf, base64 |
margin | integer | No | 4 | Quiet zone width in modules (0–10) |
ecLevel | string | No | M | Error correction: L (7%), M (15%), Q (25%), H (30%) |
Design Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
dark | hex string | 000000 | Foreground color |
light | hex string | ffffff | Background color |
logo | string | — | Logo image URL or Base64 data URI |
logoSize | float | 0.25 | Logo size as fraction of QR code (0.1–0.4) |
caption | string | — | Text displayed below the QR code |
Authentication
| Parameter | Type | Description |
|---|---|---|
key | string | API key (required for all API requests) |
Error Handling & Response Codes
The API returns standard HTTP status codes. Successful requests return the QR code image directly. Errors return a JSON body with a message field describing the issue.
| Status | Meaning | Common Cause |
|---|---|---|
200 | Success | QR code returned as image or data URI |
400 | Bad Request | Missing or invalid parameter (e.g. empty text, size out of range) |
401 | Unauthorized | Missing or invalid API key |
429 | Rate Limit Exceeded | Daily request quota exceeded — check X-RateLimit-Remaining header |
500 | Server Error | Internal error — retry with exponential backoff |
{
"error": {
"code": 400,
"message": "Parameter 'text' is required",
"details": "The text parameter must be a non-empty string"
}
}Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Use these to implement client-side throttling and avoid hitting your daily quota.
Client libraries
Official SDKs & Libraries
While you can call the QR code generator API directly via HTTP, QRKIT also provides official client libraries that wrap the REST endpoints with idiomatic methods. Whether you need a QR code generator API for Python, JavaScript, PHP, or Go — install the library for your stack and start generating QR codes in a few lines of code.
# Install: pip install useqrkit
from useqrkit import QRKIT
client = QRKIT(api_key="YOUR_API_KEY")
# Generate a simple URL QR code
qr = client.generate(
text="https://example.com",
size=400,
format="png"
)
# Save to file
with open("qr-code.png", "wb") as f:
f.write(qr.content)
# Generate a WiFi QR code
wifi_qr = client.generate(
text="SSID:Office;PASSWORD:secret;ENCRYPTION:WPA",
type="wifi",
size=300,
dark="1a73e8"
)All libraries support the full API surface including dynamic QR code creation, destination updates, and scan analytics retrieval. Each package includes TypeScript/type definitions, comprehensive error handling, and automatic retry logic for transient failures.
Dynamic codes
Dynamic QR Codes
QRKIT's dynamic QR code generator API goes beyond static codes. Dynamic QR codes use a short redirect URL — so you can update the destination anytime without reprinting the physical code. Create, update, and track codes programmatically through the REST API.
Create a dynamic QR code
curl -X POST "https://api.useqrkit.com/v1/qr/dynamic" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "https://example.com/promo", "size": 300}'Update the destination
curl -X PUT "https://api.useqrkit.com/v1/qr/abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"text": "https://example.com/new-promo"}'Retrieve scan analytics
curl "https://api.useqrkit.com/v1/qr/abc123/scans" \
-H "Authorization: Bearer YOUR_API_KEY"{
"total_scans": 1247,
"unique_scans": 893,
"scans_by_day": [...],
"top_countries": [...],
"top_devices": [...]
}Dynamic QR codes require an API key and a paid plan. All scan data is available both through the API and the QRKIT dashboard.
Pricing
API Access & Rate Limits
API access is included with every paid subscription — no separate API add-on or per-request fees. Your plan determines your daily request quota:
Starter
5,000
requests / day
Pro
50,000
requests / day
Enterprise
Custom
dedicated limits
All plans include the full API feature set: static and dynamic QR codes, all 8 QR types, PNG/SVG/PDF/Base64 output, logo overlays, custom colors, and scan analytics. See pricing plans for full details and current rates.
Migration
Migrating from Google Image Charts QR API
Google deprecated its Image Charts API (including QR code generation) in 2019. If you're still using chart.googleapis.com URLs, you can migrate to QRKIT with minimal changes.
Before (Google Image Charts)
https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=Hello+WorldAfter (QRKIT API)
https://api.useqrkit.com/v1/qr?text=Hello+World&size=200The URL structure is simpler and the QR code generator API is actively maintained. QRKIT also supports features Google's API never offered: custom colors, logo overlays, multiple output formats, and dynamic QR codes with scan analytics.
QR Code API — Frequently Asked Questions
Get started
Start Building with
the QR Code Generator API
Integrate the QR code generator API into your application and generate static and dynamic QR codes on demand. API access is included with all paid subscriptions.
