Skip to main content

langchain-footballcharts

LangChain tools for football-charts.com — football statistics and model probabilities for 93 leagues (top flights, lower divisions and women's leagues on five continents), exposed as ten read-only agent tools.

pip install langchain-footballcharts
from langchain_footballcharts import FootballChartsToolkit

toolkit = FootballChartsToolkit(api_key="fc_...")   # or set FC_API_KEY
tools = toolkit.get_tools()

Get a free key in seconds at football-charts.com/developers — no card. The free tier covers all 93 leagues for the current and previous season.

What the tools return

Tool Data
list_leagues every league, its key, and the seasons your key can read
get_league_table standings: points, W/D/L, goals, last-5 form
get_rankings the table re-ranked by luck-adjusted or goals views, with expected points
get_results finished matches with FT/HT scores and first-goal minute
get_fixtures upcoming matches with model probabilities (HT over 1.5, FT over 2.5)
get_match one match: full probability block across markets, ratings, first-goal histograms
get_season_projection 10,000-run Monte Carlo: title / top-4 / relegation probability per team
get_team one team: table row, match log, goal-timing bins, per-team stats
get_goal_timing goals per 15-minute bin per team, league-level timing stats
get_track_record the public, settled prediction ledger — hit rates and P/L, losses included

Probabilities, not tips. Every model signal Football Charts publishes is logged before kickoff and settled in public; get_track_record returns that ledger unedited.

Example: an agent

from langchain.agents import create_agent
from langchain_anthropic import ChatAnthropic
from langchain_footballcharts import FootballChartsToolkit

agent = create_agent(
    ChatAnthropic(model="claude-sonnet-4-5"),
    tools=FootballChartsToolkit().get_tools(),
)
agent.invoke({"messages": [("user", "Which team in the Allsvenskan scores latest in matches?")]})

Notes

  • Every tool has a sync _run and async _arun; results are JSON strings so the full payload reaches the model.
  • The API key is bound per tool instance, never read from a module-level global.
  • Goalless matches come back as first_goal_time: null, goalless: true.
  • Same ten tools, same names, as the Football Charts MCP server.

Development

pip install -e ".[test]"
pytest tests/unit_tests                 # offline, mocked API
FC_API_KEY=fc_... pytest tests/integration_tests   # against production

MIT.

Metadata

Release files for langchain-footballcharts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-footballcharts 0.1.0
File Size Uploaded
langchain_footballcharts-0.1.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-footballcharts 0.1.0
File Interpreter ABI Platform
langchain_footballcharts-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / langchain_footballcharts-0.1.0.tar.gz

Download URL langchain_footballcharts-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
867ef03afe8be63f2921b53f580db0db889b056b07826593ef15b6abf7d9c8ad
BLAKE2b-256 checksum
How to use checksums
cf913bd3148b3e408dfe579cad9520ef3ab1c0ad13a9aef504948d3392c4731a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / langchain_footballcharts-0.1.0-py3-none-any.whl

Download URL langchain_footballcharts-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a45679f827b09a0b86876c12b8df0aebb6f6e4757c30022eea4b629da739a13
BLAKE2b-256 checksum
How to use checksums
3f8a9c029c14ccdb4ccd86688f6c10c4174a4f99b7e817408861fe27cbcecf51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page