# ATG — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive horse racing data from ATG.se, including race calendars, detailed race information, horse profiles, starting lineups, and results. Retrieve up-to-date information on races, horses, drivers, betting pools, and outcomes.

**Category:** Sports | **Website:** [atg.se/](https://atg.se/) | **Docs:** [parse.bot/marketplace/64c13ec3-dcb6-431b-a42c-2993f9e69cd2/atg-se-api](https://parse.bot/marketplace/64c13ec3-dcb6-431b-a42c-2993f9e69cd2/atg-se-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_game_results

Retrieve recent completed game results for a game type. Returns an array of recent game results with payouts, winners, track names, turnover, and race details. Results availability depends on when the last game of that type was played.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game_type` | string | Yes | Game type identifier. Accepted values: V64, V75, V86. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/get_game_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game_type":"<string>"}'
```

### get_horse_profile

Fetch a horse's profile by its ATG horse ID. Returns name, age, sex, pedigree (father, mother, grandfather), lifetime and yearly statistics including starts, earnings, placement counts, and records. Also includes owner, breeder, and home track information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `horse_id` | string | Yes | ATG horse ID (numeric string, e.g. 801482). Discoverable from get_race_details data.starts[*].horse.id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/get_horse_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"horse_id":"<string>"}'
```

### get_race_calendar

Fetch the full race calendar for a specific date. Returns all tracks racing that day with their scheduled races, start times, statuses, and available betting games. Each track entry includes an id, name, sport, and list of races; the games object groups available betting pools by type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Date in YYYY-MM-DD format. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/get_race_calendar \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```

### get_race_details

Fetch detailed information for a single race by its race ID. Returns the full starter list with horse profiles, driver info, results (if completed), track condition, and pool data. Race IDs follow the format YYYY-MM-DD_trackId_raceNumber and are discoverable via get_race_calendar.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `race_id` | string | Yes | Race ID in format YYYY-MM-DD_trackId_raceNumber (e.g. 2026-06-11_28_1). Discoverable via get_race_calendar tracks[*].races[*].id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/get_race_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"race_id":"<string>"}'
```

### get_startlist

Retrieve the startlist and game details for a specific game ID. Returns pool information (turnover, payouts), race starters with betting odds, and game status. Game IDs follow the format GameType_YYYY-MM-DD_trackId_raceNumber and are discoverable via get_race_calendar games object.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game_id` | string | Yes | Game ID in format GameType_YYYY-MM-DD_trackId_raceNumber (e.g. V64_2026-06-11_28_4). Discoverable via get_race_calendar data.games.<type>[*].id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-atg-se-api-64c13ec3/get_startlist \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game_id":"<string>"}'
```
