API reference
QR Code Generator & Reader API
QR code and barcode generator (PNG, SVG, logo, Wi-Fi, vCard, SEPA) plus a reader for photos.
- Host
qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com- Base path
/v1/qr- Auth
X-RapidAPI-Key,X-RapidAPI-Host- For agents
openapi.json·qr.md
Overview and pricing · Tutorial: QR Code Generator & Reader · RapidAPI playground (opens in a new tab) ↗ · Apify actor (opens in a new tab) ↗
QR Codes
QR codes of a text, URL, Wi-Fi, contact, payment or event, with colours and a logo.
Generate QR Code
GET /v1/qr/qrcode
QR code of a text or URL, as PNG or SVG. A QR code image of any text or URL, ready for an `img` tag: size, colours, quiet zone and error correction. Every code is scanned back before it is sent. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
data required |
query | string |
Text or URL to encode. |
format |
query | "png" | "svg" |
png or svg. Default png. |
output |
query | "image" | "json" |
image: the file itself. json: base64 image plus the encoded content, version and error correction. Default image. |
size |
query | integer |
Width and height in pixels (default 400). |
border |
query | integer |
Quiet zone, in modules. Default 4. |
dark |
query | string |
Hex colour (#RRGGBB, #RGB or #RRGGBBAA). Dark and light must contrast at least 3:1. Default #000000. |
light |
query | string |
Hex colour (#RRGGBB, #RGB or #RRGGBBAA) or transparent. Dark and light must contrast at least 3:1. Default #FFFFFF. |
ecc |
query | "L" | "M" | "Q" | "H" |
Error correction: L 7 %, M 15 % (default), Q 25 %, H 30 %. |
curl -G "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode" \
--data-urlencode "data=https://helenis-api.com" \
--data-urlencode "size=400" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com"
import requests
url = "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode"
params = {
"data": "https://helenis-api.com",
"size": 400
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode?data=https://helenis-api.com&size=400", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
},
});
console.log(await res.json());
Generate Custom QR Code
POST /v1/qr/qrcode
QR code of a Wi-Fi network, vCard, payment, event... with a logo. Structured QR codes phones act on: Wi-Fi login, vCard or MeCard contact, email, SMS, WhatsApp, phone call, map location, calendar event, SEPA payment (EPC, IBAN checked). Colours, transparent background, Micro QR, a logo in the centre. Scanned back before it is sent. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
type |
body | "text" | "url" | "wifi" | "vcard" | "mecard" | "email" | "sms" | "phone" | "whatsapp" | "geo" | "event" | "epc" |
What the code holds. text and url use `data`; the other types use the object of the same name (vcard and mecard: `contact`; sms and whatsapp: `message`). Default text. |
data |
body | string |
Text or URL to encode (type text or url). |
wifi |
body | object |
|
contact |
body | object |
|
email |
body | object |
|
message |
body | object |
|
phone |
body | string |
For type phone. |
geo |
body | object |
|
event |
body | object |
|
epc |
body | object |
|
format |
body | "png" | "svg" |
Default png. |
output |
body | "image" | "json" |
image: the PNG or SVG file itself. json: base64 image with the encoded content, version and error correction. Default image. |
size |
body | integer |
Width and height in pixels, quiet zone included (default 400, more for long content). |
border |
body | integer |
Quiet zone in modules. Default 4. |
dark |
body | string |
Hex colour, #RGB, #RRGGBB or #RRGGBBAA (alpha). Must contrast with the other colour (at least 3:1), dark darker than light. Default #000000. |
light |
body | string |
Hex colour, #RGB, #RRGGBB or #RRGGBBAA (alpha). Must contrast with the other colour (at least 3:1), dark darker than light. Or 'transparent'. Default #FFFFFF. |
ecc |
body | "L" | "M" | "Q" | "H" |
Error correction: L 7 %, M 15 % (default), Q 25 %, H 30 % (forced with a logo). |
micro |
body | boolean |
Micro QR code: smaller, for short content only. Default False. |
logo_url |
body | string |
Image placed in the centre (PNG, JPEG, WEBP, GIF; 5 MB max). |
logo_size |
body | number |
Logo width as a share of the code's width. Default 0.2. |
curl -X POST "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{
"type": "wifi",
"wifi": {
"ssid": "Cafe Lumiere",
"password": "croissant42"
},
"format": "png",
"size": 400
}'
import requests
url = "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode"
payload = {
"type": "wifi",
"wifi": {
"ssid": "Cafe Lumiere",
"password": "croissant42"
},
"format": "png",
"size": 400
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
const res = await fetch("https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode", {
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
"Content-Type": "application/json",
},
body: JSON.stringify({
"type": "wifi",
"wifi": {
"ssid": "Cafe Lumiere",
"password": "croissant42"
},
"format": "png",
"size": 400
}),
});
console.log(await res.json());
Barcodes
EAN, UPC, ISBN, Code 128, GS1-128, DataMatrix, PDF417, Aztec.
Generate Barcode
GET /v1/qr/barcode
EAN, UPC, Code 128, DataMatrix, PDF417, Aztec... as PNG or SVG. A barcode image for labels, packaging, tickets and shipping: EAN-13, EAN-8, UPC-A, UPC-E, ISBN, ITF-14, Code 128, GS1-128, Code 39, Code 93, ITF, Codabar, Data Matrix, GS1 DataMatrix, PDF417, Aztec. Check digits computed or verified; scanned back before it is sent. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
type required |
query | "ean13" | "ean8" | "upca" | "upce" | "isbn" | "itf14" | "code128" | "gs1_128" | "code39" | "code93" | "itf" | "codabar" | "datamatrix" | "gs1_datamatrix" | "pdf417" | "aztec" |
Symbology. EAN/UPC/ISBN/ITF-14: the check digit is computed when left out, verified when given. gs1_128 and gs1_datamatrix take AIs in brackets: (01)09506000134376(17)261231. |
data required |
query | string |
What to encode. |
format |
query | "png" | "svg" |
png or svg. Default png. |
output |
query | "image" | "json" |
image: the file itself. json: base64 image plus the encoded content, version and error correction. Default image. |
scale |
query | integer |
Pixels per module (bar width unit). Default 3 for linear barcodes, 8 for 2D codes. |
text |
query | boolean |
Print the human-readable text under linear barcodes. Default True. |
quiet_zone |
query | boolean |
Keep the blank margins scanners need. Default True. |
dark |
query | string |
Hex colour (#RRGGBB, #RGB or #RRGGBBAA). Dark and light must contrast at least 3:1. Default #000000. |
light |
query | string |
Hex colour (#RRGGBB, #RGB or #RRGGBBAA) or transparent. Dark and light must contrast at least 3:1. Default #FFFFFF. |
curl -G "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/barcode" \
--data-urlencode "type=ean13" \
--data-urlencode "data=400638133393" \
--data-urlencode "scale=3" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com"
import requests
url = "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/barcode"
params = {
"type": "ean13",
"data": "400638133393",
"scale": 3
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/barcode?type=ean13&data=400638133393&scale=3", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
},
});
console.log(await res.json());
Reader
Every QR code and barcode in a photo, decoded and parsed.
Read Codes from Image URL
POST /v1/qr/read
Find and decode every QR code and barcode in an image. Read every QR code and barcode in an image from its URL (rotated, inverted, several per image): format, text, position and parsed content (Wi-Fi, vCard, URL, payments, GS1, EAN/UPC, ISBN). 5 credits, even when no code is found.
| Parameter | In | Type | Description |
|---|---|---|---|
url required |
body | string |
Direct link to a photo, scan or screenshot: PNG, JPEG, WEBP, HEIC, GIF, BMP or TIFF, up to 20 MB. |
formats |
body | string |
Only these symbologies, comma-separated (e.g. qr_code, ean_13, code_128, data_matrix). Default: all. |
curl -X POST "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{
"url": "https://upload.wikimedia.org/wikipedia/commons/0/06/DataMatrix_code_on_a_bottle_of_milk.jpg"
}'
import requests
url = "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read"
payload = {
"url": "https://upload.wikimedia.org/wikipedia/commons/0/06/DataMatrix_code_on_a_bottle_of_milk.jpg"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
const res = await fetch("https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read", {
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://upload.wikimedia.org/wikipedia/commons/0/06/DataMatrix_code_on_a_bottle_of_milk.jpg"
}),
});
console.log(await res.json());
Read Codes from Uploaded Image
POST /v1/qr/read/upload
Decode the QR codes and barcodes of an uploaded image. Same as /read, for a file sent as multipart/form-data (field `file`).
| Parameter | In | Type | Description |
|---|---|---|---|
file required |
form | file |
Image, up to 20 MB. |
formats |
form | string |
Only these symbologies, comma-separated (e.g. qr_code, ean_13, code_128, data_matrix). Default: all. |
curl -X POST "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read/upload" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com" \
-F "file=@./my-file"
import requests
url = "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read/upload"
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
}
with open("my-file", "rb") as f:
r = requests.post(url, headers=headers, files={"file": f})
print(r.json())
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("file", new Blob([await readFile("my-file")]), "my-file");
const res = await fetch("https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/read/upload", {
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com",
},
body: form,
});
console.log(await res.json());
Response
Reading the GS1 DataMatrix printed on a milk bottle cap (POST /v1/qr/read with {"url": "https://upload.wikimedia.org/wikipedia/commons/0/06/DataMatrix_code_on_a_bottle_of_milk.jpg"}):
{
"count": 1,
"codes": [
{
"format": "data_matrix",
"format_name": "Data Matrix",
"text": "(01)04607078117294(21)5fGHNL(93)H/xN",
"content_type": "gs1",
"symbology_identifier": "]d2",
"orientation": -8,
"position": {
"top_left": { "x": 251, "y": 205 },
"top_right": { "x": 393, "y": 184 },
"bottom_right": { "x": 422, "y": 328 },
"bottom_left": { "x": 273, "y": 350 },
"box": { "x": 251, "y": 184, "width": 171, "height": 166 }
},
"parsed": {
"kind": "gs1",
"gs1": [
{ "ai": "01", "name": "GTIN", "value": "04607078117294" },
{ "ai": "21", "name": "Serial number", "value": "5fGHNL" },
{ "ai": "93", "name": "Company internal information", "value": "H/xN" }
],
"product": {
"gtin": "04607078117294",
"check_digit_valid": true,
"prefix_country": "Russia",
"restricted": false
}
}
}
],
"image": { "width": 706, "height": 710, "mime_type": "image/jpeg" }
}
From a real response. The photo is slightly rotated (orientation: -8°); the corners are in pixels of the image as it is displayed. A photo of four book covers returns its four ISBN barcodes, left to right.
Why developers pick this API
- ✅ Codes that always scan: every image is decoded back before it is returned (header
X-Code-Verified: true). A design that would not scan (logo too big, low contrast) is refused with a clear reason, never shipped, never billed. - 🧠 One API for both directions: generate and read, QR codes and barcodes, with the same parsed fields both ways.
- 💶 Payment codes done right: EPC codes are built to the EPC069-12 standard with the IBAN checksum verified, so a typo never reaches a printed invoice.
- 🖼️ Ready for an img tag: the GET endpoint returns the PNG or SVG itself;
output=jsongives base64 plus the encoded content, QR version and error correction. - ⚡ Fast and private: no AI, no third party, nothing stored. Codes in about 30 ms, photos in 0.3 to 3 s.
- 💸 75 times cheaper than the best-known QR API: $0.00008 a code on PRO ($0.006 elsewhere), and failed calls use 0 credits.
How it compares
Prices read on the public RapidAPI listings on 27 Nov 2026, cheapest paid plan.
| This API | QR Code (LinQR) | Custom QR Code with Logo | Custom QR Code (Unitag) | Aspose BarCode Cloud | |
|---|---|---|---|---|---|
| 💵 Price per QR code | $0.00008 | $0.006 | $0.045 | $0.019 | ~$0.01 |
| 🖼️ PNG and SVG | ✅ | ✅ | ✅ | — | ✅ |
| 🎨 Colours and logo | ✅ | ✅ | ✅ | ✅ | ❌ |
| 📶 Wi-Fi, vCard, SMS, geo | ✅ | ✅ | vCard | — | ❌ |
| 💶 SEPA payment (EPC) | ✅ | ❌ | ❌ | ❌ | ❌ |
| 📊 Barcodes (EAN, Code 128...) | ✅ 16 types | ❌ | ❌ | ❌ | ✅ |
| 📷 Reader with parsed fields | ✅ | ❌ | ❌ | ❌ | text only |
| ✅ Scanned back before sending | ✅ | — | — | — | — |
— = not stated on the listing.
Wi-Fi, vCard and payment QR codes
curl -X POST "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/qrcode" \
-H "X-RapidAPI-Key: YOUR_API_KEY" -H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"type": "epc", "epc": {"name": "Red Cross Belgium", "iban": "BE72000000001616", "bic": "BPOTBEB1", "amount": 25.0, "text": "Donation"}, "output": "json"}'
{
"symbology": "qr_code",
"format": "png",
"mime_type": "image/png",
"width": 400,
"height": 400,
"base64": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQ...",
"content": "BCD\n002\n1\nSCT\nBPOTBEB1\nRed Cross Belgium\nBE72000000001616\nEUR25.00\n\n\nDonation",
"version": "5",
"error_correction": "M",
"modules": 37,
"verified": true,
"warnings": []
}
From a real response, base64 shortened. Leave output out to get the PNG itself.
type |
Object to send | Example |
|---|---|---|
text, url |
data |
{"type": "url", "data": "example.com/menu"} (https:// added) |
wifi |
wifi: ssid, password, security (WPA, WEP, nopass), hidden |
{"ssid": "Cafe Lumiere", "password": "croissant42"} |
vcard, mecard |
contact: first_name, last_name, organization, title, phones, emails, website, address, birthday, note |
{"first_name": "Ada", "phones": [{"number": "+44 20 7946 0958"}]} |
email |
email: to, subject, body |
{"to": "hello@example.com", "subject": "Quote"} |
sms, whatsapp |
message: number, message |
{"number": "+44 7700 900123", "message": "Hi"} |
phone |
phone |
"+33 1 23 45 67 89" |
geo |
geo: latitude, longitude, query |
{"latitude": 48.8584, "longitude": 2.2945} |
event |
event: title, start, end, location, description |
{"title": "Launch", "start": "2026-12-10T18:30:00+01:00"} |
epc |
epc: name, iban, bic, amount (EUR), reference or text, purpose |
above |
Design options on every QR code: format (png, svg), size (32-2000 px), border (quiet zone, modules), dark and light (hex, #RRGGBBAA with alpha, or transparent), ecc (L, M, Q, H), micro (Micro QR), logo_url and logo_size (10 to 30 % of the width).
Barcodes
curl "https://qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com/v1/qr/barcode?type=ean13&data=400638133393&output=json" \
-H "X-RapidAPI-Key: YOUR_API_KEY" -H "X-RapidAPI-Host: qr-code-generator-reader-barcodes-logo-svg.p.rapidapi.com"
{
"symbology": "ean_13",
"format": "png",
"mime_type": "image/png",
"width": 339,
"height": 174,
"base64": "iVBORw0KGgoAAAANSUhEUgAAAVMAAACu...",
"content": "4006381333931",
"check_digit": "1",
"verified": true,
"warnings": []
}
From a real response, base64 shortened. Twelve digits: the check digit is computed. Thirteen: it is verified, and a wrong one is refused with the right digit (invalid_check_digit). The same goes for EAN-8, UPC-A, ISBN and ITF-14. GS1-128 and GS1 DataMatrix take their AIs in brackets: (01)09506000134376(17)271231(10)LOT42. Options: format, scale (pixels per module), text (digits under the bars), quiet_zone, dark, light.
Reader
- Input: an image URL (
/read) or an upload (/read/upload): PNG, JPEG, WEBP, GIF, BMP, TIFF or single-image HEIC, up to 20 MB and 30 megapixels (50 for JPEG). EXIF rotation is applied; transparent images are read on white. - Filter:
formats=qr_code,ean_13reads only those symbologies. - Output: each code with
format,text,bytes_base64for binary content (tickets, boarding passes),content_type,error_correction,orientation, its four corners and box, andparsed. - No code found:
countis 0 andnotesays how to take a better picture (the image was read, so the call is billed).
Errors
| Status | code |
Meaning |
|---|---|---|
| 400 | invalid_request |
Missing or malformed parameter. |
| 400 | invalid_payload |
A field of the QR payload is missing or malformed (email, phone, date...). |
| 400 | invalid_iban |
IBAN with a wrong length or checksum, or outside SEPA (EPC codes). |
| 400 | invalid_colour / low_contrast |
Not a hex colour, or colours too close for scanners (under 3:1, or dark lighter than light). |
| 400 | content_too_long / size_too_small |
Too much data for the code, or too few pixels per module. |
| 400 | unscannable |
The code did not scan back (logo too big): nothing billed. |
| 400 | invalid_data / invalid_check_digit |
Characters or length the barcode type does not allow; wrong check digit. |
| 400 | unsupported_logo |
The logo is not a PNG, JPEG, WEBP or GIF. |
| 400 | unsupported_file / image_too_large / file_too_large |
Not a readable image; too many pixels; over 20 MB. |
| 400 | invalid_format |
Unknown symbology in formats. |
| 400 | invalid_url / site_unreachable |
The image or logo URL cannot be fetched. |
| 429 | daily_limit_reached |
Daily safety limit of your plan; resets at 00:00 UTC. |
Honest limits
- A code is checked with a strong decoder on the exact image; very small prints, glossy surfaces or poor lighting can still defeat a phone camera. Keep at least 2 mm per module in print and the 4-module quiet zone.
- Static codes only: no dynamic QR codes with redirects or scan statistics.
- The reader needs a sharp, reasonably close picture: in a battery of 95 real photos (posters, packaging, tickets, books, business cards), codes were read in 65, and most misses were codes too small, blurred, cut off or deliberately pixelated. Tiled HEIC photos straight from an iPhone camera are not supported (send a JPEG).
prefix_countryis the GS1 member organisation that issued the company prefix, not the country of origin.
Use it from an AI agent
Add this MCP server and the QR Code Generator & Reader - Bulk QR Codes & Barcodes actor becomes a tool your agent can call. Works in Claude, Cursor, VS Code and any MCP client; billed per event through Apify.
https://mcp.apify.com?tools=helenisapi/qr-code-generator-reader
Prefer plain HTTP? Give your agent the OpenAPI document or the Markdown reference.