# Difford's Guide — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 explore thousands of cocktail recipes from Difford's Guide, including detailed ingredients, instructions, and drink metadata to discover new beverages or find exactly what you're looking for. Browse through curated cocktail collections and access comprehensive drink information to plan your next mixology project.

**Category:** Food & Dining | **Website:** [diffordsguide.com/](https://diffordsguide.com/) | **Docs:** [parse.bot/marketplace/5559314f-8965-4874-b7eb-c81b04371748/diffordsguide-com-api](https://parse.bot/marketplace/5559314f-8965-4874-b7eb-c81b04371748/diffordsguide-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/difford-s-guide/`
**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 cocktail details

Retrieve the full recipe and metadata for a single cocktail page. Extracts structured data (JSON-LD) and HTML elements to produce ingredients, preparation steps, ratings, glass, garnish, tags, and publication info. The URL is typically obtained from search_cocktails or list_cocktails results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the cocktail recipe page from Difford's Guide (e.g. 'https://www.diffordsguide.com/cocktails/recipe/1255/margarita-on-the-rocks-diffords-recipe'). Obtainable from search_cocktails results[*].url or list_cocktails cocktails[*].url. |

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

### List cocktails

Browse the Difford's Guide cocktail directory in reverse chronological order. Supports cursor-based pagination using Unix timestamps. Each page returns cocktail summaries with name, description, URL, image, and date. The next_cursor field enables fetching subsequent pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cursor` | string | No | Pagination cursor (Unix timestamp string) from the next_cursor field of a previous response. Use '0' or omit for the first page. |
| `limit` | integer | No | Maximum number of cocktails to return (up to 100). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/difford-s-guide/list-cocktails \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"cursor":"<string>","limit":"<integer>"}'
```

### Search cocktails

Full-text search over Difford's Guide cocktail directory by name or ingredient keyword. Returns all matching results in a single page. Each result carries a name and URL suitable for drilling into full recipe details via get_cocktail_details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword such as a cocktail name or ingredient (e.g. 'margarita', 'vodka', 'negroni'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/difford-s-guide/search-cocktails \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.