statshawk
Getting started

Quickstart

free

First request in 60 seconds.

First request in 60 seconds.

  1. 01

    Create an account. Free tier, no credit card.

  2. 02

    Open API Keys in your dashboard, create a key, and choose Test. Live keys require a paid plan.

  3. 03

    Set the key in your shell, then make your first request: pull a day of MLB games with final scores:

    shell
    export STATSHAWK_KEY="sk_test_YOUR_KEY_HERE"
    games.sh
    curl -H "X-API-Key: $STATSHAWK_KEY" \
      "https://api.statshawk.ai/v1/competitions/mlb/editions/2026/games?date=2026-07-04"

    Expected response: one game from that day's slate, trimmed to the fields you'll use (the full object also carries competition, edition, and team ids):

    response
    {
      "data": {
        "items": [
          {
            "id": "cst_06fhweyhe5xp36wez3gs673e18",
            "status": "final",
            "kickoff": "2026-07-04T17:35:00Z",
            "home_team_name": "New York Yankees",
            "away_team_name": "Minnesota Twins",
            "score": { "home": 4, "away": 11 }
          }
        ],
        "total": 15
      },
      "meta": {
        "request_id": "550e8400-e29b-41d4-a716-446655440000",
        "fetched_at": "2026-07-05T02:30:00Z",
        "cache": "HIT",
        "version": "v1"
      }
    }

    The date is a fixed example, so this exact slate always returns. Swap it for any date (YYYY-MM-DD, US-Eastern), or change mlb to nba, nfl, or nhl (with the matching season year) to pull another league's day.

Try every endpoint live in the playground →

Go deeper

Each game's id is a contest id. Pass it to the box score for the per-player batting and pitching lines behind that final score:

boxscore.sh
curl -H "X-API-Key: $STATSHAWK_KEY" \
  "https://api.statshawk.ai/v1/contests/cst_06fhweyhe5xp36wez3gs673e18/boxscore"

Next steps

On this page