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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-diffordsguide-com-api-5559314f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-diffordsguide-com-api-5559314f/get_cocktail_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-diffordsguide-com-api-5559314f/list_cocktails \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-diffordsguide-com-api-5559314f/search_cocktails \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
