Skip to content

Pitch & field · 25 of 25

Aussie Rules & AFL API in real time

Aussie Rules API for the AFL and AFL Women, finals series included: the competitions with their teams and tables, the fixture list, each result period by period, and live scores while play is on. Request any of it over REST, or have the WebSocket send each change; either way, every object answers to an id we issue once and never change.

First request

Every Aussie rules match in play, in one request:

GET /v2/livescores?sport=aussie-rules
$ curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/livescores?sport=aussie-rules"

Feed in focus

The live scoreboard

Each change of score reaches a client as one small delta, the way the sample ticks over. The same board is a single request away on every plan: all Aussie rules matches in play, with status and clock.

Home0:1Away

Example · one delta per score change

How an Aussie rules match reads

Coverage

Aussie Rules competitions and their archives

The directory files 7 Aussie rules leagues and competitions under a single category, and an id, once issued, stays with its competition for good. The timeline marks the first season held for each headline competition, oldest first. GET /v2/coverage returns the API’s own headline list, with a season count on every entry.

Scores drive an Aussie rules product here: four quarters per side, counted in points, with extra time added when a final finishes level. A ladder ranks the clubs with wins, losses and a draws column, and each row carries the points for and against that the percentage is worked out from. Budget for little beyond that: the source keeps hardly anything but scores for this sport, so plan no statistics panel, team sheet or player page. The competitions are the AFL and AFL Women, finals series included.

leagues and competitions
7
category
1
earliest season held
2009
Headline competitionsFirst season
  1. AFL2009
  2. AFL, Women2017

In practice

Four quarters, counted in points

An Aussie rules match is played in four quarters, so each side's periods holds period1 to period4 and current is its total in points, the same unit its ladder counts. A final that is level after the fourth quarter goes to extra time, which the score carries on top of the quarters. The sport has no endpoints of its own: live scores, fixtures, ladders, events, head-to-head and teams make up the whole picture, with no statistics, lineup or player layer on top of them.

The data follows the AFL, whose archive starts in 2009, and AFL Women, listed as AFL, Women and held from 2017, each with its finals series; the directory counts 7 leagues and competitions in a single category. Each competition has an id of its own, so a site that covers both queries both. In a ladder scoreUnit is points: scoresFor and scoresAgainst are the points a club has scored and conceded, and draws is a real column, so a 0 there means no drawn games rather than the null of a table that cannot hold a draw. AFL ladders split clubs on equal premiership points by percentage, points for divided by points against, times 100; each row carries both totals, so the figure is one division away.

A footy app starts at /v2/categories?sport=aussie-rules, takes Australia's category and lists its competitions with /v2/leagues?category={id}; /v2/leagues/{id}/seasons then gives the season id that the ladder and fixture calls need. /v2/leagues/{id}/standings with season returns the ladder, and /v2/leagues/{id}/rounds with /v2/leagues/{id}/fixtures fills the fixture list round by round. On match days, /v2/livescores?sport=aussie-rules carries every quarter's score, the sport:aussie-rules WebSocket channel pushes each change on the plans that stream, and /v2/fixtures/{id}/h2h adds the two clubs' record against each other.

Real time

WebSocket channels for Aussie rules

These are the channels an Aussie rules client subscribes to on Business and Enterprise: 2 connections on Business and 5 on Enterprise, up to 50 channels on each. A subscription opens with a snapshot of the current state, and every frame after it carries a sequence number; hand back the last one you saw after a dropped connection and the frames you missed are replayed.

WebSocket guide
  • livescoresEverything in play, in all sports at once.Business and up
  • sport:aussie-rulesOnly the Aussie rules matches in play.Business and up
  • fixture:{id}One match in depth: score, events.Business and up
  • league:{id}Every live match of one competition.Business and up
  • team:{id}Every live match of one team, home or away.Business and up

Endpoints

Endpoints that serve Aussie rules

No endpoint belongs to one sport: the path stays the same, and the sport of the object decides which fields are filled. Aussie rules needs no call beyond the ones every fixture sport shares, listed here. The match statistics call is left off the list, since match statistics are not among the Aussie rules data types. A row leads to its reference page.

Questions

Aussie Rules API questions

Anything else? The full FAQ covers quota, plans and the data in general.

How do I find the id of an Aussie rules competition?

Walk the directory, or search it. GET /v2/categories?sport=aussie-rules returns the categories that hold Aussie rules, GET /v2/leagues?category={id} the competitions inside one, and GET /v2/search?q= finds a competition by name. There are 7 Aussie rules leagues and competitions to choose from, in a single category. An id never changes once it has been issued, so it can live in your configuration.

Which Aussie rules seasons can each plan read?

The window is set by the plan and counted back from today: a Free key reads back 7 days, a Starter key 14 days, a Pro key 30 days, a Business key 90 days and an Enterprise key the whole archive. Matches in play and still to come are open whatever the plan. The archive those windows are cut from begins in 2009 (AFL).

Can Aussie rules updates be pushed instead of polled?

Yes, on Business and Enterprise: a WebSocket connection subscribes to livescores, sport:aussie-rules, fixture:{id}, league:{id} and team:{id} and is sent each change as it happens. On the other plans, or whenever a request suits you better, GET /v2/livescores?sport=aussie-rules returns every Aussie rules match in play and answers on every plan, Free included.

Which plan opens which Aussie rules data?

None of it is gated. All 6 Aussie rules data types answer on every plan, Free included: live scores, match events, head to head, fixtures, standings and teams.

What does the Free plan cover for Aussie rules?

100 requests / day at up to 10 requests a minute, the last 7 days of results, and no card asked for. Every Aussie rules data type answers on it.