football-docs 0.17.9 → 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.
Files changed (414) hide show
  1. package/README.md +72 -14
  2. package/data/docs.db +0 -0
  3. package/dist/crawl.d.ts +4 -0
  4. package/dist/crawl.js +10 -4
  5. package/dist/data-format.d.ts +11 -0
  6. package/dist/data-format.js +22 -0
  7. package/dist/ingest.d.ts +9 -0
  8. package/dist/ingest.js +22 -0
  9. package/dist/skillcorner-spec.d.ts +2 -0
  10. package/dist/skillcorner-spec.js +5 -2
  11. package/dist/statsbomb-truth.js +14 -5
  12. package/dist/tools.d.ts +18 -0
  13. package/dist/tools.js +30 -10
  14. package/docs/api-football/api-access.md +1 -0
  15. package/docs/api-football/data-model.md +1 -0
  16. package/docs/api-football/identity-surfaces.md +1 -0
  17. package/docs/besoccer/api-access.md +1 -0
  18. package/docs/besoccer/api-endpoints.md +1 -0
  19. package/docs/besoccer/data-provenance.md +1 -0
  20. package/docs/databallpy/data-model.md +6 -0
  21. package/docs/databallpy/overview.md +7 -1
  22. package/docs/databallpy/usage.md +6 -0
  23. package/docs/driblab/api-access.md +1 -0
  24. package/docs/driblab/api-endpoints.md +1 -0
  25. package/docs/driblab/data-model.md +1 -0
  26. package/docs/driblab/data-provenance.md +1 -0
  27. package/docs/espn/api-access.md +1 -0
  28. package/docs/espn/identity-and-coverage.md +1 -0
  29. package/docs/espn/match-summary.md +1 -0
  30. package/docs/espn/scoreboard.md +1 -0
  31. package/docs/espn/teams-and-standings.md +1 -0
  32. package/docs/fast-forward/api.md +1 -0
  33. package/docs/fast-forward/benchmarks.md +1 -0
  34. package/docs/fast-forward/concepts-coordinate-systems.md +1 -0
  35. package/docs/fast-forward/concepts-dataset.md +1 -0
  36. package/docs/fast-forward/concepts-distributed-compute.md +1 -0
  37. package/docs/fast-forward/concepts-filelike.md +1 -0
  38. package/docs/fast-forward/concepts-layouts.md +1 -0
  39. package/docs/fast-forward/concepts-orientations.md +1 -0
  40. package/docs/fast-forward/concepts-transformations.md +1 -0
  41. package/docs/fast-forward/getting-started.md +1 -0
  42. package/docs/fast-forward/index.md +1 -0
  43. package/docs/fast-forward/providers-cdf.md +1 -0
  44. package/docs/fast-forward/providers-gradientsports.md +1 -0
  45. package/docs/fast-forward/providers-hawkeye.md +1 -0
  46. package/docs/fast-forward/providers-optavision.md +1 -0
  47. package/docs/fast-forward/providers-respovision.md +1 -0
  48. package/docs/fast-forward/providers-scisports.md +1 -0
  49. package/docs/fast-forward/providers-secondspectrum.md +1 -0
  50. package/docs/fast-forward/providers-signality.md +1 -0
  51. package/docs/fast-forward/providers-skillcorner.md +1 -0
  52. package/docs/fast-forward/providers-sportec.md +1 -0
  53. package/docs/fast-forward/providers-statsperform.md +1 -0
  54. package/docs/fast-forward/providers-tracab.md +1 -0
  55. package/docs/fast-forward/providers.md +1 -0
  56. package/docs/fast-forward/reporting-issues.md +1 -0
  57. package/docs/firstbeat/api-access.md +1 -0
  58. package/docs/firstbeat/api-endpoints.md +1 -0
  59. package/docs/firstbeat/data-model.md +1 -0
  60. package/docs/firstbeat/data-provenance.md +1 -0
  61. package/docs/firstbeat/identity-surfaces.md +1 -0
  62. package/docs/firstbeat/variables.md +1 -0
  63. package/docs/floodlight/compendium-0-compendium.md +1 -0
  64. package/docs/floodlight/compendium-1-data.md +1 -0
  65. package/docs/floodlight/compendium-2-design.md +1 -0
  66. package/docs/floodlight/compendium-3-time.md +1 -0
  67. package/docs/floodlight/compendium-4-space.md +1 -0
  68. package/docs/floodlight/compendium-5-identifier.md +1 -0
  69. package/docs/floodlight/core-code.md +1 -0
  70. package/docs/floodlight/core-core.md +1 -0
  71. package/docs/floodlight/core-definitions.md +1 -0
  72. package/docs/floodlight/core-events.md +1 -0
  73. package/docs/floodlight/core-pitch.md +1 -0
  74. package/docs/floodlight/core-property.md +1 -0
  75. package/docs/floodlight/core-teamsheet.md +1 -0
  76. package/docs/floodlight/core-xy.md +1 -0
  77. package/docs/floodlight/guides-contrib-manual.md +1 -0
  78. package/docs/floodlight/guides-getting-started.md +1 -0
  79. package/docs/floodlight/guides-tutorial-analysis.md +1 -0
  80. package/docs/floodlight/guides-tutorial-matchsheets.md +1 -0
  81. package/docs/floodlight/index.md +1 -0
  82. package/docs/floodlight/io-datasets.md +1 -0
  83. package/docs/floodlight/io-dfl.md +1 -0
  84. package/docs/floodlight/io-io.md +1 -0
  85. package/docs/floodlight/io-kinexon.md +1 -0
  86. package/docs/floodlight/io-opta.md +1 -0
  87. package/docs/floodlight/io-secondspectrum.md +1 -0
  88. package/docs/floodlight/io-skillcorner.md +1 -0
  89. package/docs/floodlight/io-sportradar.md +1 -0
  90. package/docs/floodlight/io-statsbomb.md +1 -0
  91. package/docs/floodlight/io-statsperform.md +1 -0
  92. package/docs/floodlight/io-tracab.md +1 -0
  93. package/docs/floodlight/io-utils.md +1 -0
  94. package/docs/floodlight/metrics-entropy.md +1 -0
  95. package/docs/floodlight/metrics-metrics.md +1 -0
  96. package/docs/floodlight/metrics-trajectory-clustering.md +1 -0
  97. package/docs/floodlight/metrics-zone-aggregation.md +1 -0
  98. package/docs/floodlight/models-geometry.md +1 -0
  99. package/docs/floodlight/models-kinematics.md +1 -0
  100. package/docs/floodlight/models-kinetics.md +1 -0
  101. package/docs/floodlight/models-models.md +1 -0
  102. package/docs/floodlight/models-space.md +1 -0
  103. package/docs/floodlight/transforms-filter.md +1 -0
  104. package/docs/floodlight/transforms-interpolation.md +1 -0
  105. package/docs/floodlight/transforms-permutation.md +1 -0
  106. package/docs/floodlight/transforms-spatial.md +1 -0
  107. package/docs/floodlight/transforms-temporal.md +1 -0
  108. package/docs/floodlight/transforms-transforms.md +1 -0
  109. package/docs/floodlight/utils-types.md +1 -0
  110. package/docs/floodlight/utils-utils.md +1 -0
  111. package/docs/floodlight/vis-pitches.md +1 -0
  112. package/docs/floodlight/vis-positions.md +1 -0
  113. package/docs/floodlight/vis-vis.md +1 -0
  114. package/docs/fmdb-pro/api-access.md +1 -0
  115. package/docs/fmdb-pro/api-endpoints.md +1 -0
  116. package/docs/fmdb-pro/data-model.md +1 -0
  117. package/docs/fmdb-pro/data-provenance.md +1 -0
  118. package/docs/fmdb-pro/identity-surfaces.md +1 -0
  119. package/docs/fotmob/data-provenance.md +1 -0
  120. package/docs/fotmob/identity-surfaces.md +6 -1
  121. package/docs/free-sources/fbref.md +25 -15
  122. package/docs/free-sources/football-data-columns.md +1 -0
  123. package/docs/free-sources/overview.md +12 -8
  124. package/docs/free-sources/understat.md +6 -0
  125. package/docs/hawkin-dynamics/api-access.md +1 -0
  126. package/docs/hawkin-dynamics/api-endpoints.md +1 -0
  127. package/docs/hawkin-dynamics/data-model.md +1 -0
  128. package/docs/hawkin-dynamics/data-provenance.md +1 -0
  129. package/docs/hawkin-dynamics/identity-surfaces.md +1 -0
  130. package/docs/hawkin-dynamics/test-metrics.md +1 -0
  131. package/docs/impect/concepts.md +2 -1
  132. package/docs/impect/coordinate-system.md +2 -1
  133. package/docs/impect/data-model.md +2 -1
  134. package/docs/impect/data-provenance.md +1 -0
  135. package/docs/impect/event-types.md +2 -1
  136. package/docs/impect/identity-surfaces.md +2 -1
  137. package/docs/impect/kpi-definitions.md +2 -1
  138. package/docs/impect/overview.md +2 -1
  139. package/docs/kloppy/data-model.md +18 -12
  140. package/docs/kloppy/provider-mapping.md +76 -79
  141. package/docs/kloppy/tracking-rendering.md +6 -0
  142. package/docs/kloppy/usage.md +28 -31
  143. package/docs/metric-cards/vaep.md +2 -2
  144. package/docs/mplsoccer/overview.md +8 -2
  145. package/docs/mplsoccer/pitch-types.md +6 -0
  146. package/docs/mplsoccer/visualizations.md +6 -0
  147. package/docs/opta/charting-lineups.md +2 -2
  148. package/docs/opta/data-provenance.md +1 -0
  149. package/docs/opta/event-types.md +7 -0
  150. package/docs/opta/qualifiers.md +8 -0
  151. package/docs/reep/api.md +1 -0
  152. package/docs/reep/data-provenance.md +1 -0
  153. package/docs/reep/download-duckdb-csv.md +1 -0
  154. package/docs/reep/identity-and-ids.md +1 -0
  155. package/docs/reep/overview.md +1 -0
  156. package/docs/skillcorner/api-access.md +11 -0
  157. package/docs/skillcorner/api-endpoints.md +2 -0
  158. package/docs/skillcorner/concepts.md +1 -0
  159. package/docs/skillcorner/coordinate-system.md +1 -0
  160. package/docs/skillcorner/data-model.md +2 -1
  161. package/docs/skillcorner/data-provenance.md +1 -0
  162. package/docs/skillcorner/dynamic-events-delivered-values.md +1 -0
  163. package/docs/skillcorner/dynamic-events.md +1 -0
  164. package/docs/skillcorner/identity-surfaces.md +1 -0
  165. package/docs/skillcorner/physical-data.md +1 -0
  166. package/docs/socceraction/spadl.md +6 -0
  167. package/docs/socceraction/vaep-xt.md +6 -0
  168. package/docs/soccerdata/data-sources.md +6 -0
  169. package/docs/soccerdata/overview.md +6 -0
  170. package/docs/soccerdata/usage.md +8 -2
  171. package/docs/soccerdonna/data-provenance.md +1 -0
  172. package/docs/soccerdonna/identity-surfaces.md +1 -1
  173. package/docs/sportmonks/api-access.md +45 -35
  174. package/docs/sportmonks/api-changes.md +7 -6
  175. package/docs/sportmonks/authentication.md +140 -5
  176. package/docs/sportmonks/best-practices.md +50 -15
  177. package/docs/sportmonks/changelog-beta.md +19 -18
  178. package/docs/sportmonks/changelog.md +42 -27
  179. package/docs/sportmonks/code-libraries.md +2 -1
  180. package/docs/sportmonks/data-corrections.md +2 -1
  181. package/docs/sportmonks/data-model.md +7 -1
  182. package/docs/sportmonks/data-provenance.md +1 -0
  183. package/docs/sportmonks/demo-response-files.md +2 -1
  184. package/docs/sportmonks/differences-between-api-2-and-api-3.md +3 -2
  185. package/docs/sportmonks/endpoints.md +12 -8
  186. package/docs/sportmonks/error-codes.md +85 -60
  187. package/docs/sportmonks/event-types.md +5 -0
  188. package/docs/sportmonks/filtering-and-complexity-exceptions.md +7 -6
  189. package/docs/sportmonks/filtering.md +29 -5
  190. package/docs/sportmonks/fixtures.md +5 -4
  191. package/docs/sportmonks/get-all-fixtures.md +9 -8
  192. package/docs/sportmonks/get-all-leagues-by-team-id.md +9 -8
  193. package/docs/sportmonks/get-all-leagues.md +9 -8
  194. package/docs/sportmonks/get-all-livescores.md +9 -8
  195. package/docs/sportmonks/get-all-seasons.md +9 -8
  196. package/docs/sportmonks/get-all-states.md +8 -7
  197. package/docs/sportmonks/get-all-types.md +7 -6
  198. package/docs/sportmonks/get-brackets-by-season-id.md +11 -8
  199. package/docs/sportmonks/get-current-leagues-by-team-id.md +9 -8
  200. package/docs/sportmonks/get-fixture-by-id.md +9 -8
  201. package/docs/sportmonks/get-fixtures-by-date-range-for-team.md +9 -8
  202. package/docs/sportmonks/get-fixtures-by-date-range.md +35 -8
  203. package/docs/sportmonks/get-fixtures-by-date.md +9 -8
  204. package/docs/sportmonks/get-fixtures-by-head-to-head.md +9 -8
  205. package/docs/sportmonks/get-fixtures-by-multiple-ids.md +9 -8
  206. package/docs/sportmonks/get-fixtures-by-search-by-name.md +9 -8
  207. package/docs/sportmonks/get-inplay-livescores.md +8 -7
  208. package/docs/sportmonks/get-latest-updated-fixtures.md +9 -8
  209. package/docs/sportmonks/get-latest-updated-livescores.md +9 -8
  210. package/docs/sportmonks/get-league-by-id.md +9 -8
  211. package/docs/sportmonks/get-leagues-by-country-id.md +9 -8
  212. package/docs/sportmonks/get-leagues-by-fixture-date.md +9 -8
  213. package/docs/sportmonks/get-leagues-by-live.md +9 -8
  214. package/docs/sportmonks/get-leagues-search-by-name.md +9 -8
  215. package/docs/sportmonks/get-past-fixtures-by-tv-station-id.md +9 -8
  216. package/docs/sportmonks/get-seasons-by-id.md +9 -8
  217. package/docs/sportmonks/get-seasons-by-search-by-name.md +9 -8
  218. package/docs/sportmonks/get-seasons-by-team-id.md +9 -8
  219. package/docs/sportmonks/get-state-by-id.md +8 -7
  220. package/docs/sportmonks/get-type-by-entity.md +3 -2
  221. package/docs/sportmonks/get-type-by-id.md +7 -6
  222. package/docs/sportmonks/get-upcoming-fixtures-by-market-id.md +9 -8
  223. package/docs/sportmonks/get-upcoming-fixtures-by-tv-station-id.md +9 -8
  224. package/docs/sportmonks/getting-started.md +11 -10
  225. package/docs/sportmonks/identity-surfaces.md +1 -0
  226. package/docs/sportmonks/include-exceptions.md +8 -7
  227. package/docs/sportmonks/includes.md +66 -3
  228. package/docs/sportmonks/leagues.md +3 -2
  229. package/docs/sportmonks/livescores.md +5 -4
  230. package/docs/sportmonks/making-your-first-request.md +93 -27
  231. package/docs/sportmonks/meta-description.md +3 -2
  232. package/docs/sportmonks/nested-includes.md +4 -3
  233. package/docs/sportmonks/new-endpoints-and-data-features.md +16 -15
  234. package/docs/sportmonks/ordering-and-sorting.md +2 -1
  235. package/docs/sportmonks/other-exceptions.md +8 -7
  236. package/docs/sportmonks/overview.md +6 -12
  237. package/docs/sportmonks/rate-limit.md +310 -446
  238. package/docs/sportmonks/request-options.md +7 -6
  239. package/docs/sportmonks/seasons.md +6 -5
  240. package/docs/sportmonks/selecting-and-filtering.md +3 -2
  241. package/docs/sportmonks/selecting-fields.md +4 -3
  242. package/docs/sportmonks/states.md +4 -3
  243. package/docs/sportmonks/statistics.md +3 -2
  244. package/docs/sportmonks/syntax-and-filters.md +6 -5
  245. package/docs/sportmonks/syntax.md +2 -1
  246. package/docs/sportmonks/translations-beta.md +2 -1
  247. package/docs/sportmonks/types.md +2 -1
  248. package/docs/sportmonks/what-can-you-do-with-sportmonks-data.md +5 -4
  249. package/docs/sportradar/api-access.md +1 -0
  250. package/docs/sportradar/api-endpoints.md +1 -0
  251. package/docs/sportradar/charting-and-stories.md +1 -0
  252. package/docs/sportradar/data-model.md +1 -0
  253. package/docs/sportradar/data-provenance.md +1 -0
  254. package/docs/sportradar/integration-notes.md +1 -0
  255. package/docs/sportradar/monitoring-data-changes.md +2 -1
  256. package/docs/sportradar/soccer-api-vs-soccer-extended-api.md +2 -1
  257. package/docs/sportradar/soccer-extended-competition-info.md +2 -1
  258. package/docs/sportradar/soccer-extended-competition-seasons.md +2 -1
  259. package/docs/sportradar/soccer-extended-competitions.md +2 -1
  260. package/docs/sportradar/soccer-extended-competitor-mappings.md +2 -1
  261. package/docs/sportradar/soccer-extended-competitor-merge-mappings.md +2 -1
  262. package/docs/sportradar/soccer-extended-competitor-profile.md +81 -86
  263. package/docs/sportradar/soccer-extended-competitor-schedules.md +3 -2
  264. package/docs/sportradar/soccer-extended-competitor-summaries.md +2 -1
  265. package/docs/sportradar/soccer-extended-competitor-vs-competitor.md +2 -1
  266. package/docs/sportradar/soccer-extended-daily-schedules.md +2 -1
  267. package/docs/sportradar/soccer-extended-daily-summaries.md +2 -1
  268. package/docs/sportradar/soccer-extended-faq.md +12 -3
  269. package/docs/sportradar/soccer-extended-fifa-rankings.md +2 -1
  270. package/docs/sportradar/soccer-extended-league-timeline.md +2 -1
  271. package/docs/sportradar/soccer-extended-live-schedules.md +2 -1
  272. package/docs/sportradar/soccer-extended-live-summaries.md +2 -1
  273. package/docs/sportradar/soccer-extended-live-timelines-delta.md +2 -1
  274. package/docs/sportradar/soccer-extended-live-timelines.md +2 -1
  275. package/docs/sportradar/soccer-extended-overview.md +2 -1
  276. package/docs/sportradar/soccer-extended-player-mappings.md +2 -1
  277. package/docs/sportradar/soccer-extended-player-merge-mappings.md +2 -1
  278. package/docs/sportradar/soccer-extended-player-profile.md +2 -1
  279. package/docs/sportradar/soccer-extended-player-schedules.md +2 -1
  280. package/docs/sportradar/soccer-extended-player-summaries.md +2 -1
  281. package/docs/sportradar/soccer-extended-push-events.md +2 -1
  282. package/docs/sportradar/soccer-extended-push-feeds.md +2 -1
  283. package/docs/sportradar/soccer-extended-push-statistics.md +2 -1
  284. package/docs/sportradar/soccer-extended-season-competitors.md +2 -1
  285. package/docs/sportradar/soccer-extended-season-form-standings.md +2 -1
  286. package/docs/sportradar/soccer-extended-season-info.md +4 -2
  287. package/docs/sportradar/soccer-extended-season-leaders.md +2 -1
  288. package/docs/sportradar/soccer-extended-season-lineups.md +5 -4
  289. package/docs/sportradar/soccer-extended-season-links.md +3 -2
  290. package/docs/sportradar/soccer-extended-season-missing-players.md +2 -1
  291. package/docs/sportradar/soccer-extended-season-overunder-statistics.md +2 -1
  292. package/docs/sportradar/soccer-extended-season-players.md +2 -1
  293. package/docs/sportradar/soccer-extended-season-schedule.md +2 -1
  294. package/docs/sportradar/soccer-extended-season-standings.md +4 -2
  295. package/docs/sportradar/soccer-extended-season-summaries.md +2 -1
  296. package/docs/sportradar/soccer-extended-season-transfers.md +2 -1
  297. package/docs/sportradar/soccer-extended-season-venues.md +2 -1
  298. package/docs/sportradar/soccer-extended-seasonal-competitor-extended-stati.md +2 -1
  299. package/docs/sportradar/soccer-extended-seasonal-competitor-players.md +2 -1
  300. package/docs/sportradar/soccer-extended-seasonal-competitor-statistics.md +3 -1
  301. package/docs/sportradar/soccer-extended-seasons-disabled.md +2 -1
  302. package/docs/sportradar/soccer-extended-seasons.md +2 -1
  303. package/docs/sportradar/soccer-extended-sport-event-extended-summary.md +2 -1
  304. package/docs/sportradar/soccer-extended-sport-event-extended-timeline.md +2 -1
  305. package/docs/sportradar/soccer-extended-sport-event-fun-facts.md +2 -1
  306. package/docs/sportradar/soccer-extended-sport-event-insights.md +2 -1
  307. package/docs/sportradar/soccer-extended-sport-event-lineups.md +2 -1
  308. package/docs/sportradar/soccer-extended-sport-event-momentum.md +2 -1
  309. package/docs/sportradar/soccer-extended-sport-event-summary.md +48 -2
  310. package/docs/sportradar/soccer-extended-sport-event-timeline.md +3 -2
  311. package/docs/sportradar/soccer-extended-sport-events-created.md +2 -1
  312. package/docs/sportradar/soccer-extended-sport-events-removed.md +2 -1
  313. package/docs/sportradar/soccer-extended-sport-events-updated.md +2 -1
  314. package/docs/sportradar/soccer-ig-api-basics.md +2 -1
  315. package/docs/sportradar/soccer-ig-data-coverage-tiers.md +2 -1
  316. package/docs/sportradar/soccer-ig-fixtures.md +2 -1
  317. package/docs/sportradar/soccer-ig-historical-data.md +3 -2
  318. package/docs/sportradar/soccer-ig-id-handling.md +3 -2
  319. package/docs/sportradar/soccer-ig-live-match-retrieval.md +2 -1
  320. package/docs/sportradar/soccer-ig-match-status-workflow.md +2 -1
  321. package/docs/sportradar/soccer-ig-overview.md +2 -1
  322. package/docs/sportradar/soccer-ig-push.md +2 -1
  323. package/docs/sportradar/soccer-ig-rosters-lineups-transfers.md +3 -2
  324. package/docs/sportradar/soccer-ig-scenarios.md +2 -1
  325. package/docs/sportradar/soccer-ig-seasonal-stats.md +2 -1
  326. package/docs/sportradar/soccer-ig-tracking-standings.md +2 -1
  327. package/docs/sportradar/soccer-ig-tracking-tournaments.md +2 -1
  328. package/docs/sportradar/soccer-ig-update-frequencies.md +2 -1
  329. package/docs/statsbomb/api-access.md +18 -10
  330. package/docs/statsbomb/api-endpoints.md +48 -33
  331. package/docs/statsbomb/charting-lineups.md +89 -7
  332. package/docs/statsbomb/coordinate-system.md +37 -1
  333. package/docs/statsbomb/data-model.md +137 -22
  334. package/docs/statsbomb/data-provenance.md +1 -0
  335. package/docs/statsbomb/event-types.md +218 -20
  336. package/docs/statsbomb/identity-surfaces.md +17 -1
  337. package/docs/statsbomb/iq-metrics-glossary.md +83 -9
  338. package/docs/statsbomb/live-data.md +481 -0
  339. package/docs/statsbomb/player-mapping.md +4 -1
  340. package/docs/statsbomb/player-match-stats.md +61 -14
  341. package/docs/statsbomb/player-season-stats.md +50 -4
  342. package/docs/statsbomb/team-match-stats.md +55 -5
  343. package/docs/statsbomb/team-season-stats.md +43 -3
  344. package/docs/statsbomb/xg-model.md +41 -83
  345. package/docs/statsports/api-access.md +1 -0
  346. package/docs/statsports/api-endpoints.md +1 -0
  347. package/docs/statsports/data-model.md +1 -0
  348. package/docs/statsports/data-provenance.md +1 -0
  349. package/docs/statsports/drill-kpi-metrics.md +1 -0
  350. package/docs/statsports/identity-surfaces.md +1 -0
  351. package/docs/thesportsdb/api-access.md +1 -0
  352. package/docs/thesportsdb/api-endpoints.md +1 -0
  353. package/docs/thesportsdb/data-provenance.md +1 -0
  354. package/docs/thesportsdb/identity-surfaces.md +1 -0
  355. package/docs/thesportsdb/livescore.md +1 -0
  356. package/docs/transfermarkt/data-provenance.md +1 -0
  357. package/docs/transfermarkt/identity-surfaces.md +2 -1
  358. package/docs/transfermarkt/transfermarkt-datasets.md +1 -0
  359. package/docs/transferroom/api-access.md +1 -0
  360. package/docs/transferroom/api-endpoints.md +1 -0
  361. package/docs/transferroom/charting-availability.md +6 -0
  362. package/docs/transferroom/data-model.md +1 -0
  363. package/docs/transferroom/data-provenance.md +1 -0
  364. package/docs/transferroom/identity-surfaces.md +1 -0
  365. package/docs/unravelsports/additional-citations.md +1 -0
  366. package/docs/unravelsports/additional-license.md +1 -0
  367. package/docs/unravelsports/american-football-dataset.md +1 -0
  368. package/docs/unravelsports/american-football-graphs.md +1 -0
  369. package/docs/unravelsports/api-american-football.md +1 -0
  370. package/docs/unravelsports/api-classifiers.md +1 -0
  371. package/docs/unravelsports/api-soccer.md +1 -0
  372. package/docs/unravelsports/api-utils.md +1 -0
  373. package/docs/unravelsports/generated-unravel-utils-add-dummy-label-column.md +1 -0
  374. package/docs/unravelsports/generated-unravel-utils-add-graph-id-column.md +1 -0
  375. package/docs/unravelsports/generated-unravel-utils-dummy-graph-ids.md +1 -0
  376. package/docs/unravelsports/generated-unravel-utils-dummy-labels.md +1 -0
  377. package/docs/unravelsports/getting-started-concepts.md +1 -0
  378. package/docs/unravelsports/getting-started-installation.md +1 -0
  379. package/docs/unravelsports/getting-started-quickstart.md +1 -0
  380. package/docs/unravelsports/index.md +1 -0
  381. package/docs/unravelsports/soccer-dataset.md +1 -0
  382. package/docs/unravelsports/soccer-graphs.md +1 -0
  383. package/docs/unravelsports/soccer-models.md +1 -0
  384. package/docs/unravelsports/tutorials-american-football.md +1 -0
  385. package/docs/unravelsports/tutorials-formation-detection.md +1 -0
  386. package/docs/unravelsports/tutorials-pressing-intensity.md +1 -0
  387. package/docs/unravelsports/tutorials-soccer-gnn.md +1 -0
  388. package/docs/unravelsports/utils-features.md +1 -0
  389. package/docs/unravelsports/utils-helpers.md +1 -0
  390. package/docs/unravelsports/utils-objects.md +1 -0
  391. package/docs/vald/api-access.md +5 -2
  392. package/docs/vald/api-endpoints.md +3 -1
  393. package/docs/vald/data-provenance.md +1 -0
  394. package/docs/vald/dynamo.md +1 -0
  395. package/docs/vald/forcedecks.md +1 -0
  396. package/docs/vald/forceframe.md +1 -0
  397. package/docs/vald/humantrak.md +1 -0
  398. package/docs/vald/identity-surfaces.md +1 -0
  399. package/docs/vald/nordbord.md +88 -40
  400. package/docs/vald/profiles.md +1 -0
  401. package/docs/vald/smartspeed.md +1 -0
  402. package/docs/vald/tenants.md +1 -0
  403. package/docs/wyscout/api-access.md +1 -0
  404. package/docs/wyscout/api-endpoints.md +1 -0
  405. package/docs/wyscout/charting-analysis-metrics.md +6 -0
  406. package/docs/wyscout/coordinate-system.md +1 -0
  407. package/docs/wyscout/data-model.md +1 -0
  408. package/docs/wyscout/data-provenance.md +1 -0
  409. package/docs/wyscout/event-types.md +1 -0
  410. package/docs/wyscout/glossary-events.md +1 -0
  411. package/docs/wyscout/glossary-metrics-concepts.md +1 -0
  412. package/docs/wyscout/identity-surfaces.md +2 -1
  413. package/package.json +2 -1
  414. 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
