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)