# Surfline — 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.

> Check real-time surf conditions, forecasts for waves and wind, tide predictions, and live camera feeds from thousands of surf spots around the world. Browse spots by geographic region and access detailed weather data to plan your perfect surfing session.

**Category:** Weather | **Website:** [surfline.com/](https://surfline.com/) | **Docs:** [parse.bot/marketplace/1677d3e0-1921-458a-aac3-e73cb6c79d0d/surfline-com-api](https://parse.bot/marketplace/1677d3e0-1921-458a-aac3-e73cb6c79d0d/surfline-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/surfline/`
**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 current conditions

Retrieve current surf conditions and metadata for a specific spot. Includes rating, surf height, wind, weather, water temperature, swells, tide state, and camera availability. Returns a single snapshot of current conditions rather than a time series.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `spot_id` | string | Yes | Surfline spot ID |

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

### Get spots by region

List surf spots within a specific region or subregion. Traverses the taxonomy tree to find all spots and returns their IDs, names, and coordinates. Example region IDs: Hawaii=58f7ed87dadb30820bb3c537, Europe=58f7eef8dadb30820bb5601b.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | Yes | Surfline region/taxonomy ID |

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

### Get surf forecast

Retrieve detailed surf forecast for a specific spot. Returns wave height (min/max), swell components (height, period, direction, power), and other wave data for multiple timestamps. Each data point includes surf min/max in feet, human-readable size relation, swell breakdown, and probability. The interval parameter controls spacing between data points.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of forecast days |
| `interval` | integer | No | Interval in hours between data points |
| `spot_id` | string | Yes | Surfline spot ID (e.g. 5842041f4e65fad6a7708ceb) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/surfline/get-surf-forecast \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"days":"<integer>","interval":"<integer>","spot_id":"<string>"}'
```

### Get tide forecast

Retrieve tide forecast for a specific surf spot. Returns tide height and type (HIGH/LOW/NORMAL) for multiple timestamps over the requested number of days.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of forecast days |
| `spot_id` | string | Yes | Surfline spot ID |

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

### Get wind forecast

Retrieve wind forecast for a specific surf spot. Returns wind speed, direction, direction type (Offshore/Onshore/Cross-shore), gust data, and optimal score for multiple timestamps. The interval parameter controls spacing between data points.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of forecast days |
| `interval` | integer | No | Interval in hours between data points |
| `spot_id` | string | Yes | Surfline spot ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/surfline/get-wind-forecast \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"days":"<integer>","interval":"<integer>","spot_id":"<string>"}'
```

### List cams

List surf cameras. Without region_id, returns popular US cameras. With region_id, fetches cameras for spots in that region (limited to first 100 spots). Some regions may have no cameras available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | No | Optional region/taxonomy ID to filter cameras by region (e.g. 58f7ed87dadb30820bb3c537 for Hawaii) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/surfline/list-cams \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"region_id":"<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.