lottery-prize-result-check
彩票中奖结果核对
支持双色球、七乐彩、大乐透等彩种。通过输入彩种类型、期号及用户号码,快速返回该期开奖号码及中奖核对结果,仅供信息辅助查询。
调用价格
5 匠币/次
快速接入
保持统一返回结构,直接通过服务端发起请求即可接入。
https://openapi.toolkk.com/v1/lottery-prize-result-checkcURL 示例
curl --request POST \
--url 'https://openapi.toolkk.com/v1/lottery-prize-result-check' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "type": "cjdlt",\n "expect": "2025062",\n "lotteryNo": "13,19,28,30,33@02,12"\n}'Python 示例
import os
import requests
url = "https://openapi.toolkk.com/v1/lottery-prize-result-check"
payload = {
"type": "cjdlt",
"expect": "2025062",
"lotteryNo": "13,19,28,30,33@02,12"
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.request("POST", url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.json())Go 示例
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/lottery-prize-result-check"
payload := []byte("{\n \"type\": \"cjdlt\",\n \"expect\": \"2025062\",\n \"lotteryNo\": \"13,19,28,30,33@02,12\"\n}")
req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}Java 示例
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ToolkkExample {
public static void main(String[] args) throws Exception {
String payload = "{\n \"type\": \"cjdlt\",\n \"expect\": \"2025062\",\n \"lotteryNo\": \"13,19,28,30,33@02,12\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/lottery-prize-result-check"))
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}PHP 示例
<?php
$endpoint = 'https://openapi.toolkk.com/v1/lottery-prize-result-check';
$payload = "{\n \"type\": \"cjdlt\",\n \"expect\": \"2025062\",\n \"lotteryNo\": \"13,19,28,30,33@02,12\"\n}";
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;响应示例
{
"code": "SUCCESS",
"message": "success",
"data": {
"resultDetails": "一等奖,奖金跟随奖池浮动",
"resultDesc": "5+2",
"openCode": "13,19,28,30,33+02+12",
"expect": "2025062",
"type": "cjdlt",
"name": "超级大乐透",
"resultList": [
{
"num": "13",
"lottery": true,
"blue": false
},
{
"num": "19",
"lottery": true,
"blue": false
},
{
"num": "28",
"lottery": true,
"blue": false
},
{
"num": "30",
"lottery": true,
"blue": false
},
{
"num": "33",
"lottery": true,
"blue": false
},
{
"num": "02",
"lottery": true,
"blue": true
},
{
"num": "12",
"lottery": true,
"blue": true
}
]
}
}示例用于理解返回结构,实际结果以接口返回为准。
- 鉴权方式
- 请求头传入 X-API-Key
- 默认限流
- 30 次/分钟
- 超时时间
- 15000 ms
服务端调用时,将 API Key 放在 X-API-Key 请求头中。
建议按 response code 与业务字段双重判断调用结果。
高频调用场景请结合速率限制与重试策略使用。
请求字段
从服务端发起请求,并在 X-API-Key 请求头中传入密钥。
请求字段
以下字段根据示例 JSON 自动提取,仅作接入参考。
| 字段路径 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
| type | string | 未标注 | 未标注 | cjdlt |
| expect | string | 未标注 | 未标注 | 2025062 |
| lotteryNo | string | 未标注 | 未标注 | 13,19,28,30,33@02,12 |
请求示例
{
"type": "cjdlt",
"expect": "2025062",
"lotteryNo": "13,19,28,30,33@02,12"
}- 鉴权方式
- 请求头传入 X-API-Key
- 默认限流
- 30 次/分钟
- 超时时间
- 15000 ms
响应字段
示例用于理解返回结构,实际结果以接口返回为准。
响应字段
以下字段根据示例 JSON 自动提取,仅作接入参考。
| 字段路径 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
| code | string | 未标注 | 未标注 | SUCCESS |
| message | string | 未标注 | 未标注 | success |
| data | object | 未标注 | 未标注 | {...} |
| data.resultDetails | string | 未标注 | 未标注 | 一等奖,奖金跟随奖池浮动 |
| data.resultDesc | string | 未标注 | 未标注 | 5+2 |
| data.openCode | string | 未标注 | 未标注 | 13,19,28,30,33+02+12 |
| data.expect | string | 未标注 | 未标注 | 2025062 |
| data.type | string | 未标注 | 未标注 | cjdlt |
| data.name | string | 未标注 | 未标注 | 超级大乐透 |
| data.resultList | array | 未标注 | 未标注 | [{"num":"13","lottery":true,"blue":false},{"num":"19","lottery":true,"blue":false},{"num":"28","lottery":true,"blue":false},{"num":"30","lottery":true,"blue":false},{"num":"33","lottery":true,"blue":false},{"num":"02","lottery":true,"blue":true},{"num":"12","lottery":true,"blue":true}] |
| data.resultList[] | object | 未标注 | 未标注 | {...} |
响应示例
{
"code": "SUCCESS",
"message": "success",
"data": {
"resultDetails": "一等奖,奖金跟随奖池浮动",
"resultDesc": "5+2",
"openCode": "13,19,28,30,33+02+12",
"expect": "2025062",
"type": "cjdlt",
"name": "超级大乐透",
"resultList": [
{
"num": "13",
"lottery": true,
"blue": false
},
{
"num": "19",
"lottery": true,
"blue": false
},
{
"num": "28",
"lottery": true,
"blue": false
},
{
"num": "30",
"lottery": true,
"blue": false
},
{
"num": "33",
"lottery": true,
"blue": false
},
{
"num": "02",
"lottery": true,
"blue": true
},
{
"num": "12",
"lottery": true,
"blue": true
}
]
}
}接口简介
接口能力、应用场景、使用限制与常见问题。
接口能力
根据彩种、期号和用户号码查询对应期次的开奖号码及号码核对结果。返回可包含彩种名称、开奖号码、匹配说明、中奖描述和号码明细,便于应用向使用者展示该注号码与该期开奖的对应关系。它用于已开奖信息的辅助核对,不预测下一期开奖,也不生成选号概率或推荐号码。
应用场景
适合彩民自行核对已保存号码、开奖资料页展示匹配结果,以及帮助使用者理解前后区的命中数量。一个查询应明确对应彩种和期号,避免把同样的数字放在不同彩种规则下比较。展示结果时应并列呈现原始输入、期号和开奖号码,使使用者能够检查是否查错期次或输错号码。
使用与结果解读
先确认该彩种的号码分区格式,再提交号码。大乐透示例用逗号连接区内号码,以@分隔前区和后区;开奖号码样例使用的分隔符可能不同,不能直接作字符串相等比较。结果说明5+2表示分区命中情况,号码明细中的匹配标记需结合所属分区解读。使用期号和开奖号码复核后,再展示接口提供的中奖描述。
范围与限制
号码匹配与奖金金额是不同信息,浮动奖金不能从“5+2”或一等奖描述直接计算出固定到账金额。多注、复式或追加等情形不能未经文档支持就自行套用单注核对方式。结果仅供信息辅助,实际开奖、奖级、兑奖资格及金额应以官方规则和公告为准;无该期数据时应显示暂未获得结果,不能判定未中奖。
常见问题
输入号码与开奖号码的分隔符必须相同吗?
按输入规定提交,返回展示格式可能不同;比较时应按彩种分区解析,不能只比字符串。
5+2能直接推算奖金金额吗?
不能。它描述分区命中,浮动奖金还需要当期官方奖金及适用规则。
号码明细中的分区标记有什么作用?
用于区分号码所属区域;同一个数字在不同分区不能混在一起统计命中。
没有当期数据是否就是未中奖?
不是。先确认期号、彩种和数据是否已获得,缺少结果不能当作未中奖结论。