GET,POST
免费
生成二维码
本API提供二维码生成功能。支持生成PNG位图或SVG矢量格式的二维码,可自定义尺寸、纠错级别、边框宽度等参数。适用于需要集成二维码生成功能的Web应用、移动应用或第三方系统。
接口信息
GET,POST
https://api.xunjinlu.fun/api/qrcode/createqrcode.php
备用
https://api.whrx.chat/api/qrcode/createqrcode.php
请求方法
GET,POST
所属分类
二维码
频率限制
100/h
热度指数
4
提交时间
2026-03-02 02:36:24
API来源
尋鯨錄
接口检测
检测接口是否正常响应
接口反馈
如果接口调用出现问题,请在此反馈
免责声明
本工具提供的数据和结果仅供参考,不保证其准确性、完整性和实时性。 使用本工具产生的任何后果由用户自行承担,与本站无关。 如涉及第三方数据,请以官方来源为准。
请求参数
[
{
"name": "data",
"type": "string",
"required": true,
"description": "二维码中包含的文本内容(URL、文本、联系方式等),必填,建议不超过900个字符"
},
{
"name": "size",
"type": "string",
"required": false,
"description": "二维码尺寸,格式为'256'或'256x256',默认256x256像素"
},
{
"name": "format",
"type": "string",
"required": false,
"description": "输出格式,可选值:png(位图,默认)、svg(矢量图)"
},
{
"name": "error_correction",
"type": "string",
"required": false,
"description": "纠错级别,可选值:L(7%)、M(15%,默认)、Q(25%)、H(30%)"
},
{
"name": "border",
"type": "integer",
"required": false,
"description": "边框宽度(以码点为单位),默认2,最小0"
},
{
"name": "raw",
"type": "integer",
"required": false,
"description": "直接输出图片模式,1=直接输出图片流到浏览器,0或不传=返回JSON(默认)"
},
{
"name": "download",
"type": "integer",
"required": false,
"description": "下载模式,1=触发浏览器下载图片,0或不传=不下载(默认)。优先级低于raw"
},
{
"name": "logo",
"type": "string",
"required": false,
"description": "Logo图片URL,会在二维码中心显示该图片"
}
]
响应示例
## 成功响应(默认Base64模式)
{
"code": 200,
"data": {
"image_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"image_url": "https://api.2dcode.biz/v1/create-qr-code?data=Example&size=256x256&format=png&error_correction=M&border=2",
"api_url": "https://api.xunjinlu.fun/api/qrcode/createqrcode.php",
"format": "png",
"size": "256x256",
"data_content": "Example",
"error_correction": "M",
"border": 2,
"direct_image_url": "https://api.xunjinlu.fun/api/qrcode/createqrcode.php?data=Example&raw=1&size=256x256&format=png"
},
"message": "success"
}
## 错误响应示例
{
"code": 400,
"data": null,
"message": "参数验证失败: data参数不能为空"
}
{
"code": 502,
"data": null,
"message": "二维码生成失败: HTTP Error: 503"
}
详细文档
使用示例
1. 直接浏览器访问生成二维码(raw=1模式)
直接在浏览器地址栏输入以下链接即可显示二维码图片:
```
https://api.xunjinlu.fun/api/qrcode/createqrcode.php?data=https://www.example.com&raw=1
```
带参数的完整示例:
```
https://api.xunjinlu.fun/api/qrcode/createqrcode.php?data=Hello%20World&size=400x400&format=png&error_correction=H&bor...
AI文档
AI生成
# 生成二维码 API 文档
## 接口简介
本API提供二维码生成功能。支持生成PNG位图或SVG矢量格式的二维码,可自定义尺寸、纠错级别、边框宽度等参数。适用于需要集成二维码生成功能的Web应用、移动应用或第三方系统。
## 请求说明
- **完整接口地址**:[https://api.xunjinlu.fun/api/qrcode/createqrcode.php](https://api.xunjinlu.fun/api/qrcode/createqrcode.php)
- **接口路径**:/api/qrcode/createqrcode.php
- **请求方法**:GET, POST
- **请求头**:无特殊要求,可以使用通用HTTP请求头。
## 请求参数
| 参数名 | 类型 | 是否必填 | 说明 |
|-----------|--------|----------|-----------------------------------...
在线测试
https://api.xunjinlu.fun/api/qrcode/createqrcode.php
等待中
// 结果将在此处显示...
推荐接口
GET
未分类
网易云歌词
网易云音乐歌词获取API,根据音乐ID获取对应歌曲的LRC格式歌词和YRC格式(逐字歌词)数据。基于落月API(vkeys.cn)构建,支持获取网易云音乐平台的歌词信息。