# Gbgb — 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 greyhound racing information including race results, meeting details, greyhound profiles and form history, and upcoming open races across all GBGB tracks. Search for specific races and greyhounds, browse available tracks and race classes, and stay updated on upcoming racing events.

**Category:** Sports | **Website:** [gbgb.org.uk/](https://gbgb.org.uk/) | **Docs:** [parse.bot/marketplace/8e4e4e30-862d-4bba-ac76-8ecae799b4b3/gbgb-org-uk-api](https://parse.bot/marketplace/8e4e4e30-862d-4bba-ac76-8ecae799b4b3/gbgb-org-uk-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-gbgb-org-uk-api-8e4e4e30/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_greyhound_form

Retrieve the race history/form of a specific greyhound with pagination and optional date filtering. Each form entry contains race details, finishing position, time, and track information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Filter from date in YYYY-MM-DD format. |
| `date_to` | string | No | Filter to date in YYYY-MM-DD format. |
| `dog_id` | string | Yes | Greyhound ID (numeric string). Obtainable from search_greyhound or search_race_results. |
| `limit` | integer | No | Items per page. |
| `page` | integer | No | Page number for pagination. |
| `race_type` | string | No | Race type filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_greyhound_form \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","dog_id":"<string>","limit":"<integer>","page":"<integer>","race_type":"<string>"}'
```

### get_greyhound_profile

Retrieve the profile of a specific greyhound including breeding, trainer, and owner information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dog_id` | string | Yes | Greyhound ID (numeric string). Obtainable from search_greyhound or search_race_results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_greyhound_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dog_id":"<string>"}'
```

### get_meeting_details

Retrieve full details of a specific race meeting including all races and their trap/result data. A meeting contains multiple races at one track on one date.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `meeting_id` | string | Yes | Meeting ID (numeric string). Obtainable from search_race_results items. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_meeting_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"meeting_id":"<string>"}'
```

### get_open_races

Retrieve upcoming open race listings with stage and prize information. Returns paginated results from the GBGB portal.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Items per page. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_open_races \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_race_classes_list

Retrieve the list of all available race classes. Use to discover valid class values for filtering in search_race_results.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_race_classes_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_single_race

Retrieve details for a specific individual race within a meeting, including all trap and result data. Requires both meeting_id and race_id.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `meeting_id` | string | Yes | Meeting ID containing the race (numeric string). |
| `race_id` | string | Yes | Race ID (numeric string). Obtainable from search_race_results or get_meeting_details. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_single_race \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"meeting_id":"<string>","race_id":"<string>"}'
```

### get_tracks_list

Retrieve the list of all available greyhound racing tracks. Use to discover valid track names for filtering in search_race_results.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/get_tracks_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_greyhound

Search for greyhounds by name. Returns matching greyhound names and IDs for use with get_greyhound_profile and get_greyhound_form.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Greyhound name search term (partial or full name). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/search_greyhound \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>"}'
```

### search_race_results

Search and filter race results by track, class, date, and race type. Returns paginated results ordered by most recent. Each result item contains the winning greyhound's details and race metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Race date in YYYY-MM-DD format. |
| `limit` | integer | No | Items per page. |
| `page` | integer | No | Page number for pagination. |
| `race_class` | string | No | Race class filter. Use get_race_classes_list to see all available classes. |
| `race_type` | string | No | Race type filter. |
| `track` | string | No | Track name to filter by. Use get_tracks_list to see all available track names. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gbgb-org-uk-api-8e4e4e30/search_race_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","limit":"<integer>","page":"<integer>","race_class":"<string>","race_type":"<string>","track":"<string>"}'
```
