Skip to main content

BirdieAPI for Python

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

Install

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

Set your key

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

export BIRDIEAPI_API_KEY=your_key_here
from birdieapi import Client

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

Examples

1. Recent tournaments

list_tournaments filters by season and status.

from birdieapi import Client

client = Client()

events = client.list_tournaments(status="final", limit=3)["tournaments"]
for e in events:
    print(e["tournament_id"], e["name"], e["winner_name"], e["winning_to_par"])

2. A leaderboard

Pass a tournament id from list_tournaments.

from birdieapi import Client, to_dataframe

client = Client()

board = client.get_leaderboard("401850916", limit=10)
print(to_dataframe(board).head(10))

3. A player's results

Find the player id with search_players, then pull his results for a season.

from birdieapi import Client

client = Client()

scheffler = client.search_players("Scheffler", limit=1)["players"][0]
results = client.get_player_results(scheffler["player_id"], season=2026, limit=5)
print(scheffler["name"], results)

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 birdieapi 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 "birdieapi[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 birdieapi import Client, APIError, InsufficientCreditsError, RateLimitError

client = Client()
try:
    data = client.list_tournaments()
except InsufficientCreditsError:
    print("Out of credits, top up at https://birdieapi.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 $BIRDIEAPI_API_KEY
    base_url="https://mcp.birdieapi.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_tournaments)).

Method Credits What it does
list_tournaments 1 List tournaments
get_schedule 1 Schedule
get_leaderboard 2 Leaderboard
get_course 2 Course
search_players 1 Search players
get_player 5 Player
get_player_results 5 Player results
get_player_stats 5 Player stats
get_scorecard 2 Scorecard
get_course_history 5 Course history
get_head_to_head 5 Head to head
get_ratings 2 Ratings
get_leaders 5 Leaders
get_winner_odds 5 Winner odds

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

License

MIT

Metadata

Release files for birdieapi 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 birdieapi 0.1.4
File Size Uploaded Provenance Actions
birdieapi-0.1.4.tar.gz 13.4 kB With provenance Details for birdieapi-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 26.0 kB

Release files / birdieapi-0.1.4.tar.gz

Download URL birdieapi-0.1.4.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f341973e2dc1184189d784c1db665210f12443e1170e0bd95a319ebc30cfe0c9
BLAKE2b-256 checksum
How to use checksums
e8d5f947b85b3e48ad810a76dfe3959ccc7444b7ef1c8a3c9969e07844396fee
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 / birdieapi-0.1.4-py3-none-any.whl

Download URL birdieapi-0.1.4-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c329bbdf6943b3ec0378fd49f14c63f12b11f9b7c97c80a22e87d1d8015dfc48
BLAKE2b-256 checksum
How to use checksums
3827854009fb9e474aa9668e4e1aca0c6e6100e09bdf966328e5a1423ac6d6a2
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 birdieapi 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for birdieapi-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.

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

Release history Release notifications | RSS feed

This release

0.1.4 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