Overview

leaf, founded by Nathan Orf, provides an API-driven solution for accessing esports data, encompassing player statistics, match outcomes, and tournament details across various competitive game titles. The platform is engineered to support a range of applications that require structured and timely esports information. This includes developers building fantasy esports leagues, analytical tools for player and team performance, and platforms for esports betting. The API aims to simplify the process of integrating complex esports data into applications.

The core offerings from leaf include a Player Statistics API, a Tournament Data API, and a Match Data API. These APIs are designed to provide granular data points, such as individual player KDA (kills, deaths, assists) ratios, team win rates, match timelines, and tournament brackets. Data coverage extends to popular esports titles like Counter-Strike, Valorant, League of Legends, and Dota 2, among others. The service emphasizes data accuracy and consistent availability, which are critical for applications that rely on real-time data feeds, such as live betting platforms or fantasy scoring systems.

leaf offers SDKs for multiple programming languages, including Node.js, Python, Go, and Ruby, to assist developers in integrating the API into their projects. The platform also provides comprehensive documentation and an API reference, outlining endpoints, request parameters, and response structures. This documentation is designed to enable developers to quickly understand and utilize the available data. For instance, developers can query specific player statistics for Counter-Strike 2 tournaments hosted on platforms like FACEIT or BLAST.tv, allowing for detailed performance analysis.

The service is structured to cater to different user requirements through various pricing tiers, including a free Developer Plan with limited requests for testing and development purposes. Paid plans offer increased request limits and access to a broader range of data features. This tiered approach allows smaller projects and individual developers to get started without an upfront investment, while larger organizations can scale their data consumption as needed. Compliance with regulations such as GDPR is also noted, addressing data privacy considerations for users within relevant jurisdictions.

In comparison to alternatives like PandaScore, leaf focuses on delivering detailed player-centric data alongside tournament and match information, positioning itself as a resource for deep analytical applications and platforms that require granular insights into individual player performance.

Key features

  • Player Statistics API: Provides access to individual player performance data, including historical statistics, in-game metrics (KDA, headshot percentage, creep score), and role-specific data points across various esports titles. This data can be used for performance tracking, fantasy league scoring, and talent scouting.
  • Tournament Data API: Offers comprehensive information about esports tournaments, including schedules, participating teams, prize pools, and final standings. This enables developers to build tournament trackers, event calendars, and historical archives.
  • Match Data API: Delivers detailed data for individual matches, such as team rosters, map picks and bans, in-game events (kills, objectives), and final scores. This supports live-score applications, post-match analysis tools, and betting odds generation.
  • Multiple SDKs: Supports integration with client libraries for Node.js, Python, Go, and Ruby, streamlining the development process by providing pre-built functions for API interaction.
  • Extensive Documentation: Features a detailed API reference and developer guides to facilitate understanding of endpoints, authentication, and data structures.
  • Real-time Data Updates: Provides timely updates for ongoing matches and tournaments, essential for applications requiring current information, such as live betting or fantasy score updates.
  • Historical Data Access: Offers access to historical esports data, enabling trend analysis, archival features, and retrospective performance evaluations.

Pricing

As of 2026-05-05, leaf offers a tiered pricing model:

Plan Price Features
Developer Free Limited requests, access to core API features for testing and development.
Standard $99/month Increased request limits, broader data access, standard support.
Premium $399/month Higher request limits, priority data access, enhanced support, additional data fields.
Enterprise Custom pricing Tailored solutions for high-volume data needs, dedicated support, custom integrations.

For detailed and up-to-date pricing information, refer to the official leaf pricing page.

Common integrations

  • Esports Fantasy League Platforms: Integrate player statistics and match results for scoring, roster management, and league administration.
  • Esports Betting Platforms: Utilize real-time match data and historical performance for odds generation, live betting updates, and result verification.
  • Player Performance Analysis Tools: Extract granular player and team statistics to build analytical dashboards and scouting reports.
  • Tournament Management Systems: Incorporate tournament schedules, team rosters, and match outcomes to automate event tracking and reporting.
  • Content Platforms (News, Blogs): Fetch match results, player profiles, and tournament standings to enrich editorial content and provide data-driven insights.

Alternatives

  • PandaScore: Offers a comprehensive esports data API covering a wide range of titles with a focus on match, tournament, and team data.
  • Abios: Provides esports data solutions for media, betting, and game companies, including real-time data, statistics, and editorial content.
  • Liquipedia API: A community-driven wiki data source offering extensive esports statistics and tournament information, accessible through its public API.

Getting started

To begin using the leaf API, developers typically register for an API key on the leaf website. Once an API key is obtained, requests can be made to the various endpoints. The following Python example demonstrates how to fetch data using the requests library and a hypothetical API key:

import requests
import os

# Replace with your actual API key, or set it as an environment variable
API_KEY = os.getenv("LEAF_API_KEY", "YOUR_LEAF_API_KEY")
BASE_URL = "https://api.leaf.gg/v1"

def get_player_stats(player_id, game_title="cs2"):
    """Fetches statistics for a specific player in a given game title."""
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }
    endpoint = f"/players/{player_id}/stats?game={game_title}"
    url = BASE_URL + endpoint

    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
        return response.json()
    except requests.exceptions.HTTPError as http_err:
        print(f"HTTP error occurred: {http_err}") # e.g. 401 Unauthorized, 404 Not Found
    except requests.exceptions.ConnectionError as conn_err:
        print(f"Connection error occurred: {conn_err}") # e.g. DNS failure, refused connection
    except requests.exceptions.Timeout as timeout_err:
        print(f"Timeout error occurred: {timeout_err}") # e.g. request timed out
    except requests.exceptions.RequestException as req_err:
        print(f"An unexpected error occurred: {req_err}")
    return None

# Example usage: Fetch stats for a hypothetical player ID in CS2
# Replace 'PLAYER_ID_EXAMPLE' with an actual player ID from leaf's database
player_id_example = "PLAYER_ID_EXAMPLE"
player_stats = get_player_stats(player_id_example, game_title="cs2")

if player_stats:
    print(f"Player stats for {player_id_example}:")
    print(player_stats)
else:
    print(f"Failed to retrieve player stats for {player_id_example}.")

For complete API documentation and additional code examples across supported SDKs, refer to the leaf documentation.