football-docs 0.17.10 → 0.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -13
- package/data/docs.db +0 -0
- package/dist/crawl.d.ts +4 -0
- package/dist/crawl.js +10 -4
- package/dist/statsbomb-truth.js +14 -5
- package/docs/skillcorner/api-access.md +10 -0
- package/docs/skillcorner/api-endpoints.md +1 -0
- package/docs/skillcorner/data-model.md +1 -1
- package/docs/sportmonks/api-access.md +1 -0
- package/docs/sportmonks/api-changes.md +7 -7
- package/docs/sportmonks/authentication.md +140 -6
- package/docs/sportmonks/best-practices.md +50 -16
- package/docs/sportmonks/changelog-beta.md +19 -19
- package/docs/sportmonks/changelog.md +42 -28
- package/docs/sportmonks/code-libraries.md +2 -2
- package/docs/sportmonks/data-corrections.md +2 -2
- package/docs/sportmonks/data-model.md +1 -0
- package/docs/sportmonks/demo-response-files.md +2 -2
- package/docs/sportmonks/differences-between-api-2-and-api-3.md +3 -3
- package/docs/sportmonks/endpoints.md +12 -9
- package/docs/sportmonks/error-codes.md +85 -61
- package/docs/sportmonks/filtering-and-complexity-exceptions.md +7 -7
- package/docs/sportmonks/filtering.md +29 -6
- package/docs/sportmonks/fixtures.md +5 -5
- package/docs/sportmonks/get-all-fixtures.md +9 -9
- package/docs/sportmonks/get-all-leagues-by-team-id.md +9 -9
- package/docs/sportmonks/get-all-leagues.md +9 -9
- package/docs/sportmonks/get-all-livescores.md +9 -9
- package/docs/sportmonks/get-all-seasons.md +9 -9
- package/docs/sportmonks/get-all-states.md +8 -8
- package/docs/sportmonks/get-all-types.md +7 -7
- package/docs/sportmonks/get-brackets-by-season-id.md +11 -9
- package/docs/sportmonks/get-current-leagues-by-team-id.md +9 -9
- package/docs/sportmonks/get-fixture-by-id.md +9 -9
- package/docs/sportmonks/get-fixtures-by-date-range-for-team.md +9 -9
- package/docs/sportmonks/get-fixtures-by-date-range.md +35 -9
- package/docs/sportmonks/get-fixtures-by-date.md +9 -9
- package/docs/sportmonks/get-fixtures-by-head-to-head.md +9 -9
- package/docs/sportmonks/get-fixtures-by-multiple-ids.md +9 -9
- package/docs/sportmonks/get-fixtures-by-search-by-name.md +9 -9
- package/docs/sportmonks/get-inplay-livescores.md +8 -8
- package/docs/sportmonks/get-latest-updated-fixtures.md +9 -9
- package/docs/sportmonks/get-latest-updated-livescores.md +9 -9
- package/docs/sportmonks/get-league-by-id.md +9 -9
- package/docs/sportmonks/get-leagues-by-country-id.md +9 -9
- package/docs/sportmonks/get-leagues-by-fixture-date.md +9 -9
- package/docs/sportmonks/get-leagues-by-live.md +9 -9
- package/docs/sportmonks/get-leagues-search-by-name.md +9 -9
- package/docs/sportmonks/get-past-fixtures-by-tv-station-id.md +9 -9
- package/docs/sportmonks/get-seasons-by-id.md +9 -9
- package/docs/sportmonks/get-seasons-by-search-by-name.md +9 -9
- package/docs/sportmonks/get-seasons-by-team-id.md +9 -9
- package/docs/sportmonks/get-state-by-id.md +8 -8
- package/docs/sportmonks/get-type-by-entity.md +3 -3
- package/docs/sportmonks/get-type-by-id.md +7 -7
- package/docs/sportmonks/get-upcoming-fixtures-by-market-id.md +9 -9
- package/docs/sportmonks/get-upcoming-fixtures-by-tv-station-id.md +9 -9
- package/docs/sportmonks/getting-started.md +11 -11
- package/docs/sportmonks/include-exceptions.md +8 -8
- package/docs/sportmonks/includes.md +66 -4
- package/docs/sportmonks/leagues.md +3 -3
- package/docs/sportmonks/livescores.md +5 -5
- package/docs/sportmonks/making-your-first-request.md +93 -28
- package/docs/sportmonks/meta-description.md +3 -3
- package/docs/sportmonks/nested-includes.md +4 -4
- package/docs/sportmonks/new-endpoints-and-data-features.md +16 -16
- package/docs/sportmonks/ordering-and-sorting.md +2 -2
- package/docs/sportmonks/other-exceptions.md +8 -8
- package/docs/sportmonks/overview.md +6 -13
- package/docs/sportmonks/rate-limit.md +310 -447
- package/docs/sportmonks/request-options.md +7 -7
- package/docs/sportmonks/seasons.md +6 -6
- package/docs/sportmonks/selecting-and-filtering.md +3 -3
- package/docs/sportmonks/selecting-fields.md +4 -4
- package/docs/sportmonks/states.md +4 -4
- package/docs/sportmonks/statistics.md +3 -3
- package/docs/sportmonks/syntax-and-filters.md +6 -6
- package/docs/sportmonks/syntax.md +2 -2
- package/docs/sportmonks/translations-beta.md +2 -2
- package/docs/sportmonks/types.md +2 -2
- package/docs/sportmonks/what-can-you-do-with-sportmonks-data.md +5 -5
- package/docs/sportradar/monitoring-data-changes.md +2 -2
- package/docs/sportradar/soccer-api-vs-soccer-extended-api.md +2 -2
- package/docs/sportradar/soccer-extended-competition-info.md +2 -2
- package/docs/sportradar/soccer-extended-competition-seasons.md +2 -2
- package/docs/sportradar/soccer-extended-competitions.md +2 -2
- package/docs/sportradar/soccer-extended-competitor-mappings.md +2 -2
- package/docs/sportradar/soccer-extended-competitor-merge-mappings.md +2 -2
- package/docs/sportradar/soccer-extended-competitor-profile.md +81 -87
- package/docs/sportradar/soccer-extended-competitor-schedules.md +2 -2
- package/docs/sportradar/soccer-extended-competitor-summaries.md +2 -2
- package/docs/sportradar/soccer-extended-competitor-vs-competitor.md +2 -2
- package/docs/sportradar/soccer-extended-daily-schedules.md +2 -2
- package/docs/sportradar/soccer-extended-daily-summaries.md +2 -2
- package/docs/sportradar/soccer-extended-faq.md +12 -4
- package/docs/sportradar/soccer-extended-fifa-rankings.md +2 -2
- package/docs/sportradar/soccer-extended-league-timeline.md +2 -2
- package/docs/sportradar/soccer-extended-live-schedules.md +2 -2
- package/docs/sportradar/soccer-extended-live-summaries.md +2 -2
- package/docs/sportradar/soccer-extended-live-timelines-delta.md +2 -2
- package/docs/sportradar/soccer-extended-live-timelines.md +2 -2
- package/docs/sportradar/soccer-extended-overview.md +2 -2
- package/docs/sportradar/soccer-extended-player-mappings.md +2 -2
- package/docs/sportradar/soccer-extended-player-merge-mappings.md +2 -2
- package/docs/sportradar/soccer-extended-player-profile.md +2 -2
- package/docs/sportradar/soccer-extended-player-schedules.md +2 -2
- package/docs/sportradar/soccer-extended-player-summaries.md +2 -2
- package/docs/sportradar/soccer-extended-push-events.md +1 -1
- package/docs/sportradar/soccer-extended-push-feeds.md +1 -1
- package/docs/sportradar/soccer-extended-push-statistics.md +2 -2
- package/docs/sportradar/soccer-extended-season-competitors.md +1 -1
- package/docs/sportradar/soccer-extended-season-form-standings.md +2 -2
- package/docs/sportradar/soccer-extended-season-info.md +4 -3
- package/docs/sportradar/soccer-extended-season-leaders.md +2 -2
- package/docs/sportradar/soccer-extended-season-lineups.md +5 -5
- package/docs/sportradar/soccer-extended-season-links.md +3 -3
- package/docs/sportradar/soccer-extended-season-missing-players.md +2 -2
- package/docs/sportradar/soccer-extended-season-overunder-statistics.md +2 -2
- package/docs/sportradar/soccer-extended-season-players.md +2 -2
- package/docs/sportradar/soccer-extended-season-schedule.md +2 -2
- package/docs/sportradar/soccer-extended-season-standings.md +4 -3
- package/docs/sportradar/soccer-extended-season-summaries.md +1 -1
- package/docs/sportradar/soccer-extended-season-transfers.md +2 -2
- package/docs/sportradar/soccer-extended-season-venues.md +2 -2
- package/docs/sportradar/soccer-extended-seasonal-competitor-extended-stati.md +2 -2
- package/docs/sportradar/soccer-extended-seasonal-competitor-players.md +2 -2
- package/docs/sportradar/soccer-extended-seasonal-competitor-statistics.md +3 -2
- package/docs/sportradar/soccer-extended-seasons-disabled.md +1 -1
- package/docs/sportradar/soccer-extended-seasons.md +2 -2
- package/docs/sportradar/soccer-extended-sport-event-extended-summary.md +1 -1
- package/docs/sportradar/soccer-extended-sport-event-extended-timeline.md +2 -2
- package/docs/sportradar/soccer-extended-sport-event-fun-facts.md +1 -1
- package/docs/sportradar/soccer-extended-sport-event-insights.md +2 -2
- package/docs/sportradar/soccer-extended-sport-event-lineups.md +2 -2
- package/docs/sportradar/soccer-extended-sport-event-momentum.md +2 -2
- package/docs/sportradar/soccer-extended-sport-event-summary.md +48 -3
- package/docs/sportradar/soccer-extended-sport-event-timeline.md +3 -3
- package/docs/sportradar/soccer-extended-sport-events-created.md +2 -2
- package/docs/sportradar/soccer-extended-sport-events-removed.md +1 -1
- package/docs/sportradar/soccer-extended-sport-events-updated.md +1 -1
- package/docs/sportradar/soccer-ig-api-basics.md +2 -2
- package/docs/sportradar/soccer-ig-data-coverage-tiers.md +2 -2
- package/docs/sportradar/soccer-ig-fixtures.md +2 -2
- package/docs/sportradar/soccer-ig-historical-data.md +3 -3
- package/docs/sportradar/soccer-ig-id-handling.md +3 -3
- package/docs/sportradar/soccer-ig-live-match-retrieval.md +2 -2
- package/docs/sportradar/soccer-ig-match-status-workflow.md +2 -2
- package/docs/sportradar/soccer-ig-overview.md +2 -2
- package/docs/sportradar/soccer-ig-push.md +2 -2
- package/docs/sportradar/soccer-ig-rosters-lineups-transfers.md +3 -3
- package/docs/sportradar/soccer-ig-scenarios.md +1 -1
- package/docs/sportradar/soccer-ig-seasonal-stats.md +2 -2
- package/docs/sportradar/soccer-ig-tracking-standings.md +2 -2
- package/docs/sportradar/soccer-ig-tracking-tournaments.md +2 -2
- package/docs/sportradar/soccer-ig-update-frequencies.md +1 -1
- package/docs/statsbomb/api-access.md +14 -10
- package/docs/statsbomb/api-endpoints.md +48 -32
- package/docs/statsbomb/charting-lineups.md +68 -5
- package/docs/statsbomb/coordinate-system.md +31 -1
- package/docs/statsbomb/data-model.md +128 -13
- package/docs/statsbomb/event-types.md +208 -16
- package/docs/statsbomb/identity-surfaces.md +17 -0
- package/docs/statsbomb/iq-metrics-glossary.md +83 -8
- package/docs/statsbomb/live-data.md +481 -0
- package/docs/statsbomb/player-mapping.md +4 -0
- package/docs/statsbomb/player-match-stats.md +61 -13
- package/docs/statsbomb/player-season-stats.md +50 -3
- package/docs/statsbomb/team-match-stats.md +55 -4
- package/docs/statsbomb/team-season-stats.md +43 -2
- package/docs/statsbomb/xg-model.md +2 -2
- package/docs/vald/api-access.md +4 -2
- package/docs/vald/api-endpoints.md +2 -1
- package/docs/vald/nordbord.md +87 -40
- package/package.json +1 -1
- package/providers.json +2 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Searchable football data provider and tooling documentation for AI coding agents. Like [Context7](https://context7.com) for football data.
|
|
4
4
|
|
|
5
|
-
**Who it's for:** Developers and analysts who use AI coding tools (Claude Code, Cursor, VS Code Copilot) to work with football data. Works with any tool that supports MCP.
|
|
5
|
+
**Who it's for:** Developers and analysts who use AI coding tools (Claude Code, Codex, Cursor, VS Code Copilot, OpenCode and others) to work with football data. Works with any tool that supports MCP.
|
|
6
6
|
|
|
7
7
|
**What it does:** Gives your AI agent a searchable index of documentation for 31 football data providers and tools — event types, qualifier IDs, coordinate systems, API endpoints, data models, identity surfaces, and cross-provider comparisons for the data providers (StatsBomb, Opta, Wyscout, Impect, SkillCorner, Sportradar, TheSportsDB, FMDB Pro, TransferRoom, and more), the open-source libraries people build with (kloppy, mplsoccer, socceraction, soccerdata, floodlight, fast-forward, unravelsports, and more), and the APIs of wearable and sports-science vendors (STATSports, Firstbeat, Hawkin Dynamics, VALD). Your agent looks up the real docs instead of guessing from training data.
|
|
8
8
|
|
|
@@ -32,15 +32,49 @@ MCP ([Model Context Protocol](https://modelcontextprotocol.io)) is a standard fo
|
|
|
32
32
|
The server needs Node.js 22.13 or newer. It uses Node's built-in SQLite, so no
|
|
33
33
|
native module is compiled at install time.
|
|
34
34
|
|
|
35
|
+
No API key is needed. More install options, with copy buttons: [nutmeg.withqwerty.com/football-docs](https://nutmeg.withqwerty.com/football-docs/#install).
|
|
36
|
+
|
|
37
|
+
### Any agent
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx add-mcp football-docs -g
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
[add-mcp](https://github.com/neon-solutions/add-mcp) finds the coding agents on
|
|
44
|
+
your computer and adds football-docs to the ones you pick (Claude Code, Codex,
|
|
45
|
+
Cursor, VS Code, OpenCode, Gemini CLI, pi, Hermes and 17 more). It writes each
|
|
46
|
+
agent's own config file. Name one agent with `-a`, for example
|
|
47
|
+
`npx add-mcp football-docs -g -a opencode`.
|
|
48
|
+
|
|
49
|
+
### Ask your agent
|
|
50
|
+
|
|
51
|
+
Paste this into your coding agent. It follows the
|
|
52
|
+
[setup steps](https://nutmeg.withqwerty.com/football-docs/setup.md), shows you
|
|
53
|
+
each change first, and checks that the tools answer:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
Set up the football-docs MCP server for this agent only. Read https://nutmeg.withqwerty.com/football-docs/setup.md and follow it. Show me each command or config change before you make it.
|
|
57
|
+
```
|
|
58
|
+
|
|
35
59
|
### Claude Code
|
|
36
60
|
|
|
37
61
|
```bash
|
|
38
|
-
claude mcp add football-docs -- npx -y football-docs
|
|
62
|
+
claude mcp add --scope user football-docs -- npx -y football-docs
|
|
39
63
|
```
|
|
40
64
|
|
|
65
|
+
Leave out `--scope user` to add it to the current project only.
|
|
66
|
+
|
|
67
|
+
### Codex
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
codex mcp add football-docs -- npx -y football-docs
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The Codex CLI and the IDE extension share this config (`~/.codex/config.toml`).
|
|
74
|
+
|
|
41
75
|
### Cursor
|
|
42
76
|
|
|
43
|
-
|
|
77
|
+
Add to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
|
|
44
78
|
|
|
45
79
|
```json
|
|
46
80
|
{
|
|
@@ -55,7 +89,13 @@ Settings → MCP → Add server. Use this config:
|
|
|
55
89
|
|
|
56
90
|
### VS Code / Copilot
|
|
57
91
|
|
|
58
|
-
|
|
92
|
+
[Install in VS Code](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522football-docs%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522football-docs%2522%255D%257D), or run:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
code --add-mcp '{"name":"football-docs","command":"npx","args":["-y","football-docs"]}'
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or add to `.vscode/mcp.json` (VS Code calls the key `servers`):
|
|
59
99
|
|
|
60
100
|
```json
|
|
61
101
|
{
|
|
@@ -70,7 +110,7 @@ Add to `.vscode/mcp.json`:
|
|
|
70
110
|
|
|
71
111
|
### Claude Desktop
|
|
72
112
|
|
|
73
|
-
Add to `claude_desktop_config.json
|
|
113
|
+
Add to `claude_desktop_config.json` (Settings → Developer → Edit Config), then restart the app:
|
|
74
114
|
|
|
75
115
|
```json
|
|
76
116
|
{
|
|
@@ -83,6 +123,19 @@ Add to `claude_desktop_config.json`:
|
|
|
83
123
|
}
|
|
84
124
|
```
|
|
85
125
|
|
|
126
|
+
### Other agents
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pi mcp add football-docs -- npx -y football-docs
|
|
130
|
+
gemini mcp add -s user football-docs npx -y football-docs
|
|
131
|
+
copilot mcp add football-docs -- npx -y football-docs
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
For OpenCode, Hermes, Zed, Windsurf, Goose, Kiro and others, use add-mcp with
|
|
135
|
+
`-a <agent>` (see `npx add-mcp list-agents`), or add the standard entry above to
|
|
136
|
+
the agent's MCP config. Some agents use another key: Zed uses
|
|
137
|
+
`context_servers`, OpenCode uses `mcp`.
|
|
138
|
+
|
|
86
139
|
### After an update
|
|
87
140
|
|
|
88
141
|
`npx` updates its cached copy of football-docs in place. A server that was
|
|
@@ -294,22 +347,22 @@ metrics:sources` re-checks every card quote against its live source.
|
|
|
294
347
|
| Provider | Chunks | Categories |
|
|
295
348
|
|----------|--------|------------|
|
|
296
349
|
| fast-forward | 255 | overview, getting-started, data-model, coordinate-system, orientations, layouts, transformations, distributed-compute, api-reference, 12 provider format pages |
|
|
297
|
-
| StatsBomb |
|
|
350
|
+
| StatsBomb | 292 | event-types, data-model, coordinate-system, api-access, api-endpoints, live-data, charting-lineups, xg-model, iq-metrics, player/team stats, player-mapping, identity-surfaces, data-provenance |
|
|
298
351
|
| unravelsports | 202 | overview, installation, quickstart, concepts, graph converters, pressing intensity, formation detection, models, utils, american-football |
|
|
299
352
|
| Wyscout | 165 | event-types, data-model, coordinate-system, api-access, api-endpoints, charting-analysis-metrics, glossary, identity-surfaces, data-provenance |
|
|
300
353
|
| kloppy | 125 | data-model, usage, provider-mapping, tracking-rendering, event-derived-metrics |
|
|
301
354
|
| floodlight | 144 | core data objects, io parsers (Tracab, DFL, Kinexon, Opta, SkillCorner, StatsBomb, StatsPerform, Second Spectrum), transforms, metrics, models, visualisation, guides |
|
|
302
|
-
| SportMonks |
|
|
355
|
+
| SportMonks | 578 | full v3 endpoint reference (fixtures, livescores, leagues, seasons, states, types, statistics, brackets), syntax and includes, filtering, rate limits, error codes, changelog, plus curated event-types, data-model, api-access, charting-season-stories, identity-surfaces, data-provenance |
|
|
303
356
|
| databallpy | 63 | data-model, overview, usage |
|
|
304
357
|
| mplsoccer | 65 | overview, pitch-types, visualizations |
|
|
305
358
|
| Impect | 82 | overview, data-model, event-types, coordinate-system, concepts, kpi-definitions, identity-surfaces, data-provenance |
|
|
306
|
-
| SkillCorner |
|
|
359
|
+
| SkillCorner | 81 | api-access, api-endpoints, data-model, dynamic-events, dynamic-events-delivered-values, physical-data, coordinate-system, concepts, identity-surfaces, data-provenance |
|
|
307
360
|
| Free sources | 70 | overview, fbref, understat, football-data-columns, contextual-story-joins, xg-timelines, data-provenance |
|
|
308
361
|
| soccerdata | 40 | overview, data-sources, usage |
|
|
309
362
|
| TransferRoom | 45 | api-access, api-endpoints, charting-availability, data-model, identity-surfaces, data-provenance |
|
|
310
363
|
| Opta | 73 | event-types, qualifiers, coordinate-system, api-access, charting-game-state, charting-lineups, charting-passmaps, charting-set-pieces, charting-shot-placement, identity-surfaces, data-provenance |
|
|
311
364
|
| FMDB Pro | 39 | api-access, api-endpoints, data-model, identity-surfaces, data-provenance |
|
|
312
|
-
| Sportradar |
|
|
365
|
+
| Sportradar | 482 | integration guide (API basics, coverage tiers, ID handling, match status, update frequencies, push, historical data), Soccer Extended v4 endpoint reference with data-point tables, FAQ, plus curated api-access, api-endpoints, data-model, charting-and-stories, integration-notes, data-provenance |
|
|
313
366
|
| socceraction | 34 | SPADL format, VAEP, Expected Threat |
|
|
314
367
|
| BeSoccer | 16 | api-access, api-endpoints, data-provenance |
|
|
315
368
|
| Driblab | 34 | api-access, api-endpoints, data-model, data-provenance |
|
|
@@ -323,10 +376,10 @@ metrics:sources` re-checks every card quote against its live source.
|
|
|
323
376
|
| STATSports | 71 | api-access, api-endpoints, data-model, drill-kpi-metrics (all 319 DrillKpiV7 fields), identity-surfaces, data-provenance |
|
|
324
377
|
| Firstbeat | 79 | api-access, api-endpoints, data-model, variables (100 scalars, 17 time series), identity-surfaces, data-provenance |
|
|
325
378
|
| Hawkin Dynamics | 69 | api-access, api-endpoints, data-model, test-metrics (535 metrics across 13 test types), identity-surfaces, data-provenance |
|
|
326
|
-
| VALD |
|
|
379
|
+
| VALD | 321 | api-access, api-endpoints, per-product endpoints and schemas (tenants, profiles, forcedecks, nordbord, forceframe, smartspeed, dynamo, humantrak), identity-surfaces, data-provenance |
|
|
327
380
|
| Metric cards | 101 | xg, npxg, xg_assisted, xa, ppda, progressive_passes, progressive_carries, xt, vaep, field_tilt, pass_completion; see [Metric cards](#metric-cards) |
|
|
328
381
|
|
|
329
|
-
**3,
|
|
382
|
+
**3,651 searchable chunks** across 32 providers and tools (the metric cards count as one).
|
|
330
383
|
|
|
331
384
|
STATSports, Firstbeat, Hawkin Dynamics and VALD sell wearables and testing devices.
|
|
332
385
|
Their APIs return a customer's own athlete data, which includes personal and health
|
|
@@ -386,8 +439,12 @@ has changed since the snapshots; the refresh steps are in [specs/README.md](spec
|
|
|
386
439
|
`pnpm check:upstream` runs every upstream check in one report: pinned package
|
|
387
440
|
versions against PyPI, npm and GitHub, each spec snapshot against its public URL,
|
|
388
441
|
BeSoccer's and Driblab's truth regenerated from their Postman collection and Notion
|
|
389
|
-
page,
|
|
390
|
-
|
|
442
|
+
page, StatsBomb's spec PDFs, a re-crawl of each crawled provider compared with
|
|
443
|
+
`docs/` (written to a temporary directory, never over `docs/`), a hash of every
|
|
444
|
+
other cited source page (`data/upstream-pins.json`, which also lists what is
|
|
445
|
+
excluded and why), the metric card quotes, and the free-source and Reep live
|
|
446
|
+
checks below. `--only <section>` runs one part, and `--pin` refreshes the page
|
|
447
|
+
hashes. It runs by hand, never in CI, and lists what to review.
|
|
391
448
|
|
|
392
449
|
Free sources have no spec, and they tend to fail quietly: a page still answers
|
|
393
450
|
200 after the data has gone. Run `python3 scripts/check_free_sources_live.py` to
|
package/data/docs.db
CHANGED
|
Binary file
|
package/dist/crawl.d.ts
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
* npm run crawl # crawl all providers with sources
|
|
21
21
|
* npm run crawl -- --provider kloppy # crawl one provider
|
|
22
22
|
* npm run crawl -- --discover # probe sources without crawling
|
|
23
|
+
* npm run crawl -- --out-dir /tmp/x # write to another directory, not docs/
|
|
24
|
+
*
|
|
25
|
+
* --out-dir lets scripts/check_upstream.py re-crawl into a temporary directory
|
|
26
|
+
* and compare the result with the committed docs, without touching docs/.
|
|
23
27
|
*/
|
|
24
28
|
interface CrawledDoc {
|
|
25
29
|
category: string;
|
package/dist/crawl.js
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
* npm run crawl # crawl all providers with sources
|
|
21
21
|
* npm run crawl -- --provider kloppy # crawl one provider
|
|
22
22
|
* npm run crawl -- --discover # probe sources without crawling
|
|
23
|
+
* npm run crawl -- --out-dir /tmp/x # write to another directory, not docs/
|
|
24
|
+
*
|
|
25
|
+
* --out-dir lets scripts/check_upstream.py re-crawl into a temporary directory
|
|
26
|
+
* and compare the result with the committed docs, without touching docs/.
|
|
23
27
|
*/
|
|
24
28
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, } from "node:fs";
|
|
25
29
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
@@ -793,8 +797,8 @@ export function slugify(text) {
|
|
|
793
797
|
.slice(0, 50);
|
|
794
798
|
}
|
|
795
799
|
/** Write a crawled doc to disk with provenance frontmatter. */
|
|
796
|
-
function writeCrawledDoc(provider, doc, upstreamVersion) {
|
|
797
|
-
const dir = resolve(
|
|
800
|
+
function writeCrawledDoc(provider, doc, upstreamVersion, docsDir = DOCS_DIR) {
|
|
801
|
+
const dir = resolve(docsDir, provider);
|
|
798
802
|
mkdirSync(dir, { recursive: true });
|
|
799
803
|
const frontmatter = [
|
|
800
804
|
"---",
|
|
@@ -818,6 +822,8 @@ async function main() {
|
|
|
818
822
|
const providerArg = args.indexOf("--provider");
|
|
819
823
|
const singleProvider = providerArg >= 0 ? args[providerArg + 1] : undefined;
|
|
820
824
|
const discoverOnly = args.includes("--discover");
|
|
825
|
+
const outDirArg = args.indexOf("--out-dir");
|
|
826
|
+
const docsDir = outDirArg >= 0 && args[outDirArg + 1] ? resolve(args[outDirArg + 1]) : DOCS_DIR;
|
|
821
827
|
if (!existsSync(PROVIDERS_PATH)) {
|
|
822
828
|
console.error("providers.json not found. Create it first.");
|
|
823
829
|
process.exit(1);
|
|
@@ -842,7 +848,7 @@ async function main() {
|
|
|
842
848
|
continue;
|
|
843
849
|
const docs = await crawlLlmsIndexes(config.llms_indexes, config.exclude_categories, fetchText, 250, config.exclude_sections);
|
|
844
850
|
for (const doc of docs) {
|
|
845
|
-
writeCrawledDoc(name, doc, config.version);
|
|
851
|
+
writeCrawledDoc(name, doc, config.version, docsDir);
|
|
846
852
|
console.log(` wrote ${name}/${doc.category}.md (${doc.content.length} chars) [${doc.source_type}]`);
|
|
847
853
|
}
|
|
848
854
|
console.log(` → ${docs.length} doc(s) written`);
|
|
@@ -900,7 +906,7 @@ async function main() {
|
|
|
900
906
|
}
|
|
901
907
|
docs = kept;
|
|
902
908
|
for (const doc of docs) {
|
|
903
|
-
writeCrawledDoc(name, doc, config.version);
|
|
909
|
+
writeCrawledDoc(name, doc, config.version, docsDir);
|
|
904
910
|
console.log(` wrote ${name}/${doc.category}.md (${doc.content.length} chars) [${doc.source_type}]`);
|
|
905
911
|
}
|
|
906
912
|
console.log(` → ${docs.length} doc(s) written`);
|
package/dist/statsbomb-truth.js
CHANGED
|
@@ -121,11 +121,19 @@ export const TABLE_FIELDS = {
|
|
|
121
121
|
"Positions": ["position", "tactics.lineup.position", "shot.freeze_frame.position"],
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
|
-
* IDs the sampled matches do not carry,
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
124
|
+
* IDs the sampled matches do not carry. Editorial, not derived from the data,
|
|
125
|
+
* which is why they live here and not in the truth file.
|
|
126
|
+
*
|
|
127
|
+
* Most entries are listed in both the Open Data Events v4.0.0 specification and
|
|
128
|
+
* kloppy's StatsBomb parser. A specification is not trusted on its own: the Open
|
|
129
|
+
* Data v4.0.0 specification swaps the card IDs (5 and 7), and both it and the
|
|
130
|
+
* commercial API Events v11.0.0 specification (29 July 2026) give the 50/50
|
|
131
|
+
* outcomes IDs 108, 109, 147 and 148, where the data uses 1-4. The v11.0.0
|
|
132
|
+
* specification has the card IDs as the data does.
|
|
133
|
+
*
|
|
134
|
+
* Foul type 25 ("8 Seconds", the goalkeeper 8-second infringement) is the
|
|
135
|
+
* exception: it was added in API Events v11.0.0, and that specification is
|
|
136
|
+
* its only source. The sampled open data does not carry it.
|
|
129
137
|
*/
|
|
130
138
|
const DOCUMENTED_ONLY = {
|
|
131
139
|
"shot.type": { "65": "Kick Off" },
|
|
@@ -133,6 +141,7 @@ const DOCUMENTED_ONLY = {
|
|
|
133
141
|
"goalkeeper.type": { "110": "Saved to Post" },
|
|
134
142
|
"goalkeeper.outcome": { "17": "Success Out", "51": "In Play" },
|
|
135
143
|
"interception.outcome": { "1": "Lost", "15": "Success" },
|
|
144
|
+
"foul_committed.type": { "25": "8 Seconds" },
|
|
136
145
|
};
|
|
137
146
|
/** Case, punctuation and the deprecation asterisk do not count as differences. */
|
|
138
147
|
function normaliseName(name) {
|
|
@@ -73,6 +73,16 @@ The spec fetched on 2026-11-24 adds a version 4 for tracking and physical data:
|
|
|
73
73
|
- New sync filters on `/matches/` and `/matches/custom/`: `extrapolated_tracking_v4_last_modified__gte`, `physical_v4_0_last_modified__gte`, `physical_events_v4_0_last_modified__gte`.
|
|
74
74
|
- New data-collection fields: `physical_v4_0_last_modified`, `physical_v4_0_quality_index`, `physical_events_v4_0_last_modified`, `tracking_extra_v4_last_modified`, `tracking_extra_v4_ball_quality_index`, `tracking_extra_v4_players_quality_index`, `goal_event_provider_used_v4`, `shot_event_provider_used_v4`.
|
|
75
75
|
|
|
76
|
+
### Migrating from v3 to v4
|
|
77
|
+
|
|
78
|
+
The spec does not give these dates or rules. They come from SkillCorner's [v4 API migration note](https://skillcorner.crunch.help/en/product-updates-1/skill-corner-v4-api-migration) (changelog entry of 2026-11-19, read on 2026-11-30):
|
|
79
|
+
|
|
80
|
+
- **Schedule:** v4 becomes the default for tracking and physical data in the week of 8 February 2027. SkillCorner retires v3 in June–July 2027. Until then, v3 and v4 run in parallel, and both cover all historical seasons.
|
|
81
|
+
- **No fallback:** a request for a version that a match does not have returns an error. The API does not serve an older version in its place.
|
|
82
|
+
- **Game Intelligence stays on tracking v3.** Game Intelligence v4, computed from tracking v4, is planned for the first half of 2027. If your work needs Game Intelligence and tracking to agree, keep tracking on v3.
|
|
83
|
+
- **FIFA formats:** `fifa-xml` and `fifa-data` are deprecated for tracking v4. They remain for v3.
|
|
84
|
+
- **Physical v4 changes:** new Elite Sprint distance and count metrics, and new acceleration definitions. Aggregations include only performances with a Physical Quality Index (0–6) of 3 or more. `goal_event_provider_used_v4` tells whether goals were synchronised with an external source to fill `game_state` in physical events.
|
|
85
|
+
|
|
76
86
|
## Custom feeds
|
|
77
87
|
|
|
78
88
|
Endpoints under `/match/{id}/custom/...`, `/matches/custom/` and `/data_collections/custom/` serve **customer-specific** computed feeds (the standard, non-custom endpoints serve SkillCorner's catalogue products). `/data_collections/` tells you which data products are available for which matches.
|
|
@@ -77,6 +77,7 @@ Aggregated with `group_by`, `average_per`, `order_by`, `variants`, plus the stan
|
|
|
77
77
|
| `GET /physical/` | Aggregated physical metrics (see [physical-data.md](physical-data.md)) |
|
|
78
78
|
| `GET /physical/referee/` | Physical v4 main-referee metrics: "one record per main referee and match (data_version 4.0 only)". Cursor-paginated (`after`, `cursor_after`) |
|
|
79
79
|
| `GET /match/{match_id}/physical_events/` | Physical v4 physical events of one match (`data_version` `4.0` only): `file_format` ∈ csv (default)/json/sportscode-xml/matchtracker-xml/focus-json; `frame_rate` ∈ 10/25 ("csv and json only"); `period_starts` syncs the video formats |
|
|
80
|
+
| `GET /match/{match_id}/physical/` | "The physical data of one match, every player at once", with human-readable column names (`data_version` ∈ 3.0.2/3.0.3/4.0, default 3.0.3; `response_format` ∈ csv/json/nested_json, default `csv`, `nested_json` 4.0 only). Added in the spec fetched on 2026-11-30 |
|
|
80
81
|
| `GET /match/{match_id}/custom/physical/` | Customer physical feed for a match (`data_version` ∈ 3.0.2/3.0.3/4.0, default 3.0.3; `response_format` ∈ csv/json/nested_json, default `csv`, `nested_json` 4.0 only; `feed_type` ∈ broadcast/clean_feed/tactical) |
|
|
81
82
|
| `GET /match/{match_id}/custom/physical/referee/` | Physical v4 main referee of one match, "with every breakdown at once and no normalisation" (`data_version` `4.0` only; CSV by default) |
|
|
82
83
|
| `GET /match/{match_id}/custom/physical_events/` | Physical v4 physical events from the custom provider's feed, in the formats of `physical_events/` |
|
|
@@ -56,7 +56,7 @@ rather than guessing at casing or synonyms.
|
|
|
56
56
|
Returned as a **file download**, not inline JSON:
|
|
57
57
|
|
|
58
58
|
- `file_format=jsonl` — newline-delimited JSON; each line is one frame of player + ball positions in pitch coordinates. Players are keyed by their `trackable_object` id (join to `Player.trackable_object`).
|
|
59
|
-
- `file_format=fifa-xml` / `fifa-data` — the **FIFA EPTS** standard format (a `.xml` metadata file + a `.txt` data file). See the [FIFA EPTS standard](https://www.fifa.com/technical/football-technology/standards/epts/research-development-epts-standard-data-format).
|
|
59
|
+
- `file_format=fifa-xml` / `fifa-data` — the **FIFA EPTS** standard format (a `.xml` metadata file + a `.txt` data file). SkillCorner deprecates both for tracking v4 (see [api-access.md](api-access.md#migrating-from-v3-to-v4)). See the [FIFA EPTS standard](https://www.fifa.com/technical/football-technology/standards/epts/research-development-epts-standard-data-format).
|
|
60
60
|
- `file_format=parquet` — "a flat parquet (one row per frame per entity, only available for data_version >= 4.0)".
|
|
61
61
|
- `data_version` ∈ `3.0` (default, "the current version"), `4.0`.
|
|
62
62
|
- `frame_rate` (`10` or `25` fps, default `10`), described as "only availabe if data_version >= 4.0". The spec fetched on 2026-11-24 is the first to list `4.0` and `parquet` in its enums; the spec fetched on 2026-11-16 described them but did not list them.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
source_url: https://docs.sportmonks.com/football/llms-full.txt
|
|
3
|
-
archived_url: https://web.archive.org/web/
|
|
3
|
+
archived_url: https://web.archive.org/web/20261130182242/https://docs.sportmonks.com/v3/llms-full.txt
|
|
4
4
|
source_type: llms_txt
|
|
5
5
|
upstream_version: v3
|
|
6
|
-
crawled_at: 2026-
|
|
6
|
+
crawled_at: 2026-11-30T18:17:11.840Z
|
|
7
7
|
---
|
|
8
8
|
# API Changes
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ We introduced states and types to ensure data quality and consistency for specif
|
|
|
13
13
|
|
|
14
14
|
### States
|
|
15
15
|
|
|
16
|
-
A fixture moves between several statuses. It has an initial status (NS), can be delayed (DELA), has been finished (FT) or any of the statuses described on the [states page](/v3/definitions/states). You could also use the [states endpoint](/v3/endpoints-and-entities/endpoints/states) to retrieve all possible states. 
|
|
16
|
+
A fixture moves between several statuses. It has an initial status (NS), can be delayed (DELA), has been finished (FT) or any of the statuses described on the [states page](https://docs.sportmonks.com/v3/definitions/states). You could also use the [states endpoint](https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/states) to retrieve all possible states. 
|
|
17
17
|
|
|
18
18
|
### Types
|
|
19
19
|
|
|
@@ -213,7 +213,7 @@ Both teams that play in the fixture are present in the participants array and th
|
|
|
213
213
|
|
|
214
214
|
## Rate limit per entity
|
|
215
215
|
|
|
216
|
-
The rate limit will now be based on requests per entity instead of being based on a single endpoint. For example, the Team entity is used in Teams endpoints. You can find out more about the rate limit [here](/v3/api/rate-limit).
|
|
216
|
+
The rate limit will now be based on requests per entity instead of being based on a single endpoint. For example, the Team entity is used in Teams endpoints. You can find out more about the rate limit [here](https://docs.sportmonks.com/v3/api/rate-limit).
|
|
217
217
|
|
|
218
218
|
### Pagination
|
|
219
219
|
|
|
@@ -221,7 +221,7 @@ A new pagination system has been implemented. In API 3.0, we will no longer prov
|
|
|
221
221
|
|
|
222
222
|
In addition to that it is now possible to add the *filters=populate* to your query parameter. This parameter allows for a higher pagination limit (max 1000), so you can populate your database more conveniently instead of using the default pagination limit of 50. To prevent our services from overloading, using includes is disabled when this filter is added to the request. 
|
|
223
223
|
|
|
224
|
-
Please check our [pagination tutorial ](/v3/tutorials-and-guides/tutorials/introduction/pagination)for more info.
|
|
224
|
+
Please check our [pagination tutorial ](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/introduction/pagination)for more info.
|
|
225
225
|
|
|
226
226
|
### Livescores endpoints
|
|
227
227
|
|
|
@@ -243,7 +243,7 @@ When you need the fixtures that will take place on a specific date, you can use
|
|
|
243
243
|
|
|
244
244
|
[Core](https://docs.sportmonks.com/football2/v/core/) and [odds](https://docs.sportmonks.com/football2/v/odds/getting-started/welcome) are no longer sport specific. Both have their own documentation related to all sports released on API 3.0. Odds contain bookmakers and markets which are not sport specific but Odds are still available on a per sport basis.
|
|
245
245
|
|
|
246
|
-
Bookmakers in API 3.0 have a different ID compared to API 2.0. To make migration easier, bookmakers that were also available in API 2.0 have a legacy\_id field, which contains the ID of this bookmaker in API 2.0. Please check our [tutorial on bookmakers](/v3/tutorials-and-guides/tutorials/odds-and-predictions/bookmakers#get-all-bookmakers) for more info.
|
|
246
|
+
Bookmakers in API 3.0 have a different ID compared to API 2.0. To make migration easier, bookmakers that were also available in API 2.0 have a legacy\_id field, which contains the ID of this bookmaker in API 2.0. Please check our [tutorial on bookmakers](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/odds-and-predictions/bookmakers#get-all-bookmakers) for more info.
|
|
247
247
|
|
|
248
248
|
## Statistics
|
|
249
249
|
|
|
@@ -265,4 +265,4 @@ In API version 2, values in trends were for each team identifiable using only th
|
|
|
265
265
|
|
|
266
266
|
This update is aimed at improving clarity and consistency through the API. Separation of the periods also prevents overlapping of values, which could show abnormal lines when showing trend graphs using version 2 data directly.
|
|
267
267
|
|
|
268
|
-
For a deeper, tutorial-style explanation and examples of how to work with trend data in your integration, see the [Trends](/v3/tutorials-and-guides/tutorials/trends) page.
|
|
268
|
+
For a deeper, tutorial-style explanation and examples of how to work with trend data in your integration, see the [Trends](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/trends) page.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
source_url: https://docs.sportmonks.com/football/llms-full.txt
|
|
3
|
-
archived_url: https://web.archive.org/web/
|
|
3
|
+
archived_url: https://web.archive.org/web/20261130182242/https://docs.sportmonks.com/v3/llms-full.txt
|
|
4
4
|
source_type: llms_txt
|
|
5
5
|
upstream_version: v3
|
|
6
|
-
crawled_at: 2026-
|
|
6
|
+
crawled_at: 2026-11-30T18:17:11.841Z
|
|
7
7
|
---
|
|
8
8
|
# Authentication
|
|
9
9
|
|
|
@@ -17,22 +17,142 @@ We offer two different options for passing your API token. You are free to choos
|
|
|
17
17
|
You can pass your API token by passing 'api\_token' in your request parameters, like so:
|
|
18
18
|
|
|
19
19
|
```http
|
|
20
|
-
https://api.sportmonks.com/
|
|
20
|
+
https://api.sportmonks.com/v3/football/livescores?api_token=YOUR_TOKEN
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
* **Authenticate using a request header**\
|
|
24
|
-
You can also pass your token via an
|
|
24
|
+
You can also pass your token via an `Authorization` header, like so:
|
|
25
25
|
|
|
26
26
|
<table><thead><tr><th>Header</th><th>Value</th></tr></thead><tbody><tr><td>Authorization</td><td><pre><code>YOUR_TOKEN
|
|
27
27
|
</code></pre></td></tr></tbody></table>
|
|
28
28
|
|
|
29
|
+
### Authentication examples
|
|
30
|
+
|
|
31
|
+
These examples request one page of leagues. They run server-side. Keep tokens in environment variables and never expose them in browser code, logs, or error messages.
|
|
32
|
+
|
|
33
|
+
Choose one authentication method per request. Use the raw token value in the Authorization header. Do not add the Bearer prefix.
|
|
34
|
+
|
|
35
|
+
{% tabs %}
|
|
36
|
+
{% tab title="Query parameter" %}
|
|
37
|
+
|
|
38
|
+
#### cURL (Bash/zsh)
|
|
39
|
+
|
|
40
|
+
Requires [cURL](https://curl.se/). Set `SPORTMONKS_API_TOKEN` in your shell first. Windows PowerShell users should use `curl.exe` and `$env:SPORTMONKS_API_TOKEN`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
curl "https://api.sportmonks.com/v3/football/leagues?per_page=1&api_token=${SPORTMONKS_API_TOKEN}"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### JavaScript
|
|
47
|
+
|
|
48
|
+
Requires Node.js 18+ for built-in `fetch`. Save this code as an `.mjs` file or use it in an ES module because it uses top-level `await`.
|
|
49
|
+
|
|
50
|
+
```javascript
|
|
51
|
+
const token = process.env.SPORTMONKS_API_TOKEN;
|
|
52
|
+
if (!token) throw new Error('Set SPORTMONKS_API_TOKEN before running this example.');
|
|
53
|
+
|
|
54
|
+
const url = new URL('https://api.sportmonks.com/v3/football/leagues');
|
|
55
|
+
url.searchParams.set('per_page', '1');
|
|
56
|
+
url.searchParams.set('api_token', token);
|
|
57
|
+
|
|
58
|
+
const response = await fetch(url);
|
|
59
|
+
const body = await response.json();
|
|
60
|
+
|
|
61
|
+
if (!response.ok) {
|
|
62
|
+
console.error(`Sportmonks request failed: HTTP ${response.status}. Inspect the response body locally after redacting any token.`);
|
|
63
|
+
} else {
|
|
64
|
+
console.log(body);
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Python
|
|
69
|
+
|
|
70
|
+
Requires `requests`.
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
import os
|
|
74
|
+
import requests
|
|
75
|
+
|
|
76
|
+
response = requests.get(
|
|
77
|
+
'https://api.sportmonks.com/v3/football/leagues',
|
|
78
|
+
params={
|
|
79
|
+
'per_page': 1,
|
|
80
|
+
'api_token': os.environ['SPORTMONKS_API_TOKEN'],
|
|
81
|
+
},
|
|
82
|
+
timeout=30,
|
|
83
|
+
)
|
|
84
|
+
body = response.json()
|
|
85
|
+
|
|
86
|
+
if not response.ok:
|
|
87
|
+
print(f'Sportmonks request failed: HTTP {response.status_code}. Inspect the response body locally after redacting any token.')
|
|
88
|
+
else:
|
|
89
|
+
print(body)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
{% endtab %}
|
|
93
|
+
|
|
94
|
+
{% tab title="Authorization header" %}
|
|
95
|
+
|
|
96
|
+
#### cURL (Bash/zsh)
|
|
97
|
+
|
|
98
|
+
Requires [cURL](https://curl.se/). Set `SPORTMONKS_API_TOKEN` in your shell first. Windows PowerShell users should use `curl.exe` and `$env:SPORTMONKS_API_TOKEN`.
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
curl "https://api.sportmonks.com/v3/football/leagues?per_page=1" -H "Authorization: ${SPORTMONKS_API_TOKEN}"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### JavaScript
|
|
105
|
+
|
|
106
|
+
Requires Node.js 18+ for built-in `fetch`. Save this code as an `.mjs` file or use it in an ES module because it uses top-level `await`.
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
const token = process.env.SPORTMONKS_API_TOKEN;
|
|
110
|
+
if (!token) throw new Error('Set SPORTMONKS_API_TOKEN before running this example.');
|
|
111
|
+
|
|
112
|
+
const response = await fetch(
|
|
113
|
+
'https://api.sportmonks.com/v3/football/leagues?per_page=1',
|
|
114
|
+
{ headers: { Authorization: token } }
|
|
115
|
+
);
|
|
116
|
+
const body = await response.json();
|
|
117
|
+
|
|
118
|
+
if (!response.ok) {
|
|
119
|
+
console.error(`Sportmonks request failed: HTTP ${response.status}. Inspect the response body locally after redacting any token.`);
|
|
120
|
+
} else {
|
|
121
|
+
console.log(body);
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Python
|
|
126
|
+
|
|
127
|
+
Requires `requests`.
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
import os
|
|
131
|
+
import requests
|
|
132
|
+
|
|
133
|
+
response = requests.get(
|
|
134
|
+
'https://api.sportmonks.com/v3/football/leagues?per_page=1',
|
|
135
|
+
headers={'Authorization': os.environ['SPORTMONKS_API_TOKEN']},
|
|
136
|
+
timeout=30,
|
|
137
|
+
)
|
|
138
|
+
body = response.json()
|
|
139
|
+
|
|
140
|
+
if not response.ok:
|
|
141
|
+
print(f'Sportmonks request failed: HTTP {response.status_code}. Inspect the response body locally after redacting any token.')
|
|
142
|
+
else:
|
|
143
|
+
print(body)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
{% endtab %}
|
|
147
|
+
{% endtabs %}
|
|
148
|
+
|
|
29
149
|
### How to create a new API Token in MySportmonks
|
|
30
150
|
|
|
31
151
|
You can obtain and manage your API token in [**MySportmonks.**](https://my.sportmonks.com/api/tokens) The API token is intended for your eyes only and, as such, should be stored securely. Our tokens have no expiration date and will remain valid until you manually delete them yourself.
|
|
32
152
|
|
|
33
153
|
Follow these simple steps to generate your API token:
|
|
34
154
|
|
|
35
|
-
1. Log in to[ MySportmonks](https://my.sportmonks.com/)
|
|
155
|
+
1. Log in to[ MySportmonks](https://my.sportmonks.com/).\
|
|
36
156
|
If you do not have an account, you can create one using this link: <https://my.sportmonks.com/register>
|
|
37
157
|
2. Go to the API section in your dashboard. A dropdown will unfold; select 'Tokens'.
|
|
38
158
|
3. Enter a name for your new token in the 'Token name' field.
|
|
@@ -42,6 +162,20 @@ Follow these simple steps to generate your API token:
|
|
|
42
162
|
|
|
43
163
|
Note: Be sure to store your token securely after it has been created. For security reasons, it will not be shown again or stored in MySportmonks.
|
|
44
164
|
|
|
165
|
+
### My token is not working
|
|
166
|
+
|
|
167
|
+
1. Confirm the canonical URL starts with `https://api.sportmonks.com/v3/football`. Do not use `/api/v3`.
|
|
168
|
+
2. Use the exact `api_token` query parameter or the documented raw `Authorization` header. If `Bearer` returns `401 Invalid token provided`, remove the prefix and send `Authorization: YOUR_TOKEN`. Test one method at a time.
|
|
169
|
+
3. Confirm the complete token has no accidental whitespace or quotes. Tokens do not expire automatically. They remain valid until deleted.
|
|
170
|
+
4. Test a basic endpoint without includes or filters. Inspect both the HTTP status and the API error message or code.
|
|
171
|
+
5. Treat `401` as an authentication issue. Treat `403` as subscription access. Treat `429` as rate limiting, not an invalid token.
|
|
172
|
+
6. Verify your active subscription, league access, and add-on entitlement separately from token validity.
|
|
173
|
+
7. If the request works locally but not on your server, compare the deployed environment variable, URL, and outgoing `Authorization` header. Include client, proxy, and redirect behavior.
|
|
174
|
+
|
|
175
|
+
For status meanings, see [Response Codes](https://docs.sportmonks.com/v3/definitions/response-codes). For `429` responses and rate-limit headers, see [Rate limit](https://docs.sportmonks.com/v3/api/rate-limit).
|
|
176
|
+
|
|
177
|
+
When contacting support, provide the authentication method, endpoint without its token, HTTP status, API error message, and relevant IDs. Redact tokens from URLs, headers, screenshots, and logs.
|
|
178
|
+
|
|
45
179
|
### Error codes
|
|
46
180
|
|
|
47
181
|
When making a request, a code response will always be returned. The following are all possible HTTP response codes for any request made to the API:
|
|
@@ -52,7 +186,7 @@ When making a request, a code response will always be returned. The following ar
|
|
|
52
186
|
| **400: Bad Request** | It seems that some part of the request is malformed. The exact reason is returned in the response. |
|
|
53
187
|
| **401: Unauthorized** | The request is not authenticated. |
|
|
54
188
|
| **403: Forbidden** | Not authorized. Indicates you're attempting to access a feed that is not accessible from your plan. |
|
|
55
|
-
| **429: Too Many Requests** | Too many requests.
|
|
189
|
+
| **429: Too Many Requests** | Too many requests. Check the `rate_limit` response section and rate-limit headers for the applicable limit and remaining requests. |
|
|
56
190
|
| **500: Internal Server Error** | <p>An internal error has occurred and has been logged for further inspection. Please email support if you are receiving this error.<br><br>Check our <a href="https://status.sportmonks.com/">status page</a> to see if we are aware of any possible issues</p> |
|
|
57
191
|
|
|
58
192
|
{% hint style="danger" %}
|