> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/basketball/basic-data/real-time-data.md).

# Real-time data

## Real-time data

> This interface returns the technical statistics and scores data of the matches within 120 minutes from now(full update)\<br/>ps: The match data beyond 120 minutes is updated and will be returned synchronously\<br/>Suggest the request frequency: 2 seconds/time

```json
{"openapi":"3.0.1","info":{"title":"Basketball API","version":"1.0.251028"},"tags":[{"name":"BASIC DATA","description":"BASIC DATA"}],"servers":[{"url":"https://api.thesports.com"}],"paths":{"/v1/basketball/match/detail_live":{"get":{"tags":["BASIC DATA"],"description":"This interface returns the technical statistics and scores data of the matches within 120 minutes from now(full update)<br/>ps: The match data beyond 120 minutes is updated and will be returned synchronously<br/>Suggest the request frequency: 2 seconds/time","summary":"Real-time data","operationId":"getMatchDetailLive","parameters":[{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Secret"}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"results":{"type":"array","description":"Real-time data list","items":{"$ref":"#/components/schemas/MatchDetailLive"}}}}}}},"404":{"$ref":"#/components/responses/404NotFound"}}}}},"components":{"parameters":{"User":{"name":"user","in":"query","description":"Username, please contact business","required":true,"schema":{"type":"string"}},"Secret":{"name":"secret","in":"query","description":"Key, please contact business","required":true,"schema":{"type":"string"}}},"schemas":{"MatchDetailLive":{"type":"object","description":"Data details","properties":{"id":{"type":"string","description":"Match id"},"score":{"$ref":"#/deps/schemas/LiveScore"},"timer":{"$ref":"#/deps/schemas/LiveTimer"},"over_time_scores":{"$ref":"#/deps/schemas/OtScore"},"stats":{"type":"array","description":"Match statistics","items":{"$ref":"#/deps/schemas/LiveStats"}},"tlive":{"type":"array","description":"Match text","items":{"$ref":"#/deps/schemas/LiveTlive"}}}}},"responses":{"404NotFound":{"description":"Resource does not exist","content":{"application/json":{"schema":{"$ref":"#/common/schemas/ErrorMsg"}}}}}},"deps":{"schemas":{"LiveScore":{"type":"array","description":"Score field description<br/>example: [\"3glrwytp5zn0qdy\", 10, 0, [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Match id | String |\n| `1` | Match status, please refer to Status Code -> Match Status | Integer |\n| `2` | Remaining time of the match section (seconds) | Integer |\n| `3` | Nested array; see details below | Array |\n| `4` | Nested array; see details below | Array |\n\n**Index `3` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `3[0]` | Home Section 1 Score | Integer |\n| `3[1]` | Home Section 2 Score | Integer |\n| `3[2]` | Home Section 3 Score | Integer |\n| `3[3]` | Home Section 4 Score | Integer |\n| `3[4]` | Home Overtime score | Integer |\n\n**Index `4` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `4[0]` | Away Section 1 Score | Integer |\n| `4[1]` | Away Section 2 Score | Integer |\n| `4[2]` | Away Section 3 Score | Integer |\n| `4[3]` | Away Section 4 Score | Integer |\n| `4[4]` | Away Overtime score | Integer |\n","items":""},"LiveTimer":{"type":"array","description":"Timer data description<br/>example: [1, 1, 1699500201, 402]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Whether to run seconds, 1-yes, 0-no | Integer |\n| `1` | Whether to count down, 1-yes, 0-no | Integer |\n| `2` | Update time | Integer |\n| `3` | Remaining time of current section (seconds) | Integer |\n","items":""},"OtScore":{"type":"array","description":"Overtime score field description(This field is only available for more than 1 extra time, and each bit is the score of 1 extra time.)<br/>example: [[8, 9, 6], [8, 9, 8]]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Nested array; see details below | Array |\n| `1` | Nested array; see details below | Array |\n\n**Index `0` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0[0]` | Home team overtime scores in the first quarter | Integer |\n| `0[1]` | Home team 2nd quarter overtime score | Integer |\n| `0[2]` | Home team overtime score in the nth quarter | Integer |\n\n**Index `1` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `1[0]` | Away team overtime scores in the first quarter | Integer |\n| `1[1]` | Away team 2nd quarter overtime score | Integer |\n| `1[2]` | Away team overtime score in the nth quarter | Integer |\n","items":""},"LiveStats":{"type":"array","description":"Data details<br/>Number of pauses: the remaining number of pauses in the current section, reset in the next section, need to record by yourself<br/>Number of fouls: the number of fouls in the current quarter, reset in the second quarter, need to record by yourself<br/>example: [1, 8, 9]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Type, see status code -> technical statistics | Integer |\n| `1` | Home team value(6- Free throw percentage, floating point) | Integer |\n| `2` | Away team value(6- Free throw percentage, floating point) | Integer |\n","items":""},"LiveTlive":{"type":"array","description":"The tlive field is a list, representing data with different numbers of sections<br/>example: [[\"0^08:48^2^0^2-2^Robert Loe,2pt tipinlayup^30493^1^1^2^24,4\"], []]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | (Compatible Ignore)^Time^Home and Away Team (0-Neutral, 1-Home Team, 2-Away Team)^0^Away Team Score-Home Team Score^Description^(Compatible Ignore) | String |\n","items":""}}},"common":{"schemas":{"ErrorMsg":{"type":"object","description":"abnormal","properties":{"code":{"type":"integer","description":"status code"},"msg":{"type":"string","description":"Error message"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/basketball/basic-data/real-time-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
