Jul 30, 2026

How to Pull Live League of Legends Data with the PandaScore API

Share Article
TwitterLinkedin

How to Pull Live League of Legends Data with the PandaScore API

The EWC LoL event just wrapped, MSI 2026 finished earlier this month, and LoL Worlds is four months away. If you're building anything that consumes League of Legends data — a stats dashboard, a live odds engine, a media platform, a fantasy product — right now is the time to get your data pipeline working before the autumn competitive season kicks off.

This guide walks through how to pull live LoL data using the PandaScore API, covering authentication, the key endpoints, the difference between the two live data types, and what fields you'll want for common use cases.

Getting Started: Authentication

All PandaScore API requests require an API token. You can get one by signing up at pandascore.co. Pass your token in the request header:

Authorization: Bearer YOUR_TOKEN

All requests use HTTPS. The base URL for the REST API is:

https://api.pandascore.co

For live data specifically, PandaScore uses WebSockets. The base WebSocket URL is:

wss://live.pandascore.co

The Two Types of Live Data

PandaScore's live LoL data comes in two feeds, and understanding the difference matters before you build:

Frames deliver a periodic snapshot of the current game state — what you'd see on the in-game HUD. This includes current kills, deaths, assists per player (K/D/A), gold totals per team, current items for each player, HP and mana, tower status, and objective timers. Frames update at regular intervals throughout the match.

Events deliver a detailed timeline of key moments as they happen. A player kill, a dragon claim, a Baron take, a tower destruction — each is an individual event with a timestamp, the actors involved, and context. Events let you reconstruct exactly what happened in a match, and when.

For a stats dashboard, you probably want both: frames for the current state display, events for the match timeline.

For a live odds engine, events are typically more valuable — they give you the inflection points (Baron taken at 24:38, gold lead shifted to +3,000) that drive probability recalculations. If you're building for professional trading or prediction bots that require the absolute lowest latency, PandaScore's Low Latency Feed is designed specifically for that use case and delivers data faster than the standard API.

For a fantasy product, frames at end-of-game are the source of truth for player stat totals.

Connecting to the Live WebSocket Feed

First, find the match you want to stream. Use the REST endpoint to list live matches:

GET https://api.pandascore.co/lol/matches?filter[status]=running

The response includes a live object for each running match. This contains the WebSocket URLs for both frames and events:

{
  "live": {
    "opens_at": "2026-07-30T14:00:00Z",
    "supported": true,
    "url": "wss://live.pandascore.co/matches/12345"
  }
}

WebSocket connections open 15 minutes before the scheduled match start time. Connect early — the stream begins sending data as soon as the game loads, including pre-game draft phase data on supported plans.

To connect to the frames feed:

wss://live.pandascore.co/matches/12345/frames?token=YOUR_TOKEN

To connect to the events feed:

wss://live.pandascore.co/matches/12345/events?token=YOUR_TOKEN

Key Endpoints for LoL Data

Historical match data:

GET https://api.pandascore.co/lol/matches
GET https://api.pandascore.co/lol/matches/{match_id}

Tournament and league data:

GET https://api.pandascore.co/lol/tournaments
GET https://api.pandascore.co/lol/leagues
GET https://api.pandascore.co/lol/series

Team and player data:

GET https://api.pandascore.co/lol/teams
GET https://api.pandascore.co/lol/players
GET https://api.pandascore.co/lol/players/{player_id}/stats

Live running matches:

GET https://api.pandascore.co/lol/matches/running

What LoL Frames Contain

A frame payload for a running LoL match includes:

{
  "game_id": 98765,
  "timestamp": "2026-07-30T14:23:41Z",
  "game_length": 1421,
  "teams": [
    {
      "team_id": 1,
      "gold": 42300,
      "kills": 8,
      "towers_destroyed": 3,
      "dragons": 2,
      "barons": 0
    }
  ],
  "players": [
    {
      "player_id": 555,
      "role": "mid",
      "kills": 3,
      "deaths": 1,
      "assists": 4,
      "gold": 9200,
      "cs": 187,
      "level": 14,
      "items": [...]
    }
  ]
}

Note: player HP, mana, and items require the Pro Live plan.

What LoL Events Contain

An events payload for a kill event looks like:

{
  "type": "player_kill",
  "timestamp": "2026-07-30T14:18:22Z",
  "game_length": 1102,
  "killer": { "player_id": 555, "team_id": 1 },
  "victim": { "player_id": 602, "team_id": 2 },
  "assists": [{ "player_id": 558 }],
  "position": { "x": 7842, "y": 6231 }
}

Objective events (dragon, baron, tower) follow a similar structure with the relevant team and objective type included.

Common Use Cases

Live stats dashboard: Subscribe to frames on match open. Render current game state and update on each frame. Use events to drive a live timeline feed alongside the state display.

Post-match analysis: Use the REST endpoints to pull completed match data, including full event timelines and player stats. GET /lol/matches/{id} returns the complete match record once the game resolves.

Fantasy points calculation: Pull player stats from frames at game end, or from the completed match record. Map K/D/A, CS, and objective contributions to your fantasy scoring system.

Handling Rate Limits and Errors

PandaScore's REST API is rate-limited per token. WebSocket connections do not count against REST rate limits. For high-frequency frame consumption, WebSockets are the right approach — polling the REST API for live state is both slower and more expensive against your rate limit allocation.

For error handling, WebSocket connections will send a close frame with a reason code if the stream ends unexpectedly. Build reconnection logic that attempts to re-establish the connection — matches occasionally have brief interruptions and the stream resumes.

The full API reference and OpenAPI spec are available at developers.pandascore.co. If you're using an AI coding assistant, the LLM-optimised documentation index is at developers.pandascore.co/llms.txt.

Ready to start building? Join our customer Slack community where developers ask questions and share what they're building with PandaScore data.