# QR Code Generation API Documentation


# Universal QR Code Generator API

> **Category**: QR Code & Barcode  
> **Endpoint**: POST [https://api.gugudata.io/v1/qrcode?appkey={{appkey}}](https://api.gugudata.io/v1/qrcode?appkey={{appkey}})  
> **Description**: Provides a universal QR code generation interface with flexible content and sizing options.

## Overview

The **Universal QR Code Generator API** from [GuGuData](https://gugudata.io/) allows you to quickly produce **QR codes** for a wide range of content. Whether it's a **URL**, **plain text**, or other data, this API streamlines the **QR code creation** process, storing generated codes on a **CDN** for instant retrieval. The service is **highly configurable**, letting you customize **size** and seamlessly handle **URLs** and other content formats.

**Key highlights**:

- **Multi-type content** – Suitable for URLs, text, and more.
- **CDN-based storage** – Easily retrieve and share generated codes.
- **Customizable size** – Specify pixel dimensions for output images.
- **Robust performance** – Nationwide multi-node CDN for low-latency access.

## Demo URL

[https://api.gugudata.io/v1/qrcode/demo](https://api.gugudata.io/v1/qrcode/demo)

## Request Parameters

Use a **POST** request to the endpoint, passing in the required parameters (e.g., JSON or form-data body).

| **Parameter** | **Type**  | **Required** | **Default Value** | **Description**                                          |
| :-----------: | :-------: | :----------: | :---------------: | :------------------------------------------------------- |
|   `content`   | `string`  |     Yes      |       `N/A`       | The text or URL to encode in the QR code.                |
|    `size`     | `integer` |      No      |       `200`       | The width/height of the QR code in pixels (e.g., `300`). |

**Example**:

POST [https://api.gugudata.io/v1/qrcode?appkey=YOUR_APPKEY](https://api.gugudata.io/v1/qrcode?appkey=YOUR_APPKEY)

Request Body (JSON): { "content": "https://gugudata.io", "size": 250 }

## Response Parameters

A successful call returns JSON with status info and a public QR code URL. Key fields include:

|         **Parameter**          | **Type**  | **Required** | **Description**                                     |
| :----------------------------: | :-------: | :----------: | :-------------------------------------------------- |
| `dataStatus.requestParameter`  | `string`  |     Yes      | The original request parameters sent by the client. |
|    `dataStatus.statusCode`     | `integer` |     Yes      | The HTTP status code (e.g., `200`).                 |
|      `dataStatus.status`       | `string`  |     Yes      | Operation status (e.g., _SUCCESS_).                 |
| `dataStatus.statusDescription` | `string`  |     Yes      | Additional info on the request result.              |
| `dataStatus.responseDateTime`  | `string`  |     Yes      | Timestamp when the data was returned.               |
|  `dataStatus.dataTotalCount`   | `integer` |     Yes      | Typically `1`, indicating one QR code object.       |
|           `data.url`           | `string`  |     Yes      | CDN URL for retrieving the generated QR code image. |

## Error Codes

These error codes may occur depending on the request:

| **Error Code** |  **Error Content**  | **Notes**                                                       |
| :------------: | :-----------------: | :-------------------------------------------------------------- |
|     `200`      |       Success       | QR code created successfully.                                   |
|     `400`      |   Parameter error   | Missing or invalid parameters (e.g., no `content` provided).    |
|     `401`      |   Invalid APPKEY    | Ensure the APPKEY is correct and active.                        |
|     `429`      | Rate limit exceeded | Too many requests in a short time; consider back-off.           |
|     `500`      |    Server error     | Internal server issue; retry or contact support if it persists. |

## Features

1. **Supports various content types** – Generate a QR code from URLs, plain text, etc.
2. **CDN-based retrieval** – Easily store and access generated code images.
3. **Intelligent URL detection** – Automatically parses URLs for accurate QR code creation.
4. **Customizable QR code size** – Choose desired pixel dimensions for your code.
5. **Full HTTPS support** – Ensures secure data transfer and meets Apple ATS requirements.
6. **Multi-node CDN deployment** – Low-latency, high-speed responses across regions.
7. **High-speed API** – Rapid generation thanks to load-balanced servers.

## Additional Notes for Developers

- **Sizing**: Larger values for `size` produce higher resolution.
- **Usage**: The resulting QR code can be embedded in mobile apps, websites, or marketing materials.
- **Storage**: Each QR code is assigned a CDN link, making it easy to access or share.

## Getting Started

1. **Sign up at [GuGuData.io](https://gugudata.io/)** – Obtain your `appkey`.
2. **Send a POST request** – Provide `content` (and optionally `size`) in the request body.
3. **Parse the JSON response** – Extract the `data.url` to obtain the image link.
4. **Implement** – Embed or distribute the QR code image in your application or site.

## About GuGuData

[**GuGuData**](https://gugudata.io/) is a leader in delivering **powerful data processing** and **API services** for businesses and developers. From [barcode solutions](https://gugudata.io/) to [OCR services](https://gugudata.io/), we prioritize **scalability**, **reliability**, and **developer-friendliness** across our platform.

**Key Highlights**:

- **Nine years of experience** – Providing stable, innovative solutions.
- **4.2k+ APIs** – Wide-ranging functionalities for modern data-driven applications.
- **95% customer satisfaction** – Dedicated support and robust performance.

Use the **Universal QR Code Generator API** to **simplify** your QR code creation process, ensuring quick and reliable generation. Visit our [official site](https://gugudata.io/) to explore more from GuGuData.

