> ## Documentation Index
> Fetch the complete documentation index at: https://docs.draftfantasy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> Use our API to access your league data.

The API returns data in JSON format. Make requests on the domain for the competition you play — for example, Premier League uses `https://app.draftfantasy.com`.

## League

You can grab your league data via our API by making a `GET` request to `/api/v1/league/<LEAGUE_ID>` on the correct competition domain.
You'll need to replace `<LEAGUE_ID>` with your actual league ID.
For example, if you wanted to get the league with an ID of `abcde`, you would make a request to `https://app.draftfantasy.com/api/v1/league/abcde`.

## Draft

After the draft is complete, you can grab the draft data by making a `GET` request to `/api/v1/league/<LEAGUE_ID>/draft` on the correct competition domain.
You'll need to replace `<LEAGUE_ID>` with your actual league ID.
For example, if you wanted to get the draft with an ID of `abcde`, you would make a request to `https://app.draftfantasy.com/api/v1/league/abcde/draft`.

## Players

You can also download player data as a CSV — see [CSV Export](/essentials/csv).
