QR Code Generator API Guide

Create downloadable PNG QR codes from text or URLs, choose an image size, and integrate QR generation into print, onboarding and application workflows.

Try the live demoView API details →

Create a QR code from text or a URL

Generate a downloadable PNG for product labels, printed materials, onboarding screens, or application links. Content is encoded exactly as supplied, including multilingual text, spaces and line breaks.

Request

Send POST https://api.gugudata.io/v1/qrcode with your AppKey in the query string and a JSON body. Keep your key on your server.

curl 'https://api.gugudata.io/v1/qrcode?appkey=YOUR_APPKEY' \
  -H 'Content-Type: application/json' \
  --data '{"content":"https://gugudata.io/","size":200}'
Parameter Required Meaning
content Yes Nonblank text or URL. Content is not trimmed or rewritten.
size No Integer width and height from 64 to 2048 pixels; defaults to 200.

Input is limited to 32,768 UTF-8 bytes before encoding. Actual QR capacity is smaller and depends on content. A small image may not fit longer text: increase size or shorten content when the API returns 400. URLs are encoded as text, not fetched or checked for availability.

Response

A successful response has dataStatus.statusCode: 200 and data.url, a public HTTPS PNG link. The following abbreviated example uses an illustrative file address:

{
  "dataStatus": {
    "statusCode": 200,
    "requestParameter": "content_chars=20&content_bytes=20&size=200"
  },
  "data": {
    "url": "https://storage.gugudata.io/qrcode/generated-file.png"
  }
}

Download and retain the result; permanent hosting is not guaranteed. Because the link is public, do not encode secrets or sensitive personal information. Test at the intended printed or displayed size, and keep the white margin intact. Resizing, low contrast or low-quality printing can affect scanning.

Demo

The Demo generates a 200px QR code containing https://gugudata.io/. Scan the downloaded PNG to check its content. Results are cached for 15 minutes; X-GuGuData-Demo-Mode indicates live or cached, and X-GuGuData-Generated-At identifies generation time.

Errors

HTTP Meaning
400 Invalid JSON, blank content, invalid size, or content that cannot fit. Business code 400.
401 / 403 Missing, invalid or unauthorized AppKey. Existing authorization codes apply.
429 Request limit reached.
500 QR generation failed. Business code 500.
503 Image storage is unavailable. Business code 500.

Check HTTP status and dataStatus.statusCode before using data.url. This API creates static QR codes; it does not provide dynamic redirects, scan analytics or logo customization.