🎲 Lottery API v2.0

实时开奖 & 历史数据 Base: https://api.csjid.com
🐘 PHP 示例
<?php
$lotCode = '10010';
$date = date('Y-m-d');
$currentUrl = "https://api.csjid.com/CQShiCai/getBaseCQShiCai.do?lotCode={$lotCode}";
$currentData = json_decode(file_get_contents($currentUrl), true);
$historyUrl = "https://api.csjid.com/CQShiCai/getBaseCQShiCaiList.do?lotCode={$lotCode}&date={$date}";
$historyData = json_decode(file_get_contents($historyUrl), true);
print_r($currentData['result']['data'] ?? []);
?>
🟨 JavaScript
const lotCode = '10010';
const date = new Date().toISOString().slice(0,10);
fetch(`https://api.csjid.com/CQShiCai/getBaseCQShiCai.do?lotCode=${lotCode}`)
  .then(r => r.json()).then(data => console.log(data.result.data));
fetch(`https://api.csjid.com/CQShiCai/getBaseCQShiCaiList.do?lotCode=${lotCode}&date=${date}`)
  .then(r => r.json()).then(data => console.log(data.result.data.list));
🐍 Python
import requests
from datetime import date
lot_code = '10010'
today = date.today().isoformat()
current = requests.get('https://api.csjid.com/CQShiCai/getBaseCQShiCai.do', params={'lotCode': lot_code}).json()
history = requests.get('https://api.csjid.com/CQShiCai/getBaseCQShiCaiList.do', params={'lotCode': lot_code, 'date': today}).json()
print(current['result']['data'])
📡 全部彩种 API 端点 56个
ID彩种当前开奖 (current)历史记录 (history)