Qrgo API

This API generates QR codes with customizable parameters. It returns an image of the QR code based on the provided query parameters.

Endpoint

GET /api/qr

Generates a QR code based on the provided query parameters.

Query Parameters

  • "as" (svg | png)

    Response format. Default is "svg".

  • "data" (string)

    The data to be encoded in the QR code. Required.

  • "s" (number)

    The size of the QR code in pixels (Min: 100, Max: 1000). Default is 200.

  • "bg" (string)

    Background color of the QR code in hexadecimal format. Default is `#000000`

  • "fg" (string)

    Foreground color of the QR code in hexadecimal format. Default is `#FFFFFF`

  • "cr" (number)

    The corner radius of the QR code (Min: 0, Max: 15). Default is 10.

  • "title" (string)

    A title for the QR code. Default is an empty string.

  • "logo" (string)

    URL of the logo to be included in the center of the QR code. Supports .jpg, .png extensions. Default is an empty string.

  • "download" (string)

    If set to `"true"`, the response will include headers to prompt a file download with a generated filename. Default is an empty string.

Example Request

GET /api/qr?data=https://example.com&bg=%23000&fg=%23fff&title=Example&logo=https://placehold.co/120x120/FFF/000/png&cr=5

This request will generate a QR code with the specified parameters, where:

Example QR Code

Notes

  • Ensure that URL parameters are properly encoded.
  • The size, background and foreground colors, and corner radius can greatly affect the visibility and scan-ability of the QR code. Test different configurations for best results.
  • Enjoy the service 😉