← Back to Documentations

QR Code API

Generate QR codes in SVG format with custom size, color, and background.

Internet Most Popular

V1

/api/v1

First stable version.

GET /api/v1/qrcode/svg Auth Required
Generate SVG QR Code

Returns an SVG QR code for the given data. Customize size (50-1000), margin, foreground color, and background color.

Authentication
X-Api-Key: your_api_key
Query Parameters
Name Type Required Example Description
data string required https://netbioca.com The content to encode in the QR code. Max 2000 characters.
size integer optional 300 Width and height of the QR code in pixels. Min 50, max 1000. Default: 300.
margin integer optional 1 Quiet zone margin around the QR code. Min 0, max 20. Default: 1.
color string optional #000000 Foreground color as a hex value (e.g. #1a2b3c). Default: #000000.
background string optional #ffffff Background color as a hex value (e.g. #ffffff). Default: #ffffff.
Request Example
GET /api/v1/qrcode/svg?data=https://netbioca.com&size=300&color=%23000000&background=%23ffffff
Response Example
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="300" height="300" viewBox="0 0 300 300">...</svg>
Error Response
{
    "success": false,
    "message": "The data field is required.",
    "error_code": "VALIDATION_ERROR"
}