Docs
Qr Code API

Qr Code API

Generate customizable QR codes for any URL

This API allows you to create QR codes with customizable options such as size, colors, error correction levels, and logo inclusion. The generated QR code is returned as an image.

API Endpoint

Base URL: https://wr.do/api/v1/scraping/qrcode

HTTP Methods:

  • GET: Generate a QR code image.
  • OPTIONS: Check CORS support.

Usage

Basic Request Format

https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com

Authentication

  • The key parameter is required for all requests. You can obtain your API key from the Dashboard under Settings.

Query Parameters

ParameterTypeRequiredDefaultDescription
keyStringYes-Your API key for authentication. Get it from Dashboard → Settings.
urlStringYes-The URL to encode in the QR code. Must be a valid URL.
logoStringNoWRDO_QR_LOGOURL of a custom logo to embed in the QR code. Requires a paid plan on Dub.
sizeNumberNo600Size of the QR code in pixels (width and height).
levelStringNo"L"Error correction level. Options: "L", "M", "Q", "H".
fgColorStringNo#000000Foreground color of the QR code in hex format (e.g., #000000).
bgColorStringNo#FFFFFFBackground color of the QR code in hex format (e.g., #FFFFFF).
marginNumberNo2Margin size around the QR code in pixels.
hideLogoBooleanNofalseWhether to hide the logo in the QR code. Requires a paid plan on Dub.

Error Correction Levels (level)

  • L: Low (7% error correction)
  • M: Medium (15% error correction)
  • Q: Quartile (25% error correction)
  • H: High (30% error correction)

Response

Success

  • Status Code: 200 OK
  • Content-Type: image/png
  • Body: A PNG image of the generated QR code.
  • Headers:
    • Access-Control-Allow-Origin: *
    • Access-Control-Allow-Methods: GET, OPTIONS

Errors

Status CodeMessageDescription
400API key is required...Missing key parameter.
401Invalid API key...The provided key is invalid.
500Server errorAn unexpected error occurred on the server.

Examples

Basic QR Code

Generate a default QR code for a URL:

https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com

Custom Size and Colors

Create a 400x400 QR code with a blue foreground and yellow background:

https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com&size=400&fgColor=%230066FF&bgColor=%23FFFF00

With Custom Logo and High Error Correction

Add a custom logo and use high error correction (H):

https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com&logo=https://your-logo-url.com/logo.png&level=H

Hide Logo and Add Margin

Hide the logo and add a larger margin:

https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com&hideLogo=true&margin=10

Embedding in HTML

You can directly use the API URL in an <img> tag to display the QR code:

<img
  src="https://wr.do/api/v1/scraping/qrcode?key=your_api_key&url=https://example.com&size=300&fgColor=%230000FF"
  alt="QR Code for example.com"
/>

Notes

  • CORS Support: The API supports CORS, allowing cross-origin requests.
  • Deprecation Notice: The includeMargin parameter is deprecated. Use margin instead.

Support

For issues or questions, contact support at support@wr.do or visit our Help Center.