# Planetfitness — 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 Planet Fitness club locations across the US by city, state, or ZIP code. Retrieve detailed information including addresses, operating hours, amenities, equipment, and membership plans for any club.

**Category:** Maps & Geospatial | **Website:** [planetfitness.com/](https://planetfitness.com/) | **Docs:** [parse.bot/marketplace/d5cdabee-ac08-48de-a990-9ddf1b79cc51/planetfitness-com-api](https://parse.bot/marketplace/d5cdabee-ac08-48de-a990-9ddf1b79cc51/planetfitness-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/planetfitness/`
**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 all locations

Aggregate all Planet Fitness locations across the United States organized by state. Returns condensed club data (name, slug, address, coordinates) for each of the 50 states plus DC. This is a heavy operation issuing one upstream request per state; prefer get_clubs_by_state for targeted queries.

**Estimated cost:** Metered

_No parameters required._

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

### Get club detail

Retrieve full details for a specific club by its slug identifier. Returns complete operating hours, amenities, equipment lists, current membership offers with pricing, holiday hours, and crowd meter data. The slug is obtained from search results (e.g. 'conway-ar', 'manhattan-herald-square-ny'). Returns input_not_found when the slug does not match any club.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Club slug identifier from search results (e.g. 'conway-ar', 'manhattan-herald-square-ny'). |

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

### Get clubs by state

Get all Planet Fitness clubs in a specific US state. Accepts a two-letter state code validated against all 50 US states plus DC. Internally uses the full state name to avoid geocoding ambiguity. Results may be limited by the upstream API's maximum response size.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state_code` | string | Yes | Two-letter US state code. Validated against all 50 US states plus DC. |

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

### Search clubs

Full-text geocoded search for Planet Fitness clubs by city name, state name, or ZIP code. The upstream API geocodes the query string to coordinates and returns nearby clubs sorted by distance. Each result includes location, amenities, equipment categories, and operational status. Queries using two-letter state codes may resolve to non-US locations (e.g. 'CA' to Canada); use the full state name or get_clubs_by_state for unambiguous state-level queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `query` | string | Yes | Search query - city name (e.g. 'Los Angeles'), state name (e.g. 'Texas'), or ZIP code (e.g. '10001'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/planetfitness/search-clubs \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<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.