- Settings → MCP → Add server. Use this config:
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
- Add to `.vscode/mcp.json`:
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 | 244 | event-types, data-model, coordinate-system, api-access, api-endpoints, charting-lineups, xg-model, iq-metrics, player/team stats, player-mapping, identity-surfaces, data-provenance |
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
- | kloppy | 126 | data-model, usage, provider-mapping, tracking-rendering, event-derived-metrics |
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 | 568 | 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 |
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 | 80 | api-access, api-endpoints, data-model, dynamic-events, dynamic-events-delivered-values, physical-data, coordinate-system, concepts, identity-surfaces, data-provenance |
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 | 481 | 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 |
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 | 318 | api-access, api-endpoints, per-product endpoints and schemas (tenants, profiles, forcedecks, nordbord, forceframe, smartspeed, dynamo, humantrak), identity-surfaces, data-provenance |
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,589 searchable chunks** across 32 providers and tools (the metric cards count as one).
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, and the free-source and Reep live checks below. It runs by hand, never in CI, and
390
- lists what to review.
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
@@ -445,6 +502,7 @@ Two registry fields narrow a crawl. `llms_indexes` lists llms.txt files that lin
445
502
  npm run discover # probe sources without crawling
446
503
  npm run crawl # crawl all providers with sources
447
504
  npm run crawl -- --provider kloppy # crawl one provider
