A powerful and production-ready QR Code Generator API with extensive customization options. Easily create QR codes for URLs, text, Wi-Fi credentials, emails, phone numbers, and geolocations using a single POST request. The API supports multiple output formats (png, svg, base64) and allows customization of size, colors, margin, and error correction level.
Link : https://rapidapi.com/dreamers-dev-dreamers-dev-default/api/ultimate-qr-code-generator-api
📦 Ultimate QR Code Generator API – Overview
A fast, secure, production-ready REST API for generating QR codes with powerful customization options.
> ✅ Designed to be lighter, faster, and more powerful than alternatives
> ✅ Zero database required
> ✅ Built-in caching, validation, rate-limiting, and full customization support
🚀 Endpoint
POST /generate
Generates a QR code based on the provided input and options.
📥 Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
data |
string |
✅ Yes | The content to encode (URL, text, phone, email, etc.) |
size |
number |
❌ No | Pixel size of the QR code (default: 300, min: 100, max: 2000) |
format |
string |
❌ No | Output format: png, svg, or base64 (default: png) |
foregroundColor |
string |
❌ No | QR foreground color (hex, default: #000000) |
backgroundColor |
string |
❌ No | Background color (hex, default: #ffffff) |
errorCorrectionLevel |
string |
❌ No | QR error correction level: L, M, Q, H (default: M) |
margin |
number |
❌ No | Margin around the QR code (default: 4, range: 0–20) |
📤 Example Responses
🖼️ format: base64
{
"success": true,
"format": "base64",
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"qrType": "url",
"generatedAt": "2025-07-02T22:10:23.478Z"
}
📦 format: png or svg
Returns the image directly with proper headers:
Content-Type: image/png
X-Cache: HIT
X-QR-Type: url
🧠 Smart QR Type Detection
Automatically detects and labels QR type based on content:
- ✅ URLs
- ✅ Plain Text
- ✅ Wi-Fi (
WIFI:T:WPA;S:MyNetwork;P:pass123;;) - ✅ Email addresses (
mailto:or raw email) - ✅ Phone numbers (
tel:or raw number) - ✅ Geo coordinates (
geo:lat,lon)
🔐 Built-in Protection
| Feature | Description |
|---|---|
| Rate Limiting | Protects from abuse (100 req/15 min/IP) |
| Caching | Speeds up repeat requests (stored by hash key) |
| Input Validation | Uses validator.js to sanitize and protect input |
| Helmet | Secures HTTP headers |
| CORS | Public-friendly, supports all origins |
📚 Additional Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API welcome and usage documentation |
/generate |
POST | Main QR code generation endpoint |
/health |
GET | Health check: memory, uptime, cache stats |
Top comments (0)