# FEI Equestrian — 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.

> Search and explore detailed information about international equestrian sports, including horses, riders, competition results, rankings, and show schedules from the FEI database. Look up specific athletes and horses, browse upcoming events by venue, and track performance across national federations.

**Category:** Sports | **Website:** [data.fei.org/](https://data.fei.org/) | **Docs:** [parse.bot/marketplace/c90ba5ab-daa8-4540-9e3a-1ad4fe829aaf/data-fei-org-api](https://parse.bot/marketplace/c90ba5ab-daa8-4540-9e3a-1ad4fe829aaf/data-fei-org-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-data-fei-org-api-c90ba5ab/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_athlete_results

Get competition results history for a specific athlete. Returns an array of competitions the athlete has participated in with horses, positions and scores. May return an empty array for athletes with no recorded FEI history.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted person ID from search_persons results (Name_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_athlete_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_competition_results

Get competition results table for a specific competition. Each row is a rider-horse combination with per-round scores. Round columns are namespaced (e.g. 'Round 1 Obstacle Faults', 'Round 1 Time Faults', 'Round 1 Total Faults', 'Round 1 Time', 'Jump-Off 1 Obstacle Faults', etc.) so per-round values are always distinguishable. The primary input path is the longer result-list ID (typically 96 characters) found in the Competition_id field of get_athlete_results or get_horse_results output. These IDs resolve directly to result tables. For 32-char Competition_ids from event schedule grids, resolution is attempted via the CompetitionDetail page but may return an empty array when the site requires browser-based navigation to reach the results. For reliable results with schedule-grid competitions, use get_event_results which fetches results inline via the EventDetail page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Competition result-list ID from get_athlete_results or get_horse_results (Competition_id field, typically 96 characters). 32-char schedule-grid IDs are accepted but may return empty results; use get_event_results for those. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_competition_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_event_competitions

Get the list of competitions for a specific event by event ID (from get_show_detail events array or search_calendar Events_id). Returns competition schedule details including name, rule, date, prize money, obstacle height, and result status. Each competition includes a Competition_id that identifies the competition on the FEI system. The competitions grid is populated for events with a published draft schedule (typically upcoming events); past events may return an empty competitions array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted event ID from get_show_detail events (Discipline_id or Event Code_id field) or search_calendar (Events_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_event_competitions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_horse_detail

Get detailed profile for a specific horse by encrypted ID (p_id). Returns registration details, identification, status, lineage, and administrative information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted horse ID from search_horses results (Name_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_horse_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_horse_results

Get competition results history for a specific horse. Returns an array of competitions the horse has participated in with dates, events, athletes, positions and scores. May return an empty array for inactive or older horses.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted horse ID from search_horses results (Name_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_horse_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_national_federation_detail

Get details for a specific National Federation including contact information, leadership, and member list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `nf_id` | string | Yes | NF numeric ID (e.g. 6 for Argentina) |
| `slug` | string | No | URL slug for the federation name. Optional; if omitted the page still loads by nf_id alone |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_national_federation_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"nf_id":"<string>","slug":"<string>"}'
```

### get_person_detail

Get detailed profile for a specific person by encrypted ID (p_id). Returns personal details, nationality, status, group memberships, and language skills.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted person ID from search_persons results (Name_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_person_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### get_rankings

Get FEI world rankings for a specific discipline. By default fetches all pages (50 rows/page) to return the complete ranked list. Use top_n or max_pages to cap the walk — a short result that reports total_count is acceptable. When ranking_year and/or ranking_number are provided, selects a historical ranking snapshot via the site's year/number dropdowns. When both are omitted, returns the latest ranking. Response includes flat metadata fields: ranking_number (integer, the N° of the snapshot), as_of_date (DD/MM/YYYY), validated_results_from and validated_results_to (DD/MM/YYYY range of included results), and total_count (total ranked athletes available). Makes one request per page to paginate.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `max_pages` | integer | No | Maximum number of pages to fetch (each page has 50 rows). Omit to fetch all pages. |
| `ranking_code` | string | Yes | Ranking code (e.g. S_WR for Jumping Longines Rankings, D_WR for Dressage World Ranking) |
| `ranking_number` | integer | No | Ranking number to select from the 'Ranking / Standing Number' dropdown (e.g. 295). Requires ranking_year to be set. Returns stale_input if the number is not available for the given year. |
| `ranking_year` | integer | No | Year to select from the 'Ranking / Standing Year' dropdown (e.g. 2025). When provided, narrows the ranking number options to those published in that year. Omit to use the current/latest ranking. |
| `top_n` | integer | No | Return only the top N ranked athletes. Truncates after collecting enough rows. Omit to return the full list. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"max_pages":"<integer>","ranking_code":"<string>","ranking_number":"<integer>","ranking_year":"<integer>","top_n":"<integer>"}'
```

### get_show_detail

Get full details for a specific show including its list of events with discipline, event code, and associated competitions. Each event in the events array includes a competitions sub-array with competition schedule details (name, rule, date, prize money, obstacle height, result status, and Competition_id). The Competition_id can be used to identify each competition on the FEI system. Competitions are populated for events with a published draft schedule (typically upcoming events); past events may have an empty competitions array. Makes one additional request per event to fetch competition data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `p_id` | string | Yes | Encrypted show ID from search_calendar results (Show_id field) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/get_show_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_id":"<string>"}'
```

### list_national_federations

List all FEI National Federations with summary statistics including event, official, athlete, and horse counts.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/list_national_federations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_calendar

Search the FEI calendar for shows/events by date range and/or venue. Accepts DD/MM/YYYY or ISO YYYY-MM-DD date formats. Returns up to 50 shows per page; use the page parameter together with total_count to paginate. Results within each page are sorted descending by start date with a stable secondary sort on Show_id so that ties do not shift across page boundaries. When the date range is wholly in the past, automatically navigates to the Past Shows view. Each show in the results includes an Events_ids array with all event IDs reachable from that show.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date in DD/MM/YYYY or YYYY-MM-DD format |
| `date_to` | string | No | End date in DD/MM/YYYY or YYYY-MM-DD format |
| `discipline_code` | string | No | Discipline code to filter by (e.g. 1=Jumping, 2=Dressage, 3=Eventing, 4=Driving, 5=Endurance, 6=Reining, 7=Vaulting, 8=Para Dressage, 9=Para Driving) |
| `page` | integer | No | Page number (1-indexed). Each page returns up to 50 shows. |
| `show_type_code` | string | No | Show type code to filter by |
| `venue` | string | No | Venue name to search for (e.g. London, Madrid) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/search_calendar \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","discipline_code":"<string>","page":"<integer>","show_type_code":"<string>","venue":"<string>"}'
```

### search_horses

Search for horses by name or FEI ID. At least one of name or fei_id should be provided. Returns an array of matching horses with basic registration info including an encrypted ID (Name_id) used for detail/results lookups.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fei_id` | string | No | FEI ID of the horse (e.g. 102YQ59) |
| `name` | string | No | Horse name to search for (partial match supported) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/search_horses \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fei_id":"<string>","name":"<string>"}'
```

### search_persons

Search for persons (athletes, officials, owners) by last name or FEI ID. At least one parameter should be provided. Returns matching persons with roles and an encrypted ID (Name_id) for detail lookups.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fei_id` | string | No | FEI ID of the person (numeric, e.g. 10112239) |
| `first_name` | string | No | First name filter. May not work reliably when combined with last_name |
| `last_name` | string | No | Last/family name to search for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/search_persons \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fei_id":"<string>","first_name":"<string>","last_name":"<string>"}'
```

### search_shows_by_venue

Search for shows at a specific venue. Returns FEI shows scheduled at the given venue. May return an empty array for venues with no scheduled shows.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `venue` | string | Yes | Venue name to search for (e.g. London, Madrid, Paris) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-data-fei-org-api-c90ba5ab/search_shows_by_venue \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"venue":"<string>"}'
```
