> 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/h2h.md).

# H2H

## H2H

> Return to match analysis statistics (match information, historical confrontation/recent results, future schedule)\<br/>Request limit: Matches within 30 days before today\<br/>\<br/>Request times: 60 times/min

```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/analysis":{"get":{"tags":["BASIC DATA"],"description":"Return to match analysis statistics (match information, historical confrontation/recent results, future schedule)<br/>Request limit: Matches within 30 days before today<br/><br/>Request times: 60 times/min","summary":"H2H","operationId":"getMatchAnalysis","parameters":[{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Secret"},{"name":"uuid","in":"query","description":"Match id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"results":{"$ref":"#/components/schemas/MatchAnalysis"}}}}}},"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":{"MatchAnalysis":{"type":"object","properties":{"info":{"$ref":"#/deps/schemas/InfoHistory"},"history":{"type":"object","description":"historical confrontation/recent results","properties":{"vs":{"type":"array","description":"Historical confrontation (the format is the same as the \"info\" field), no data is empty","items":{"$ref":"#/deps/schemas/InfoHistory"}},"home":{"type":"array","description":"Home team recent record (the format is the same as the \"info\" field), no data is empty","items":{"$ref":"#/deps/schemas/InfoHistory"}},"away":{"type":"array","description":"Away team recent record (the format is the same as the \"info\" field), no data is empty","items":{"$ref":"#/deps/schemas/InfoHistory"}}}},"future":{"type":"object","description":"future matches","properties":{"home":{"type":"array","description":"Home team future matches (the format is the same as the \"info\" field), no data is empty","items":{"$ref":"#/deps/schemas/InfoHistory"}},"away":{"type":"array","description":"Away team future matches (the format is the same as the \"info\" field), no data is empty","items":{"$ref":"#/deps/schemas/InfoHistory"}}}}}}},"responses":{"404NotFound":{"description":"Resource does not exist","content":{"application/json":{"schema":{"$ref":"#/common/schemas/ErrorMsg"}}}}}},"deps":{"schemas":{"InfoHistory":{"type":"array","description":"Match information field description<br/>example: [\"6ypq3ktnvx0emd7\",4,\"kdj2ry7txnr1zpg\",10,1569486600,0,[\"jednm9kt3p8ryox\",\"\",20,14,23,24,0],[\"965mk8t77llm1ge\",\"\",19,20,13,33,0],[\"0.83,3.5,0.83,0\",\"1.55,0.0,2.3,0\",\"0.83,157.5,0.83,0\",\"\"],[\"\",\"\"]]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Match id | String |\n| `1` | Total quarters of the match | Integer |\n| `2` | Competition id | String |\n| `3` | Match status, please refer to Status Code -> Match Status | Integer |\n| `4` | Match time | Integer |\n| `5` | Remaining time of the match section (seconds) | Integer |\n| `6` | Nested array; see details below | Array |\n| `7` | Nested array; see details below | Array |\n| `8` | Nested array; see details below | Array |\n| `9` | Nested array; see details below | Array |\n\n**Index `6` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `6[0]` | Home team id | String |\n| `6[1]` | Home team ranking, no ranking is empty | String |\n| `6[2]` | Home Section 1 Score | Integer |\n| `6[3]` | Home Section 2 Score | Integer |\n| `6[4]` | Home Section 3 Score | Integer |\n| `6[5]` | Home Section 4 Score | Integer |\n| `6[6]` | Home Overtime score | Integer |\n\n**Index `7` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `7[0]` | Away team id | String |\n| `7[1]` | Away team ranking, no ranking is empty | String |\n| `7[2]` | Away Section 1 Score | Integer |\n| `7[3]` | Away Section 2 Score | Integer |\n| `7[4]` | Away Section 3 Score | Integer |\n| `7[5]` | Away Section 4 Score | Integer |\n| `7[6]` | Away Overtime score | Integer |\n\n**Index `8` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `8[0]` | (BET365 Asian plate Beginning) home win,handicap,away win,whether to close (1-Yes, 0-No) | String |\n| `8[1]` | (BET365 European plate Beginning) Win,draw,lose,whether to close (1-Yes, 0-No) | String |\n| `8[2]` | (BET365 Size Ball plate Beginning) Big,handicap,small,whether to close (1-Yes, 0-No) | String |\n| `8[3]` | Compatible, please ignore | String |\n\n**Index `9` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `9[0]` | Match description | String |\n| `9[1]` | Compatible, please 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/h2h.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.
