Documentation

Two products, two paths.

The WordPress plugin and the Sports API are documented separately, because setting up a site and integrating an API are different jobs.

Start here

Pick the path that matches what you are building.

Product 01

WordPress plugin

Install, connect, choose competitions, and understand how pages are created and refreshed.

  • Installing the plugin
  • Connecting your key
  • Choosing competitions within your allowance
  • Which pages get created, and when
  • How refresh works — change-driven, not timer-driven
  • What happens when a trial or plan ends
Plugin overview
Product 02

Sports API

Authenticate, make a first request, and handle quotas and failures deliberately.

  • Creating and scoping a key
  • Authentication — bearer token, no SDK
  • Acquired versus computed resources
  • Quota headers on every response
  • Handling 429 and 503
  • Pagination, and why bulk export is separate
API overview

Authentication

One header, both environments.

Bearer token

Example
$ curl https://api.sportpedia.io/v1/fixtures/live \
  -H "Authorization: Bearer $SPORTPEDIA_KEY"
X-Quota-RemainingRequests left in the current period.
X-Quota-ResetWhen the allowance refills, as a UTC timestamp.
Retry-AfterPresent on 503 only. Seconds until the resource is ready — honour it rather than retrying in a loop.

i Examples on this page show the shape of a request and its headers. The published API reference is the authority on the final resource list, parameters and payload schemas.

The path data takes

Where a value comes from before you read it.

Worth knowing once: it explains why some resources carry a formula version and why a page rebuilds when it does.

  1. 01AcquireProvider feeds are pulled on a schedule shaped by how often each resource actually changes.
  2. 02NormalizeEvery sport is mapped onto one stable schema, so a fixture is a fixture whether it has halves, quarters or sets.
  3. 03RetainFinished seasons are kept rather than re-fetched, so history accumulates instead of expiring.
  4. 04ComputeTables, form, streaks, records and head-to-head are calculated from the retained layer and stamped with the calculation version.
  5. 05DeliverThe same values reach a WordPress page and an API response through one contract.

— Each stage is independent: a change at one stage propagates forward rather than triggering a full rebuild.

Concepts

Three things worth understanding once.

Acquired vs computed

Marked in the payload

Computed resources carry derived: true and a formula version. Acquired resources do not, so the two never blur together in your own storage.

Change-driven refresh

Rebuild on change

A WordPress page is rebuilt when the data behind it changed. A timer only decides when to ask whether anything changed.

Allowances

Two separate meters

A WordPress competition allowance and an API request allowance are independent. Spending one never consumes the other.