API 文档
将卡西欧 ClassWiz 二维码中的 URL 解析为结构化 JSON 数据,无需访问 CASIO 服务器。
可用 API 端点
本文使用 {API_ENDPOINT} 作为 API 服务地址占位符。目前可以选择:
https://cwqr.pages.devhttps://q.20142022.xyzhttps://cwqr.ca510.com
解析二维码 URL
POST{API_ENDPOINT}/api
请求体使用 JSON 格式,并设置 Content-Type: application/json。
| 字段 | 类型 | 必填 | 说明 |
|---|
url | string | 是 | 计算器二维码解码后的完整 URL。 |
lang | string | 否 | 返回内容的语言代码:en、zh、fr 或 vi。默认为en。 |
curl 示例
curl --request POST 'https://cwqr.pages.dev/api' \
--header 'Content-Type: application/json' \
--data '{
"url": "http://wes.casio.com/math/index.php?q=I-234F+U-000000000000+M-X100000000+S-05099",
"lang": "zh"
}'
响应格式
解析成功时,data 中会返回型号、模式、设置和计算数据。具体字段随二维码中的计算模式而变化。
{
"code": "success",
"data": {
"model": { "...": "..." },
"mode": { "...": "..." },
"setup": [],
"...": "其他模式相关字段"
}
}
URL 无效或无法解析时:
{
"code": "error",
"msg": "错误原因"
}
直接请求二维码路径
GET{API_ENDPOINT}/{QR_PATH}
也可以把二维码 URL 中的 http://wes.casio.com 替换为任一可用的{API_ENDPOINT},并显式请求 JSON。接口会根据 Accept-Language 的前两个字符选择语言。
curl 示例
curl 'https://cwqr.pages.dev/math/index.php?q=I-234F+U-000000000000+M-X100000000+S-05099' \
--header 'Accept: application/json' \
--header 'Accept-Language: zh-CN'
支持 /math/、/ncal/ 和 /calc/ 路径。浏览器直接打开时,请求的Accept 通常以 text/html 开头而不是请求 JSON,因此接口会跳转到前端可视化解析页面;如需 JSON,请显式设置 Accept: application/json。
API Documentation
Parse a URL decoded from a CASIO ClassWiz QR code into structured JSON without contacting the CASIO server.
Available API endpoints
This document uses {API_ENDPOINT} as a placeholder for the API origin. Currently available options are:
https://cwqr.pages.devhttps://q.20142022.xyzhttps://cwqr.ca510.com
Parse a QR URL
POST{API_ENDPOINT}/api
Send a JSON request body with Content-Type: application/json.
| Field | Type | Required | Description |
|---|
url | string | Yes | The complete URL decoded from the calculator QR code. |
lang | string | No | Response language: en, zh, fr, or vi. Defaults to en. |
curl example
curl --request POST '{API_ENDPOINT}/api' \
--header 'Content-Type: application/json' \
--data '{
"url": "http://wes.casio.com/math/index.php?q=I-234F+U-000000000000+M-X100000000+S-05099",
"lang": "en"
}'
Response format
On success, data contains model, mode, setup, and calculation data. Its exact fields depend on the calculator mode encoded in the QR code.
{
"code": "success",
"data": {
"model": { "...": "..." },
"mode": { "...": "..." },
"setup": [],
"...": "other mode-specific fields"
}
}
For an invalid or unparseable URL:
{
"code": "error",
"msg": "error message"
}
Request a QR path directly
GET{API_ENDPOINT}/{QR_PATH}
You can also replace http://wes.casio.com in the QR URL with any available{API_ENDPOINT} and explicitly request JSON. The first two characters ofAccept-Language select the response language.
curl '{API_ENDPOINT}/math/index.php?q=I-234F+U-000000000000+M-X100000000+S-05099' \
--header 'Accept: application/json' \
--header 'Accept-Language: en'
The /math/, /ncal/, and /calc/ paths are supported. A browser normally sends an Accept header beginning with text/html instead of requesting JSON, so opening one directly redirects to the visual parser. Set Accept: application/json explicitly to receive JSON.