FPSL API ⚽

Players, matches and league tables for the South African Premier Soccer League.

See README.md for filters and response shapes. The route index from /api:

{"name":"FPSL API","description":"Players, matches and league tables for the South African Premier Soccer League. All data is served from the local database; upstream syncs happen on a schedule.","league":{"id":537,"name":"Premier Soccer League","country":"RSA"},"endpoints":{"GET /api/league":"Season metadata and available seasons","GET /api/table":"League standings (?type=all|home|away|xg)","GET /api/matches":"Season fixtures (?status=&team=&round=&date=&from=&to=&limit=)","GET /api/matches/live":"Today's matchday feed with live scores","GET /api/matches/:id":"Full match detail","GET /api/teams":"Teams in the league","GET /api/teams/:id":"Team detail and squad","GET /api/players":"Every player in the league (?team=&position=&search=)","GET /api/players/stats":"Season leaders (top scorers, assists, ratings)","GET /api/players/:id":"Player profile","GET /api/auth/me":"The authenticated user's profile (Supabase JWT)","POST /api/admin/sync/:task":"Trigger a task (league|squads|players|images|live|matches|score|rollover|prices|prune|bootstrap|backfill; ?background=1; admin token)","GET /api/admin/sync":"Task states, or the run log with ?limit=&task=&exclude= (admin token)","PUT /api/admin/schedules/:task":"Set a task's cron schedule (UTC) or pause it (admin token)","GET /admin":"Task dashboard: run tasks, edit schedules, browse the run log (admin token)"}}