MENU navbar-image

Introduction

A public API to fetch data from etf2l.org, the biggest European Team Fortress 2 League.

ETF2L REST API v2 beta

Migrating from v1 to v2

The second version of API is rewritten from the ground up in PHP/Laravel. In order to make migrating to the new API as painless as possible, most of the popular endpoints are functionally the same with some slight differences.

In order to migrate to the new API, first your endpoint will need to change to the new URL.

Second, the paginator used in the new API works differently from the paginator in v1. In order to change pages in v1, you provide the page as the URL parameter for a request. Example: /competition/list/:page However, in v2 the paginator takes a page as a query parameter. So in order to request page 2 you would do the following in v2: Example: /competition/list?page=2

The paginator also takes an argument for amount of records it can return at once. Please keep this within limits. By default, every page returns 20 records. If you want to override this, you can provide the limit query parameter. Example: /competition/list?page=1&limit=50 would give you 50 records instead of 20.

Supported output formats

To decrease maintenance overhead, the only output format that remains supported is JSON. yaml, VDF, XML, HTML, perl & php are deprecated. If you still need these, please keep using v1 of the API.

Timespans

Because this provided confusion in the past with data not being visible due to defaulting to only showing active competitions & matches, the since parameter was removed. We suggest using the 'from' and 'to' query parameters to limit records within a certain timespan. These represent UNIX timestamps.

Feature requests

Feature requests for the API are welcome and will be reviewed accordingly by the ETF2L team. Ultimately, it is still up to ETF2L whether additional data or filters get added. The best way to provide feedback on the API would be to contact us on Discord. Please describe your wishes and use case if you do so.

Boolean values

Booleans are non-numeric anymore when they get returned from the API. They will display true or false instead.

New endpoints

Some additional endpoints are provided in the API that were not present in v1, namely the Match API & Demo API.

Base URL

https://api-v2.etf2l.org

Authenticating requests

This API is not authenticated.