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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/gbgb/`
**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 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/credits/gbgb/get-greyhound-form \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-greyhound-profile \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-meeting-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-open-races \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-race-classes-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-single-race \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/get-tracks-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/search-greyhound \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/gbgb/search-race-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","limit":"<integer>","page":"<integer>","race_class":"<string>","race_type":"<string>","track":"<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.