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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_footballcharts-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_footballcharts-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_footballcharts-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_footballcharts-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for langchain_footballcharts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 867ef03afe8be63f2921b53f580db0db889b056b07826593ef15b6abf7d9c8ad
MD5 9a41e071e96561620c1377373b71c2a7
BLAKE2b-256 cf913bd3148b3e408dfe579cad9520ef3ab1c0ad13a9aef504948d3392c4731a

See more details on using hashes here.

File details

Details for the file langchain_footballcharts-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_footballcharts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a45679f827b09a0b86876c12b8df0aebb6f6e4757c30022eea4b629da739a13
MD5 fedbd1965a9b21f3d08e110a7bc7a5f4
BLAKE2b-256 3f8a9c029c14ccdb4ccd86688f6c10c4174a4f99b7e817408861fe27cbcecf51

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page