API Documentation

Create several Static QR Codes easily and add them to your Application.

Get started with our Live QR Code API

To get a QR code graphic as a PNG image, send our system a GET request using the following:
https://www.api.live-qr.com/_functions/
format/width/foreground_color/background_color/data

Request the following URL to test it out straight in your browser:
https://www.api.live-qr.com/_functions/png/200/000000/ffffff/RXhhbXBsZQ==

As you can see, it's easy to embed a QR code in your (X)HTML documents by using the <img> tag. 
<img src="https://www.api.live-qr.com/_functions/png/200/000000/ffffff/RXhhbXBsZQ=="/>
produces/shows the following QR code image:

Additional notes: We do retain the power to reject API requests. This is particularly true for requests that we deem to be impolite or abusive (i.e., if it seems to be a DoS assault). Since the contents of the QR codes are not recorded, we only keep track of the source of all queries (referrer and IP address; for more details, see the guidelines on our privacy policy). If your service consistently generates more than 10,000 requests per day, do inform us.

Parameters:

You may use the Live QR Code parameters listed below to create your own QR Codes now that you have a rough understanding of what our API is capable of. Both HTTP-GET and HTTP-POST are valid submission methods for all parameters. You may also combine the two approaches. When a parameter is supplied simultaneously with a POST and GET request, the GET value is utilized and the POST value is disregarded.

Note: The text submitted via the "data parameter" is not encoded. You have to encode it to Base64 format.

Parameter Name
Type
Default
Description
data
string
BASE64
It is required to encode data in base64 format.
format
string
PNG
There are different output file formats available. Possible values: JPG, PNG, SVG
width
number
200
Output size in Pixel only supported for PNG and JPG Format. Maximal value: 1000
foreground_color
string
#000000
Foreground color in format #RRGGBB
background_color
string
#FFFFFF
Background color in format #RRGGBB

Example Code:

 

$w.onReady(function () {
    $w('#generateButton').onClick(() => {

        const qrFormat = $w('#qrFormat').value;

        const qrWidth = $w('#qrWidth').value;

        const qrForegroundColor = $w('#qrForegroundColor').value;
        const qrBackgroundColor = $w('#qrBackgroundColor').value;

        const qrContent = btoa(encodeURIComponent($w('#qrContent').value));
        $w('#qrImage').src = `https://www.api.live-qr.com/_functions/${qrFormat}/${qrWidth}/${qrForegroundColor}/${qrBackgroundColor}/${qrContent}`;
    });
});