AFL APIafl.com.au ↗
Access AFL competition data via 11 endpoints: fixtures, ladder standings, match centre stats, player profiles, season leaders, and news from afl.com.au.
What is the AFL API?
This API exposes 11 endpoints covering the full AFL data hierarchy — from competitions and seasons down to per-player match statistics. The get_match_centre endpoint returns quarter-by-quarter scores, a score worm, and detailed stat lines for every player in both teams. Other endpoints cover ladder standings, fixture schedules, season stats leaders, player profiles with career averages, and the latest news articles.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/3b29a1d0-fa0e-4a21-8262-dc8c81944489/get_competitions' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace afl-com-au-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""AFL API – bounded, re-runnable walkthrough; every call capped."""
from parse_apis.afl_api import AFL, Competition, Season, NotFound
client = AFL()
# List all competitions, take the first few
for comp in client.competitions.list(limit=5):
print(comp.name, comp.provider_id)
# Drill into the AFL Premiership (id=1) to get its seasons
season = client.competition(id=1).seasons(limit=1).first()
print(f"Current season: {season.name}, round {season.current_round_number}")
# Get the ladder for this season
for entry in client.season(id=season.id).ladder(limit=3):
print(f"#{entry.position} — PF:{entry.points_for} PA:{entry.points_against} Form:{entry.form}")
# Get the fixture for round 1 and fetch match centre for the first match
match = client.season(id=season.id).fixture(round_number="1", limit=1).first()
if match:
centre = match.centre()
print(f"Match centre loaded: {centre.match is not None}")
# Search players and get a profile
player = client.playersummaries.search(season_provider_id="CD_S2025014", limit=1).first()
if player:
profile = player.details(season_provider_id="CD_S2025014")
print(f"Player: {profile.player_details.given_name} {profile.player_details.surname}, age {profile.player_details.age}")
# Typed error handling
try:
bad_match = client.season(id=85).fixture(round_number="99", limit=1).first()
except NotFound as exc:
print(f"Not found: {exc}")
# Get latest news
for article in client.articles.list(limit=3):
print(f"News: {article.title} by {article.author}")
print("exercised: competitions.list / seasons / ladder / fixture / match.centre / playersummaries.search / player.details / articles.list")
Retrieve all AFL competitions (e.g., Premiership, AFLW, VFL). Each competition has a stable numeric ID and a provider ID used across the API.
No input parameters required.
{
"type": "object",
"fields": {
"competitions": "array of competition objects with id, providerId, code, and name"
}
}About the AFL API
Competitions, Seasons, and Fixtures
The API follows a chain of IDs from the top down. get_competitions returns all available competitions — AFL Premiership, AFLW, VFL, and others — each with an id and providerId. Pass a competition_id to get_seasons to retrieve available seasons, each carrying a currentRoundNumber, shortName, and both a numeric id and a providerId (e.g., CD_S2025014). get_rounds accepts a numeric season_id and returns each round's utcStartTime, utcEndTime, bye teams, and roundNumber. get_fixture lets you pull all match schedules for a season, optionally filtered by round_number, returning team identifiers, venue, utcStartTime, and current match status.
Ladder, Match Centre, and Stats Leaders
get_ladder returns the full standings table for a season: position, played, pointsFor, pointsAgainst, percentage, and recent form for each team. get_match_centre takes a match_provider_id (from get_fixture) and returns period-by-period scoring, the score worm, and per-player stat lines for both home and away squads. get_player_stats_leaders returns ranked leaders in categories including goals, disposals, marks, tackles, and clearances — note it only operates on completed seasons; passing an in-progress season ID results in an upstream error. The response includes a displayOrder array that specifies the intended rendering sequence for stat categories.
Players and Teams
search_players accepts a season_provider_id and optional team_ids filter, returning a paginated list of players with jumperNumber, playerPosition, photoURL, and totalResults for pagination math. get_player_profile takes both a player_provider_id and season_provider_id and returns playerDetails (age, height, draft year, position), seasonAverages, seasonTotals, careerAverages, and careerTotals. get_team_list returns team metadata including abbreviation, nickname, club details, social links, and home venue — useful for building team ID lookup tables before calling search_players.
News
get_news returns paginated AFL news articles with title, description, date, author, tags, and imageUrl. Use limit and offset for pagination. Content covers official AFL editorial; it is not a general sports news aggregator.
The AFL API is a managed, monitored endpoint for afl.com.au — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when afl.com.au changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official afl.com.au API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a live match tracker that displays quarter-by-quarter scores and the score worm using
get_match_centre. - Generate weekly ladder tables with win/loss records, percentage, and form strings from
get_ladder. - Populate a player comparison tool using
careerAveragesandseasonAveragesfromget_player_profile. - Show season-long stats leaders for goals, disposals, and tackles with
get_player_stats_leaders. - Display fixture calendars with venue and match status for any round using
get_fixturefiltered byround_number. - Build a team roster page with jumper numbers, positions, and player photos via
search_playersfiltered byteam_ids. - Surface AFL news articles in a dashboard by polling
get_newswithlimitandoffsetpagination.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does AFL.com.au have an official developer API?+
What does `get_player_stats_leaders` return, and why might it fail for the current season?+
displayOrder array indicating how categories should be rendered. The endpoint only works for completed seasons. Passing the season_provider_id of an in-progress season returns an upstream error, so it is best used for historical season analysis.How do player and team IDs relate across endpoints?+
id (e.g., 73) and a providerId string (e.g., CD_S2025014). get_fixture returns match_provider_id values needed by get_match_centre. get_team_list returns providerId values (e.g., CD_T70) needed to filter search_players. get_seasons returns both formats so you can satisfy whichever parameter a downstream endpoint requires.Does the API cover AFLW or state league competitions, or only the AFL Premiership?+
get_competitions returns all available competitions, which includes AFLW and VFL alongside the AFL Premiership, each with its own competition_id. Seasons, fixtures, ladders, and rounds can then be fetched for any of those competitions using the returned IDs.Are live in-game scores or real-time play-by-play events available?+
get_match_centre returns period scores and player stat lines, which reflect match data at the time of the request. You can fork this API on Parse and revise it to add a polling-based live score endpoint if finer-grained in-game updates are needed.