505
+ npm run permalinks # add archived_url permalinks for each source_url
448
506
  npm run ingest # rebuild search index from docs/
449
507
  npm run ingest -- --provider kloppy # re-ingest one provider (incremental)
450
508
  ```
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(DOCS_DIR, provider);
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`);
@@ -79,7 +79,18 @@ export interface MetaInput {
79
79
  providersJson: string;
80
80
  /** metrics/cards.json, when the build has metric cards. Servers before 0.17 ignore the key. */
81
81
  metricCardsJson?: string;
82
+ /**
83
+ * JSON object mapping each doc ("provider/category") to its archived_url.
84
+ * Permalinks live here, not in a docs column, so the schema servers up to
85
+ * 0.17.9 check exactly stays the same. Older servers ignore the key.
86
+ */
87
+ archivedUrlsJson?: string;
82
88
  }
89
+ /**
90
+ * The "provider/category" to archived_url map from the meta table. Empty when the index
91
+ * has no meta table, no map, or a map that is not a JSON object of strings.
92
+ */
93
+ export declare function readArchivedUrls(db: Database): Map<string, string>;
83
94
  /** Replace the meta table's contents. Used by ingest. */
84
95
  export declare function writeMeta(db: Database, input: MetaInput): void;
85
96
  /** Settings for any docs database this process opens, bundled or downloaded. */
