# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/at-the-races/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/at-the-races/get-draw-data \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/at-the-races/get-formscan \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/at-the-races/get-pace-data \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/at-the-races/get-pace-data-by-meeting \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/at-the-races/get-racecard \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/at-the-races/get-tips \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"course":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.