Skip to main content

llama-index-tools-livetennisapi

A LlamaIndex tool spec for the Live Tennis API — real-time tennis for LLM agents: live and upcoming matches, current scores with a derived break-point flag, player search, a player's profile (current ranking and current Elo), and upcoming fixtures across ATP, WTA, Challenger, ITF and juniors.

PyPI CI License: MIT

Vendor-authored. This package is published by Live Tennis API, the operator of the API it calls. It is not affiliated with LlamaIndex. It is a thin, read-only wrapper over the public REST API — judge it accordingly.

What it is

LiveTennisAPIToolSpec is a BaseToolSpec that exposes five FREE-tier tools an LLM agent can call:

Tool What it does
get_live_matches Live or upcoming matches with players and the latest score
get_match_score The current score of one match, plus a derived break_point flag
search_players Find players by name (returns their current ranking)
get_player One player's profile, current ranking, and current Elo
get_fixtures Upcoming scheduled fixtures, earliest first

Installation

pip install llama-index-tools-livetennisapi

API key

Grab a free key (no card) at https://livetennisapi.com/subscribe/free and export it — the tool reads LIVETENNIS_API_KEY by default (and falls back to LIVETENNISAPI_KEY if that is what you already have set for the other Live Tennis API libraries):

export LIVETENNIS_API_KEY="your_key_here"

You can also pass it directly: LiveTennisAPIToolSpec(api_key="...").

Usage

from llama_index.tools.livetennisapi import LiveTennisAPIToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = LiveTennisAPIToolSpec()  # reads LIVETENNIS_API_KEY

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("Which ATP matches are live right now, and is anyone facing a break point?"))
print(await agent.run("What is Carlos Alcaraz's current ranking and Elo?"))

Or call a tool directly:

tool_spec = LiveTennisAPIToolSpec()
matches = tool_spec.get_live_matches(tour="atp")
score = tool_spec.get_match_score(matches[0]["id"])
print(score["break_point"])  # True / False / None

The break_point flag

get_match_score (and the score on each live match) derives a break_point flag from the current game: it is True when the receiver is one point from breaking serve (receiver at AD, or at 40 while the server is at 0/15/30), False when they are not, and None when it cannot be determined. A tiebreak is always False; a null server or null points is None — the flag is derived, never guessed.

Free-tier limits (and what needs a paid tier)

The FREE tier allows 30 requests/minute and 100 requests/day. That suits development, testing, and periodic (~15-minute) checks — not continuous fast polling. The tools clamp limit to 100 and reject status="completed" on get_live_matches because paging completed results is a paid surface.

Everything this package returns is FREE-tier. The following are honestly out of scope here and require a higher tier (see https://livetennisapi.com for the current pricing):

  • BASIC — completed-match history, point-by-point tapes, head-to-head, and the 1968–2022 results archive.
  • PRO — match events, market prices, bulk history packages, and the rank-ordered rankings listing (a single player's own ranking stays FREE and is returned by get_player).
  • ULTRA — model win-probability and in-play statistics on the live score, per-player as-of rankings, the as-of Elo tape, rally charting, and the WebSocket feed.

Development

pip install -e ".[dev]"
pytest -q
ruff check .

The test suite is fully mocked (httpx MockTransport) and makes no network calls.

License

MIT — see LICENSE.

Metadata

Release files for llama-index-tools-livetennisapi 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 llama-index-tools-livetennisapi 0.1.0
File Size Uploaded Provenance
llama_index_tools_livetennisapi-0.1.0.tar.gz 9.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-livetennisapi 0.1.0
File Interpreter ABI Platform
llama_index_tools_livetennisapi-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / llama_index_tools_livetennisapi-0.1.0.tar.gz

Download URL llama_index_tools_livetennisapi-0.1.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
380d005e0bd14d9f883c2f720982e614ab9de195fd2ab69a5751f833691a2290
BLAKE2b-256 checksum
How to use checksums
ae0fb9170cb24447692108492b6e03b7124033a026930bd6f27c87595ab47128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.

Transparency log

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

Download URL llama_index_tools_livetennisapi-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17c9608421afe0d45eef612e162af206158f6e7bfc20043351975652a38b8f3f
BLAKE2b-256 checksum
How to use checksums
9ed69b1c81ad5f32768c6bbd70e49c93d33527213ff4d083dc17d0c87fb9a903
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.

Transparency log

Security for llama-index-tools-livetennisapi 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llama_index_tools_livetennisapi-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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