Skip to content

HTTP Request

GET https://api.qianfan99.com/qf/odds/detail?apiKey=xxx&site=1&play=1&sport=1&type=1

URL Parameters

ParameterRequiredNotes
apiKeyYesExample: xxx-xxx
siteYesExample: 1
sportYesExample: 2
playYesExample: 1
typeYesExample: 1

Site

IDName
1IBC Nova88 Sports
2HG
3SBO
4M88 (Coming Soon)
8PIN (PS3838)
16BET1X (Coming Soon)
72BET18 (Coming Soon)
128BET12 (Coming Soon)

Sport

IDName
1Soccer
2Basketball

Play

IDName
1HDPOU
2Moneyline
3Odd/Even
4Total Goal
5First Goal/Last Goal
6Half Time/Full Time
7Correct Score

Type

IDName
1Live
2Early
3Today

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

ParameterRequired?Description
codeYes200 Return code: 200-success, others indicate failure
messageYesSpecific error message
keyInfoYesQuery information
oddsYesOdds data

KeyInfo Parameters

ParameterRequired?Description
fromSitesYesCompany
sportYesGame type
gameTypeYesGame play type
oddsCountYesTotal count
oddsTimeYesTime

Qianfan Sports Data API All Rights Reserved