# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-bookretreats-com-api-12ad501e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-bookretreats-com-api-12ad501e/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-bookretreats-com-api-12ad501e/get_default_locations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-bookretreats-com-api-12ad501e/get_retreat_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-bookretreats-com-api-12ad501e/search_retreats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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>"}'
```
