Resources

Resource classes wrap individual LPDB v3 endpoints. Each resource is reachable as an attribute on LiquipediaClient. The resource layer adds three things on top of the raw HTTP API:

  • Keyword filters — kwargs like nationality="Denmark" are turned into [[nationality::Denmark]] and AND-joined with any explicit conditions string.

  • Filter-key validation — keys that don’t match the resource’s Pydantic model raise ValueError before a request goes out.

  • Paginationpaginate() yields individual records, transparently fetching successive pages.

Base class

All standard endpoints share the same surface, defined on Resource:

class liquipydia.Resource

Bases: object

Base resource wrapping a single LPDB v3 endpoint.

Provides list and paginate methods that delegate HTTP calls to the parent client. Subclasses set _endpoint to the API path segment (e.g. "player") and _model to the corresponding Pydantic model class for filter key validation.

Parameters:

client (LiquipediaClient) – The parent LiquipediaClient instance.

__init__(client)
list(wiki, *, conditions=None, query=None, limit=50, offset=0, order=None, groupby=None, rawstreams=False, streamurls=False, **filters)

Query this endpoint and return results.

Parameters:
  • wiki (str) – Wiki(s) to query (pipe-separate for multi-wiki, e.g. "dota2|counterstrike").

  • conditions (str | None (default: None)) – Filter expression using LPDB condition syntax.

  • query (str | None (default: None)) – Comma-separated list of fields to return.

  • limit (int (default: 50)) – Maximum number of results (1–1000).

  • offset (int (default: 0)) – Number of results to skip.

  • order (str | None (default: None)) – SQL-style ordering (e.g. "id ASC").

  • groupby (str | None (default: None)) – SQL-style grouping (e.g. "id ASC").

  • rawstreams (bool (default: False)) – Return raw stream data (/match endpoint only).

  • streamurls (bool (default: False)) – Return stream URLs (/match endpoint only).

  • **filters (str) – Keyword filters converted to conditions (e.g. name="Zen" becomes [[name::Zen]]). Prefix values with >, <, or ! for operators.

Return type:

ApiResponse

Returns:

Parsed API response.

paginate(wiki, *, conditions=None, query=None, order=None, groupby=None, rawstreams=False, streamurls=False, page_size=50, max_results=None, **filters)

Iterate through paginated results from this endpoint.

Yields individual record dicts, automatically requesting successive pages.

Parameters:
  • wiki (str) – Wiki(s) to query.

  • conditions (str | None (default: None)) – Filter expression using LPDB condition syntax.

  • query (str | None (default: None)) – Comma-separated list of fields to return.

  • order (str | None (default: None)) – SQL-style ordering.

  • groupby (str | None (default: None)) – SQL-style grouping.

  • rawstreams (bool (default: False)) – Return raw stream data (/match endpoint only).

  • streamurls (bool (default: False)) – Return stream URLs (/match endpoint only).

  • page_size (int (default: 50)) – Number of records per page (max 1000).

  • max_results (int | None (default: None)) – Stop after yielding this many records. None for unlimited.

  • **filters (str) – Keyword filters converted to conditions (e.g. name="Zen" becomes [[name::Zen]]). Prefix values with >, <, or ! for operators.

Yields:

Individual record dicts from the API.

Standard resources

These 13 resources inherit list() and paginate() from Resource unchanged. They differ only in their endpoint path and the model used for filter-key validation:

Class

Endpoint

Model

BroadcastersResource

/broadcasters

Broadcaster

CompaniesResource

/company

Company

DatapointsResource

/datapoint

Datapoint

ExternalMediaLinksResource

/externalmedialink

ExternalMediaLink

PlacementsResource

/placement

Placement

PlayersResource

/player

Player

SeriesResource

/series

Series

SquadPlayersResource

/squadplayer

SquadPlayer

StandingsEntriesResource

/standingsentry

StandingsEntry

StandingsTablesResource

/standingstable

StandingsTable

TeamsResource

/team

Team

TournamentsResource

/tournament

Tournament

TransfersResource

/transfer

Transfer

Specialized resources

Three resources need their own entry, either because of an extra parameter or a different method signature.

MatchResource

Inherits list() and paginate() from Resource. The rawstreams and streamurls keyword arguments accepted by the base class are only meaningful on this endpoint; on any other resource the API ignores them.

class liquipydia.MatchResource

Bases: Resource

Resource for the /match endpoint.

Supports rawstreams and streamurls parameters via the base list() and paginate() methods.

TeamTemplateResource

Single-template lookup. Uses get(wiki, template, date=...)conditions, limit, offset, order and multi-wiki are not supported. The optional date parameter returns the template state at that historical date (useful for rendering era-correct logos on archived tournament pages).

class liquipydia.TeamTemplateResource

Bases: object

Resource for the /teamtemplate endpoint (single template lookup).

This endpoint has a different parameter signature from standard resources and does not support conditions, limit, offset, or order.

Parameters:

client (LiquipediaClient) – The parent LiquipediaClient instance.

__init__(client)
get(wiki, template, *, date=None)

Get a single team template.

Parameters:
  • wiki (str) – Single wiki identifier (no multi-wiki).

  • template (str) – Template name of the team template (e.g. "teamliquid").

  • date (str | None (default: None)) – Date for historical logos (format: YYYY-MM-DD).

Return type:

ApiResponse

Returns:

Parsed API response.

TeamTemplateListResource

Bulk template listing. Uses list(wiki, pagination=N) — page-based navigation, no limit/offset and no multi-wiki. Some result rows can be None and must be filtered before validation:

response = client.team_template_list.list("rocketleague")
for record in response.result:
    if record is None:
        continue
    template = TeamTemplateList.model_validate(record)
class liquipydia.TeamTemplateListResource

Bases: object

Resource for the /teamtemplatelist endpoint.

This endpoint has a different parameter signature from standard resources and does not support conditions, limit, offset, or order.

Parameters:

client (LiquipediaClient) – The parent LiquipediaClient instance.

__init__(client)
list(wiki, *, pagination=None)

Get a list of team templates.

Parameters:
  • wiki (str) – Single wiki identifier (no multi-wiki).

  • pagination (int | None (default: None)) – Page number.

Return type:

ApiResponse

Returns:

Parsed API response.