Skip to main content

StrikerAPI for Python

Python client for the StrikerAPI soccer data API. It has no required dependencies (standard library only) and works on Python 3.9 and newer. Pandas is optional.

Install

pip install strikerapi
pip install "strikerapi[pandas]"   # only if you want DataFrames

Set your key

Get a free key at https://strikerapi.com/signup. Free accounts get 500 credits a month.

export STRIKERAPI_API_KEY=your_key_here
from strikerapi import Client

client = Client()                      # reads STRIKERAPI_API_KEY
client = Client(api_key="your_key")    # or pass it in

Examples

1. A league table

Pass league to pick a competition. Here is MLS.

from strikerapi import Client, to_dataframe

client = Client()

table = client.get_standings(league="mls")
df = to_dataframe(table, key="standings")
print(df[["group_name", "rank", "display_name", "played", "points"]].head(10))

2. Top scorers per 90 minutes

get_leaders can rank by the raw count or per 90 minutes.

from strikerapi import Client

client = Client()

leaders = client.get_leaders(stat="goals", league="mls", per90=True, limit=5)
print(leaders)

3. Find a player and see his recent games

search_players finds the id, get_player_games returns his match log.

from strikerapi import Client

client = Client()

haaland = client.search_players("Haaland", limit=1)["players"][0]
games = client.get_player_games(haaland["player_id"], limit=5)
print(haaland["name"], games)

Credits

Every method returns the data object from the response. After each call, client.last_credits_used and client.last_credits_remaining hold the counters from the X-Credits-Used and X-Credits-Remaining headers. Methods that take estimate_only=True return the price of a call without running or charging it.

Pandas

from strikerapi import to_dataframe

df = to_dataframe(data)                # finds the main list in the response
df = to_dataframe(data, key="rows")    # or name the list yourself

Nested fields become dotted columns. Install pandas separately or with pip install "strikerapi[pandas]".

Errors

Every error is an APIError subclass, with the server's message and the HTTP status.

Exception Status Meaning
AuthError 401 Missing, invalid or revoked key
InsufficientCreditsError 402 Not enough credits for the call
NotFoundError 404 The id or name does not exist
RateLimitError 429 Too many requests; has .retry_after when the server sends it
APIError 400, 5xx Bad arguments or a server problem
APIConnectionError none No response (network or timeout)
from strikerapi import Client, APIError, InsufficientCreditsError, RateLimitError

client = Client()
try:
    data = client.list_teams()
except InsufficientCreditsError:
    print("Out of credits, top up at https://strikerapi.com")
except RateLimitError as exc:
    print("Slow down, retry after", exc.retry_after)
except APIError as exc:
    print(exc.status_code, exc.message)

The client retries 429 and 5xx responses and connection failures up to 3 times with backoff, and honors Retry-After. Set Client(max_retries=0) to turn that off.

If you see CERTIFICATE_VERIFY_FAILED on a python.org install for macOS, run the "Install Certificates.command" script that came with Python, or pip install certifi (the client uses it when present).

Options

Client(
    api_key=None,                          # defaults to $STRIKERAPI_API_KEY
    base_url="https://mcp.strikerapi.com",           # point at another host
    timeout=60.0,                          # seconds per request
    max_retries=3,
)

client.call("tool_name", {"arg": "value"}) calls any tool by name, which helps when the API adds a tool before this package does.

Tools

Method names match the API tool names. Arguments are keyword arguments; required ones can also be passed positionally. Each method's docstring lists its arguments (help(client.list_teams)).

Method Credits What it does
list_teams 1 List teams
list_games 2 List games
get_schedule 2 Schedule
get_game 5 Game
get_lineups 5 Lineups
get_standings 2 Standings
get_ratings 2 Ratings
get_head_to_head 2 Head to head
search_players 1 Search players
get_player 5 Player
get_player_games 5 Player games
get_leaders 5 Leaders
get_team_stats 5 Team stats
get_events 10 Events
get_shot_map 10 Shot map
get_odds 5 Odds
get_line_movement 10 Line movement
get_player_props 10 Player props
get_prop_history 10 Prop history

Full API reference: https://strikerapi.com/docs

License

MIT

Metadata

Release files for strikerapi 0.1.4

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

Source distribution (sdist)

Source distribution for strikerapi 0.1.4
File Size Uploaded Provenance
strikerapi-0.1.4.tar.gz 15.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for strikerapi 0.1.4
File Interpreter ABI Platform
strikerapi-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / strikerapi-0.1.4.tar.gz

Download URL strikerapi-0.1.4.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1509b8034f194998b9754b68586de689cfcd9cceef52df595e7acf7330757e9b
BLAKE2b-256 checksum
How to use checksums
f818c7d0665985c17848baca995d1a967abdd4e1ed36b11c357d5ddf7ee3148b
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 Oct 19, 2026.

Transparency log

Release files / strikerapi-0.1.4-py3-none-any.whl

Download URL strikerapi-0.1.4-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0dd052097556f3b1c8f57cb235e234c3c98c136a7d565920fa4381ef2b59809
BLAKE2b-256 checksum
How to use checksums
4dc5d26b6d7889c2660776b6517cdfb9d4efb2ed5cf9ff779f78d9cef170146e
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 Oct 19, 2026.

Transparency log

Security for strikerapi 0.1.4

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 strikerapi-0.1.4.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 Oct 19, 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.

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