# BookRetreats — 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 retreats across multiple locations and categories on BookRetreats.com. Access detailed information for individual retreat listings including pricing, availability, ratings, duration, amenities, and host details. Filter by destination, retreat type, price range, and duration to surface relevant results.

**Category:** Travel | **Website:** [bookretreats.com/](https://bookretreats.com/) | **Docs:** [parse.bot/marketplace/12ad501e-66fd-40cf-b7d7-ddf8e39a4d9c/bookretreats-com-api](https://parse.bot/marketplace/12ad501e-66fd-40cf-b7d7-ddf8e39a4d9c/bookretreats-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/bookretreats/`
**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 categories

Get list of retreat categories (types) with their subcategories and styles. Each type includes an alias field that can be used as the category parameter in search_retreats. Categories contain id, name, and synonyms. Styles contain id, name, and base_url.

**Estimated cost:** Metered

_No parameters required._

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

### Get default locations

Get list of default location strings used for filtering retreats on the site. Returns the complete set of location values accepted by the search_retreats location parameter.

**Estimated cost:** Metered

_No parameters required._

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

### Get retreat details

Fetch full details for a specific retreat by its URL. Returns structured data including description, host, offers with pricing, reviews, food, accommodation, and program information. The URL should be obtained from search_retreats results (items[*].cta_urls.details_url). Parses structured LD+JSON data and HTML sections from the retreat page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the retreat details page (e.g. 'https://bookretreats.com/r/6-day-yoga-healing-sacred-mayan-journey-quintana-roo-mexico'). Obtain from search_retreats results items[*].cta_urls.details_url. |

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

### Search retreats

Search for retreats based on location, category, and other filters. Returns a paginated list of retreat cards with pricing, ratings, duration, availability, and links to detail pages. Pagination is page-based (30 results per page). When no filters are applied, returns all retreats sorted by recommendation. Each item includes a cta_urls.details_url suitable for passing to get_retreat_details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Retreat category filter (e.g. 'yoga-retreats', 'wellness-retreats', 'ttc'). Values correspond to alias field from get_categories endpoint. |
| `duration_max` | integer | No | Maximum duration in days. |
| `duration_min` | integer | No | Minimum duration in days. |
| `location` | string | No | Location filter (e.g. 'Mexico', 'Thailand', 'Costa Rica'). Values available from get_default_locations endpoint. |
| `page` | integer | No | Page number for pagination. |
| `price_max` | integer | No | Maximum price filter in USD. |
| `price_min` | integer | No | Minimum price filter in USD. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/bookretreats/search-retreats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","duration_max":"<integer>","duration_min":"<integer>","location":"<string>","page":"<integer>","price_max":"<integer>","price_min":"<integer>","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.