HTTP Request
GET https://api.qianfan99.com/qf/odds/detail?apiKey=xxx&site=1&play=1&sport=1&type=1
URL Parameters
Parameter | Required | Notes |
---|---|---|
apiKey | Yes | Example: xxx-xxx |
site | Yes | Example: 1 |
sport | Yes | Example: 2 |
play | Yes | Example: 1 |
type | Yes | Example: 1 |
Site
ID | Name |
---|---|
1 | IBC Nova88 Sports |
2 | HG |
3 | SBO |
4 | M88 (Coming Soon) |
8 | PIN (PS3838) |
16 | BET1X (Coming Soon) |
72 | BET18 (Coming Soon) |
128 | BET12 (Coming Soon) |
Sport
ID | Name |
---|---|
1 | Soccer |
2 | Basketball |
Play
ID | Name |
---|---|
1 | HDPOU |
2 | Moneyline |
3 | Odd/Even |
4 | Total Goal |
5 | First Goal/Last Goal |
6 | Half Time/Full Time |
7 | Correct Score |
Type
ID | Name |
---|---|
1 | Live |
2 | Early |
3 | Today |
Results
To save bandwidth, the returned data is compressed using gzip and then converted to base64. The following is JavaScript code to decrypt by first decoding base64 and then unzipping gzip. Only the returned data needs to be decompressed.
js
Import:
<script src="https://cdn.bootcdn.net/ajax/libs/pako/2.0.4/pako.es5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-base64@3.7.2/base64.min.js"></script>
// Decompress
function unzip(strData) {
var ss = atob(strData);
// Convert binary string to character-number array
var charData = ss.split('').map(function (x) { return x.charCodeAt(0); });
// Turn number array into byte-array
var binData = new Uint8Array(charData);
// // unzip
var data = pako.inflate(binData);
// Convert gunzipped byteArray back to ascii string:
return Utf8ArrayToStr(data);
}
// Solve large data and Chinese character encoding issues
function Utf8ArrayToStr(array) {
var out, i, len, c;
var char2, char3;
out = "";
len = array.length;
i = 0;
while (i < len) {
c = array[i++];
switch (c >> 4) {
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// 0xxxxxxx
out += String.fromCharCode(c);
break;
case 12: case 13:
// 110x xxxx 10xx xxxx
char2 = array[i++];
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = array[i++];
char3 = array[i++];
out += String.fromCharCode(((c & 0x0F) << 12) |
((char2 & 0x3F) << 6) |
((char3 & 0x3F) << 0));
break;
}
}
return out;
}
Decrypted data:
json
[
{
"MatchId": 0,
"oddsId": "1254562_1375335_1370654_1",
"matchTime": 1747729800000, // match time
"workingDate": "20/05/2025", // match date
"scoreHome": 5, // home team score
"scoreAway": 3, // away team score
"leagueName": "AUSTRALIA CUP QUALIFIERS", // league name
"home": "Queanbeyan City FC (PEN) (n)", // home team name
"away": "Tigers FC Canberra (PEN)", // away team name
"liveTime": "LIVE", // match status
"hDPOddsHome": null, // full-time home team HDP odds
"hDPOddsAway": null, // full-time away team HDP odds
"hDP": "", // full-time HDP odds
"isHomeGive": false, // is home give full-time
"oUOddsHome": null, // full-time home team O/U odds
"oUOddsAway": null, // full-time away team O/U odds
"oU": "", // full-time O/U odds
"hDPOddsHomeH": null, // half-time home team HDP odds
"hDPOddsAwayH": null, // half-time away team HDP odds
"hDPH": null, // half-time HDP odds
"isHomeGiveH": null, // is home give half-time
"oUOddsHomeH": null, // half-time home team O/U odds
"oUOddsAwayH": null, // half-time away team O/U odds
"oUH": null, // half-time O/U odds
"leagueId": 1254562, // league ID
"homeId": 1375335, // home team ID
"awayId": 1370654, // away team ID
"hasFirstHalf": false, // has first half
"isPause": true, // is pause
"redCardH": 0, // home team red cards
"redCardA": 0, // away team red cards
"groupCount": 0
}
]
Result Parameters
Parameter | Required? | Description |
---|---|---|
code | Yes | 200 Return code: 200-success, others indicate failure |
message | Yes | Specific error message |
keyInfo | Yes | Query information |
odds | Yes | Odds data |
KeyInfo Parameters
Parameter | Required? | Description |
---|---|---|
fromSites | Yes | Company |
sport | Yes | Game type |
gameType | Yes | Game play type |
oddsCount | Yes | Total count |
oddsTime | Yes | Time |