@@ -130,6 +130,26 @@ export function readMeta(db) {
130
130
  providers: providers.data,
131
131
  };
132
132
  }
133
+ /**
134
+ * The "provider/category" to archived_url map from the meta table. Empty when the index
135
+ * has no meta table, no map, or a map that is not a JSON object of strings.
136
+ */
137
+ export function readArchivedUrls(db) {
138
+ if (!hasMetaTable(db))
139
+ return new Map();
140
+ const row = db.prepare("SELECT value FROM meta WHERE key = 'archived_urls'").get();
141
+ if (!row)
142
+ return new Map();
143
+ try {
144
+ const parsed = JSON.parse(row.value);
145
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
146
+ return new Map();
147
+ return new Map(Object.entries(parsed).filter((entry) => typeof entry[1] === "string"));
148
+ }
149
+ catch {
150
+ return new Map();
151
+ }
152
+ }
133
153
  /** Replace the meta table's contents. Used by ingest. */
134
154
  export function writeMeta(db, input) {
135
155
  const insert = db.prepare("INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)");
@@ -143,6 +163,8 @@ export function writeMeta(db, input) {
143
163
  insert.run("providers_json", input.providersJson);
144
164
  if (input.metricCardsJson)
145
165
  insert.run("metric_cards", input.metricCardsJson);
166
+ if (input.archivedUrlsJson)
167
+ insert.run("archived_urls", input.archivedUrlsJson);
146
168
  });
