# At The Races — 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 intelligence from At The Races, including detailed racecards, draw statistics, pace analysis, and form scan data to inform your betting decisions. Get all the performance metrics and positional data you need to analyze races and horses in one place.

**Category:** Sports | **Website:** [www.attheraces.com/racecard/Ffos-Las/23-June-2026/1430](https://www.attheraces.com/racecard/Ffos-Las/23-June-2026/1430) | **Docs:** [parse.bot/marketplace/52b1f6ff-2d39-48a0-8ffb-c25f5c9feffb/attheraces-com-api](https://parse.bot/marketplace/52b1f6ff-2d39-48a0-8ffb-c25f5c9feffb/attheraces-com-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-attheraces-com-api-52b1f6ff/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_draw_data

Retrieve draw statistics for a specific race showing expected vs actual wins for each draw position, indicating draw bias.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Ffos-Las, Newton-Abbot, Nottingham). |
| `date` | string | Yes | Race date in D-Month-YYYY format (e.g. 23-June-2026). |
| `time` | string | Yes | Race time in HHMM format without colon (e.g. 1430 for 2:30 PM). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_draw_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>","date":"<string>","time":"<string>"}'
```

### get_formscan

Retrieve FormScan collateral form data showing how runners compare based on previous meetings with index ratings and comparison details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Ffos-Las, Newton-Abbot, Nottingham). |
| `date` | string | Yes | Race date in D-Month-YYYY format (e.g. 23-June-2026). |
| `time` | string | Yes | Race time in HHMM format without colon (e.g. 1430 for 2:30 PM). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_formscan \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>","date":"<string>","time":"<string>"}'
```

### get_pace_data

Retrieve pace analysis data for a specific race showing each runner's pace rating, pace category (Leader, Prominent, Midfield, Hold Up), and typical racing position percentage.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Ffos-Las, Newton-Abbot, Nottingham). |
| `date` | string | Yes | Race date in D-Month-YYYY format (e.g. 23-June-2026). |
| `time` | string | Yes | Race time in HHMM format without colon (e.g. 1430 for 2:30 PM). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_pace_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>","date":"<string>","time":"<string>"}'
```

### get_pace_data_by_meeting

Retrieve pace analysis data for ALL races at a given course on a given date in one call. Internally loops through every race at the meeting to fetch pace chart data, returning combined results keyed by race_time. This avoids making N separate get_pace_data calls when you need pace maps for the full meeting card. The endpoint discovers race times from the course/date navigation, then fetches pace data for each race (capped at 15 races). Each race entry contains the same fields as get_pace_data: pace_rating, pace_description, horse_id, horse_name, and pace_position_pct.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Ffos-Las, Newton-Abbot, Nottingham). |
| `date` | string | Yes | Race date in D-Month-YYYY format (e.g. 23-June-2026). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_pace_data_by_meeting \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>","date":"<string>"}'
```

### get_racecard

Retrieve the full racecard for a specific race including runner details, form, jockey/trainer, age/weight, official rating, expert view commentary, star ratings, and betting forecast.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Ffos-Las, Newton-Abbot, Nottingham). |
| `date` | string | Yes | Race date in D-Month-YYYY format (e.g. 23-June-2026). |
| `time` | string | Yes | Race time in HHMM format without colon (e.g. 1430 for 2:30 PM). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_racecard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>","date":"<string>","time":"<string>"}'
```

### get_tips

Retrieve expert horse racing tips for today's races at a given course. Returns one tip per race with the top tip horse, a watch-out-for horse, star ratings, and expert commentary. Tips are the ATR expert race-by-race guide published daily.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course` | string | Yes | Course name as it appears in the URL path, hyphenated for multi-word names (e.g. Nottingham, Ffos-Las, Cagnes-sur-Mer). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-attheraces-com-api-52b1f6ff/get_tips \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>"}'
```
