# Ehorses — 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 browse horses from the world's largest horse market with detailed filtering options, view comprehensive horse profiles and seller information, and discover active listings from specific sellers. Access real-time market data including homepage statistics and available search filter options to find your perfect horse.

**Category:** Marketplaces | **Website:** [ehorses.com/](https://ehorses.com/) | **Docs:** [parse.bot/marketplace/eac12581-cdd2-4185-8dc8-74ed6ad043be/ehorses-com-api](https://parse.bot/marketplace/eac12581-cdd2-4185-8dc8-74ed6ad043be/ehorses-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/ehorses/`
**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 homepage stats

Get site-wide statistics from the ehorses.com homepage including total listings, new horses added today, and horses sold today.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/get-homepage-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get horse detail

Get full details for a single horse listing including attributes, description, images, seller info, and pedigree. Requires either the full listing URL (from search results) or an ad_id. The full URL is preferred as the site requires the slug-based URL format.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | No | Listing ID (numeric). URL is preferred as the site requires the full slug URL. |
| `url` | string | No | Full listing URL from search results, e.g. 'https://www.ehorses.com/<slug>/<ad_id>.html'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/get-horse-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>","url":"<string>"}'
```

### Get search filters metadata

Get available filter options for horse search including breed, gender, and color lists with their IDs. Use these IDs as filter values in search_horses.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/get-search-filters-metadata \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get seller horses

Retrieve active horse listings for a specific seller. Loads the seller's horses via AJAX from their profile page. Returns horse id, title, URL, breed, and price.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `username` | string | Yes | Seller username/slug as it appears in the profile URL path (e.g. 'gestuethillebrecht'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/get-seller-horses \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","username":"<string>"}'
```

### Get seller profile

Get seller/breeder profile information including name, contact details (address, phone, email), description, and active listing count. Uses the seller's username slug from their profile URL path.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | Seller username/slug as it appears in the profile URL path (e.g. 'gestuethillebrecht'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/get-seller-profile \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```

### Search horses

Search for horses on the ehorses.com marketplace. Returns paginated results with horse title, price, breed, URL, and listing details. Supports filtering by breed, gender, color, age, height, price, and country. Without filters returns the newest listings. Paginates via page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `age_from` | string | No | Minimum age in years. |
| `age_to` | string | No | Maximum age in years. |
| `breed` | string | No | Breed ID from get_search_filters_metadata breed list. |
| `color` | string | No | Color ID from get_search_filters_metadata color list. |
| `country` | string | No | Country code as numeric ID from the site's country list. Use '0' for all countries. |
| `gender` | string | No | Gender ID: '3' for Mare, '2' for Stallion, '1' for Unknown, '4' for Gelding. |
| `height_from` | string | No | Minimum height in cm. |
| `height_to` | string | No | Maximum height in cm. |
| `page` | integer | No | Page number for pagination. |
| `price_max` | string | No | Maximum price. |
| `price_min` | string | No | Minimum price. |
| `query` | string | No | Keyword search term. |
| `sort` | string | No | Sort order. Values: 'datum+desc' (newest first), 'preis+asc' (price ascending), 'preis+desc' (price descending). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ehorses/search-horses \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"age_from":"<string>","age_to":"<string>","breed":"<string>","color":"<string>","country":"<string>","gender":"<string>","height_from":"<string>","height_to":"<string>","page":"<integer>","price_max":"<string>","price_min":"<string>","query":"<string>","sort":"<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.