147
169
  }
148
170
  /** FTS5's internal tables. Their SQL is written by SQLite, not by us. */
package/dist/ingest.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * Each markdown file can include a YAML frontmatter block with provenance:
8
8
  * ---
9
9
  * source_url: https://example.com/docs
10
+ * archived_url: https://web.archive.org/web/20260326000000/https://example.com/docs
10
11
  * source_type: readthedocs
11
12
  * upstream_version: 1.8.8
12
13
  * crawled_at: 2026-03-26T00:00:00Z
@@ -21,6 +22,8 @@
21
22
  import { SCHEMA_SQL } from "./data-format.js";
22
23
  interface Frontmatter {
23
24
  source_url: string | null;
25
+ /** A link that keeps showing the page as it was read (scripts/permalinks.mts). */
26
+ archived_url: string | null;
24
27
  source_type: string;
25
28
  upstream_version: string | null;
26
29
  crawled_at: string | null;
@@ -43,3 +46,9 @@ export declare function parseFrontmatter(raw: string): {
43
46
  /** Split a markdown file into chunks by ## or ### headings. */
44
47
  export declare function chunkMarkdown(text: string, provider: string, category: string): DocChunk[];
45
48
  export { SCHEMA_SQL };
49
+ /**
50
+ * Each doc's archived_url, keyed by "provider/category" (the doc's file), read
51
+ * from all docs so a single-provider ingest keeps the full map. Two docs can
52
+ * share a source_url but were read on different dates, so the key is the doc.
53
+ */
54
+ export declare function archivedUrlMap(docsDir?: string): Record<string, string>;
package/dist/ingest.js CHANGED
@@ -7,6 +7,7 @@
7
7
  * Each markdown file can include a YAML frontmatter block with provenance:
8
8
  * ---
9
9
  * source_url: https://example.com/docs
10
+ * archived_url: https://web.archive.org/web/20260326000000/https://example.com/docs
10
11
  * source_type: readthedocs
11
12
  * upstream_version: 1.8.8
12
13
  * crawled_at: 2026-03-26T00:00:00Z
@@ -37,6 +38,7 @@ export function parseFrontmatter(raw) {
37
38
  const text = raw.replace(/\r\n?/g, "\n");
38
39
  const defaults = {
39
40
  source_url: null,
41
+ archived_url: null,
40
42
  source_type: "curated",
41
43
  upstream_version: null,
42
44
  crawled_at: null,
@@ -127,6 +129,25 @@ export { SCHEMA_SQL };
127
129
  function ensureSchema(db) {
128
130
  db.exec(SCHEMA_SQL);
129
131
  }
132
+ /**
133
+ * Each doc's archived_url, keyed by "provider/category" (the doc's file), read
134
+ * from all docs so a single-provider ingest keeps the full map. Two docs can
135
+ * share a source_url but were read on different dates, so the key is the doc.
136
+ */
137
+ export function archivedUrlMap(docsDir = DOCS_DIR) {
138
+ const map = {};
139
+ for (const provider of readdirSync(docsDir).sort()) {
140
+ const dir = resolve(docsDir, provider);
141
+ if (!existsSync(dir) || !statSync(dir).isDirectory())
142
+ continue;
143
+ for (const file of readdirSync(dir).filter((f) => f.endsWith(".md")).sort()) {
144
+ const { frontmatter } = parseFrontmatter(readFileSync(resolve(dir, file), "utf-8"));
145
+ if (frontmatter.archived_url)
146
+ map[`${provider}/${basename(file, ".md")}`] = frontmatter.archived_url;
147
+ }
148
+ }
149
+ return map;
150
+ }
130
151
  function git(args) {
131
152
  try {
132
153
  return execFileSync("git", args, { cwd: resolve(__dirname, ".."), encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim() || null;
@@ -150,6 +171,7 @@ function recordMeta(db) {
150
171
  commit: process.env.GITHUB_SHA || git(["rev-parse", "HEAD"]),
151
172
  providersJson: readFileSync(PROVIDERS_PATH, "utf-8"),
152
173
  metricCardsJson: existsSync(METRIC_CARDS_PATH) ? readFileSync(METRIC_CARDS_PATH, "utf-8") : undefined,
174
+ archivedUrlsJson: JSON.stringify(archivedUrlMap()),
153
175
  });
154
176
  }
155
177
  /** Drop everything and recreate from scratch. */
@@ -18,6 +18,8 @@
18
18
  export declare const SPEC_URL = "https://26560301.fs1.hubspotusercontent-eu1.net/hubfs/26560301/Guides/Dynamic%20Events/20250216%20-%20Dynamic%20Events%20CSV%20Specifications.pdf";
19
19
  /** SHA-256 of the PDF the page was built from. check_upstream.py reads this line. */
20
20
  export declare const SPEC_SHA256 = "1b737ffc6882eca1501b6fefab69893fddb8703a8411034256d682453739699a";
21
+ /** A Wayback copy of the same PDF (same SHA-256), so the source outlives the live link. */
22
+ export declare const SPEC_ARCHIVED_URL = "https://web.archive.org/web/20260515223103/https://26560301.fs1.hubspotusercontent-eu1.net/hubfs/26560301/Guides/Dynamic%20Events/20250216%20-%20Dynamic%20Events%20CSV%20Specifications.pdf";
21
23
  type Row = {
22
24
  attr: string;
23
25
  type: string;
@@ -25,6 +25,8 @@ const PAGE_PATH = resolve(__dirname, "..", "docs", "skillcorner", "dynamic-event
25
25
  export const SPEC_URL = "https://26560301.fs1.hubspotusercontent-eu1.net/hubfs/26560301/Guides/Dynamic%20Events/20250216%20-%20Dynamic%20Events%20CSV%20Specifications.pdf";
26
26
  /** SHA-256 of the PDF the page was built from. check_upstream.py reads this line. */
27
27
  export const SPEC_SHA256 = "1b737ffc6882eca1501b6fefab69893fddb8703a8411034256d682453739699a";
28
+ /** A Wayback copy of the same PDF (same SHA-256), so the source outlives the live link. */
29
+ export const SPEC_ARCHIVED_URL = `https://web.archive.org/web/20260515223103/${SPEC_URL}`;
28
30
  const SPEC_NAME = "Dynamic Events CSV Specifications 2025/02/16";
29
31
  const CRAWLED_AT = "2026-11-24";
30
32
  /** Our intro, between the title and the changelog. */
@@ -282,7 +284,7 @@ function joinVals(ls) {
282
284
  return out + (ls[i - 1].trim().includes(" ") || line.trim().includes(" ") ? " " : "") + line;
283
285
  }, "");
284
286
  }
285
- const cell = (text) => text.replace(/\|/g, "\\|").trim();
287
+ const cell = (text) => text.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").trim();
286
288
  export function renderPage(sections) {
287
289
  const [first, ...rest] = sections;
288
290
  const intro = first.intro.flatMap((i) => ("text" in i ? [i.text] : []));
@@ -297,6 +299,7 @@ export function renderPage(sections) {
297
299
  const out = [
298
300
  "---",
299
301
  `source_url: ${SPEC_URL}`,
302
+ `archived_url: ${SPEC_ARCHIVED_URL}`,
300
303
  "source_type: crawled",
301
304
  `upstream_version: ${SPEC_NAME}`,
302
305
  `crawled_at: ${CRAWLED_AT}`,
@@ -361,7 +364,7 @@ async function main() {
361
364
  const sha = createHash("sha256").update(data).digest("hex");
362
365
  if (sha !== SPEC_SHA256) {
363
366
  console.error(`The PDF changed: sha256 ${sha}, pinned ${SPEC_SHA256}.`);
364
- console.error("Read the new PDF, update SPEC_NAME, CHANGELOG and SPEC_SHA256 here, then run again.");
367
+ console.error("Read the new PDF, update SPEC_NAME, CHANGELOG, SPEC_SHA256 and SPEC_ARCHIVED_URL (a Wayback snapshot of the new PDF) here, then run again.");
365
368
  process.exit(1);
366
369
  }
367
370
  const { sections, pages } = await extractSections(data);
@@ -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, each listed in both the Open Data
125
- * Events v4.0.0 specification and kloppy's StatsBomb parser. Editorial, not
126
- * derived from the data, which is why they live here and not in the truth file.
127
- * The specification is not trusted on its own: it has the card and 50/50 IDs
128
- * wrong.
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) {
package/dist/tools.d.ts CHANGED
@@ -33,6 +33,18 @@ export type RequestUpdateArgs = {
33
33
  reason: string;
34
34
  suggested_urls?: string[];
35
35
  };
36
+ type SearchRow = {
37
+ provider: string;
38
+ category: string;
39
+ title: string;
40
+ content: string;
41
+ source_type: string;
42
+ source_url: string | null;
43
+ archived_url: string | null;
44
+ upstream_version: string | null;
45
+ crawled_at: string | null;
46
+ relevance: number;
47
+ };
36
48
  /**
37
49
  * Build a safe FTS5 MATCH query from user text.
38
50
  *
@@ -48,6 +60,12 @@ export declare function sanitiseFtsQuery(query: string): string;
48
60
  * never sees "vv3" or "vSoccer v4".
49
61
  */
50
62
  export declare function versionLabel(version: string | null): string;
63
+ /**
64
+ * The provenance line above each result. It names the page the text came from
65
+ * and, when one is recorded, a permalink to that page as it was read, so an
66
+ * agent can check the original.
67
+ */
68
+ export declare function sourceLabel(row: Pick<SearchRow, "source_type" | "source_url" | "archived_url" | "upstream_version" | "crawled_at">): string;
51
69
  export declare function resolveProviderId(db: Database, args: ResolveProviderIdArgs): ToolResponse;
52
70
  export declare function getProviderDocs(db: Database, args: GetProviderDocsArgs): ToolResponse;
53
71
  export declare function searchDocs(db: Database, args: SearchDocsArgs): ToolResponse;
package/dist/tools.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { providersFileSchema, readMeta } from "./data-format.js";
4
+ import { providersFileSchema, readArchivedUrls, readMeta } from "./data-format.js";
5
5
  export { resolveEntity } from "./reep.js";
6
6
  export const TOOL_NAMES = [
7
7
  "search_docs",
@@ -262,7 +262,7 @@ function normaliseLimit(value, defaultValue, maxValue) {
262
262
  function searchRows(db, matchQuery, provider, limit) {
263
263
  let sql = `
264
264
  SELECT d.provider, d.category, d.title, d.content,
265
- d.source_type, d.source_url, d.upstream_version,
265
+ d.source_type, d.source_url, NULL AS archived_url, d.upstream_version,
266
266
  d.crawled_at,
267
267
  rank * -1 as relevance
268
268
  FROM docs_fts
@@ -276,7 +276,7 @@ function searchRows(db, matchQuery, provider, limit) {
276
276
  }
277
277
  sql += " ORDER BY rank LIMIT ?";
278
278
  params.push(limit);
279
- return db.prepare(sql).all(...params);
279
+ return withArchivedUrls(db, db.prepare(sql).all(...params));
280
280
  }
281
281
  /**
282
282
  * The strict query needs every term to match, so it finds the most specific
@@ -373,13 +373,33 @@ export function versionLabel(version) {
373
373
  return "";
374
374
  return /^\d/.test(trimmed) ? `v${trimmed}` : trimmed;
375
375
  }
376
- function sourceLabel(row) {
377
- const crawledAt = row.crawled_at ? ` | crawled ${row.crawled_at}` : "";
376
+ const archivedUrlMaps = new WeakMap();
377
+ /** Fill each row's archived_url from the index's meta map (none on older indexes). */
378
+ function withArchivedUrls(db, rows) {
379
+ let map = archivedUrlMaps.get(db);
380
+ if (!map) {
381
+ map = readArchivedUrls(db);
382
+ archivedUrlMaps.set(db, map);
383
+ }
384
+ const archived = map;
385
+ return rows.map((row) => ({ ...row, archived_url: archived.get(`${row.provider}/${row.category}`) ?? null }));
386
+ }
387
+ /**
388
+ * The provenance line above each result. It names the page the text came from
389
+ * and, when one is recorded, a permalink to that page as it was read, so an
390
+ * agent can check the original.
391
+ */
392
+ export function sourceLabel(row) {
393
+ const archived = row.archived_url ? `, archived ${row.archived_url}` : "";
378
394
  if (row.source_type === "curated") {
379
- return `**Source:** curated by football-docs contributors${crawledAt}`;
395
+ const from = row.source_url ? ` from ${row.source_url}${archived}` : "";
396
+ const checked = row.crawled_at ? ` | checked ${row.crawled_at}` : "";
397
+ return `**Source:** curated by football-docs contributors${from}${checked}`;
380
398
  }
399
+ const links = row.source_url ? ` (${row.source_url}${archived})` : "";
381
400
  const version = versionLabel(row.upstream_version);
382
- return `**Source:** ${row.source_type}${row.source_url ? ` (${row.source_url})` : ""}${version ? ` | ${version}` : ""}${crawledAt}`;
401
+ const crawledAt = row.crawled_at ? ` | crawled ${row.crawled_at}` : "";
402
+ return `**Source:** ${row.source_type}${links}${version ? ` | ${version}` : ""}${crawledAt}`;
383
403
  }
384
404
  function providerMetadata(registry, provider) {
385
405
  return registry.providers[provider];
@@ -425,7 +445,7 @@ function providerDocsRows(db, provider, matchQuery, category, limit) {
425
445
  if (matchQuery) {
426
446
  sql = `
427
447
  SELECT d.provider, d.category, d.title, d.content,
428
- d.source_type, d.source_url, d.upstream_version,
448
+ d.source_type, d.source_url, NULL AS archived_url, d.upstream_version,
429
449
  d.crawled_at,
430
450
  rank * -1 as relevance
431
451
  FROM docs_fts
@@ -437,7 +457,7 @@ function providerDocsRows(db, provider, matchQuery, category, limit) {
437
457
  else {
438
458
  sql = `
439
459
  SELECT d.provider, d.category, d.title, d.content,
440
- d.source_type, d.source_url, d.upstream_version,
460
+ d.source_type, d.source_url, NULL AS archived_url, d.upstream_version,
441
461
  d.crawled_at,
442
462
  0 as relevance
443
463
  FROM docs d
@@ -451,7 +471,7 @@ function providerDocsRows(db, provider, matchQuery, category, limit) {
451
471
  }
452
472
  sql += matchQuery ? " ORDER BY rank LIMIT ?" : " ORDER BY d.category, d.id LIMIT ?";
453
473
  params.push(limit);
454
- return db.prepare(sql).all(...params);
474
+ return withArchivedUrls(db, db.prepare(sql).all(...params));
455
475
  }
456
476
  export function resolveProviderId(db, args) {
457
477
  const registry = registryFor(db);
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  source_url: https://www.api-football.com/documentation-v3
3
+ archived_url: https://web.archive.org/web/20261012113830/https://www.api-football.com/documentation-v3
3
4
  source_type: curated
4
5
  upstream_version: 3.9.3
5
6
  crawled_at: 2026-10-16
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  source_url: https://www.api-football.com/documentation-v3
3
+ archived_url: https://web.archive.org/web/20261012113830/https://www.api-football.com/documentation-v3
3
4
  source_type: curated
4
5
  upstream_version: 3.9.3
5
6
  crawled_at: 2026-10-15
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  source_url: https://www.api-football.com/documentation-v3
3
+ archived_url: https://web.archive.org/web/20261012113830/https://www.api-football.com/documentation-v3
3
4
  source_type: curated
4
5
  upstream_version: 3.9.3
5
6
  crawled_at: 2026-10-15
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  source_url: https://documenter.getpostman.com/view/6414020/2s93JwM1t4
3
+ archived_url: https://web.archive.org/web/20261125114010/https://documenter.getpostman.com/view/6414020/2s93JwM1t4
3
4
  source_type: curated
4
5
  upstream_version: Postman collection "Apiclient"
5
6
  crawled_at: 2026-07-31
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  source_url: https://documenter.getpostman.com/view/6414020/2s93JwM1t4
3
+ archived_url: https://web.archive.org/web/20261125114010/https://documenter.getpostman.com/view/6414020/2s93JwM1t4
3
4
  source_type: curated
4
5
  upstream_version: Postman collection "Apiclient"
5
6
  crawled_at: 2026-07-31
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  source_type: curated
3
3
  source_url: https://api.besoccer.com/en/aboutus
4
+ archived_url: https://web.archive.org/web/20261125114037/https://api.besoccer.com/en/aboutus
4
5
  upstream_version: null
5
6
  crawled_at: 2026-09-24
6
7
  ---
@@ -1,3 +1,9 @@
1
+ ---
2
+ source_url: https://github.com/Alek050/databallpy/blob/v0.8.1/databallpy/game.py
3
+ archived_url: https://github.com/Alek050/databallpy/blob/3a8ebc17c6c752fb6e087069eeb707f60d2b9841/databallpy/game.py
4
+ source_type: curated
5
+ ---
6
+
1
7
  # DataBallPy Data Model
2
8
 
3
9
  ## Game Object
@@ -1,3 +1,9 @@
1
+ ---
2
+ source_url: https://databallpy.readthedocs.io/en/latest/introduction/intro_page.html
3
+ archived_url: https://web.archive.org/web/20260929120741/https://databallpy.readthedocs.io/en/latest/introduction/intro_page.html
4
+ source_type: curated
5
+ ---
6
+
1
7
  # DataBallPy
2
8
 
3
9
  ## Overview
@@ -32,7 +38,7 @@ Its key distinguishing feature is **smart synchronization of tracking and event
32
38
  | SciSports | `"scisports"` | No | No separate metadata file needed |
33
39
  | Sportec/DFL | `"dfl"` or `"sportec"` | Yes | |
34
40
  | StatsBomb | `"statsbomb"` | No | Requires event_match_loc + event_lineup_loc |
35
- | FIFA | `"fifa"` | | Listed as a supported `event_data_provider` by `get_game()`. |
41
+ | FIFA | `"fifa"` | Yes | Listed as a supported `event_data_provider` by `get_game()`. |
36
42
 
37
43
  ### Kloppy Integration (v0.7.0+)
38
44