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

> Browse and search Leafly's cannabis catalog. Look up strains by effect, flavor, terpene, or medical use. Find dispensaries near any location, explore their menus and product details, and search across strains, brands, dispensaries, and articles.

**Category:** Healthcare | **Website:** [leafly.com/](https://leafly.com/) | **Docs:** [parse.bot/marketplace/6905fb61-1298-431a-8062-06f02770a831/leafly-com-api](https://parse.bot/marketplace/6905fb61-1298-431a-8062-06f02770a831/leafly-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/leafly/`
**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 dispensary detail

Get full details for a specific dispensary by slug. Returns comprehensive information including address, phone, hours, weekly schedule, delivery/pickup configuration, photos, ratings, and description.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Dispensary slug identifier (e.g., 'purple-star-md'). |

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

### Get dispensary menu

Get the product menu for a specific dispensary. Returns menu items with product details including name, price, product category, THC/CBD content, strain information, brand, and variant pricing. Paginated; each item includes full dispensary and strain data inline.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lat` | string | No | Latitude for location context. |
| `lon` | string | No | Longitude for location context. |
| `skip` | integer | No | Number of results to skip for pagination. |
| `slug` | string | Yes | Dispensary slug identifier (e.g., 'purple-star-md'). |
| `take` | integer | No | Number of results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/get-dispensary-menu \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"lat":"<string>","lon":"<string>","skip":"<integer>","slug":"<string>","take":"<integer>"}'
```

### Get product detail

Get detailed information for a specific product from a dispensary menu. Returns the full product object, the dispensary details, and a list of similar items from the same dispensary. Requires store_slug, product_id (the menuItemId from get_dispensary_menu), and product_slug (URL-style slug derived from the product name).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Menu item ID from get_dispensary_menu results (the menuItemId field). |
| `product_slug` | string | Yes | URL-style slug derived from the product name (lowercase, hyphen-separated). |
| `store_slug` | string | Yes | Dispensary slug identifier (e.g., 'purple-star-md'). |

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

### Get strain detail

Get detailed information for a specific strain by slug. Returns the full strain profile including description, effects with scores/votes, terpenes, cannabinoid percentiles, flavors, grow info, parent/child strains, and a list of recent user reviews. A separate round-trip from list_strains; use when the summary is insufficient.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Strain slug identifier (e.g., 'blue-dream', 'wedding-cake', 'hash-burger'). |

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

### List brands

List cannabis brands with pagination. Returns brand objects with id, slug, name, description, logo URL, tagline, and available countries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `skip` | integer | No | Number of results to skip for pagination. |
| `take` | integer | No | Number of results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/list-brands \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"skip":"<integer>","take":"<integer>"}'
```

### List dispensaries

List dispensaries near a geographic location. Returns dispensary summaries including name, slug, address, rating, review count, open status, distance, and fulfillment options. Results are ordered by proximity.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lat` | string | No | Latitude of search center (decimal degrees as string). |
| `lon` | string | No | Longitude of search center (decimal degrees as string). |
| `skip` | integer | No | Number of results to skip for pagination. |
| `take` | integer | No | Number of results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/list-dispensaries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"lat":"<string>","lon":"<string>","skip":"<integer>","take":"<integer>"}'
```

### List strains

List cannabis strains with pagination and optional filters. Returns an array of strain objects (with name, slug, category, effects, terpenes, cannabinoids, ratings) and a total count. Filters narrow results server-side; omitting all filters returns the default popular strains. Each strain object includes rich detail for display without a detail fetch.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `effect` | string | No | Filter by effect (e.g., 'creative', 'relaxed', 'euphoric', 'sleepy', 'happy', 'energetic', 'focused'). |
| `flavor` | string | No | Filter by flavor (e.g., 'berry', 'citrus', 'earthy', 'sweet', 'pine'). |
| `helps_with` | string | No | Filter by medical symptom (e.g., 'pain', 'stress', 'anxiety', 'insomnia', 'depression'). |
| `skip` | integer | No | Number of results to skip for pagination. |
| `strain_type` | string | No | Filter by strain type: 'indica', 'sativa', or 'hybrid'. |
| `take` | integer | No | Number of results to return per page. |
| `terpene` | string | No | Filter by terpene (e.g., 'myrcene', 'limonene', 'caryophyllene', 'pinene', 'linalool'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/list-strains \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"effect":"<string>","flavor":"<string>","helps_with":"<string>","skip":"<integer>","strain_type":"<string>","take":"<integer>","terpene":"<string>"}'
```

### Search site

Global search across the Leafly site. Returns results grouped by type: strains, brands, dispensaries, menu items, and articles. Each category returns objects shaped the same as their respective list endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword. |
| `skip` | integer | No | Number of results to skip for pagination. |
| `take` | integer | No | Number of results to return per category. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/search-site \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","skip":"<integer>","take":"<integer>"}'
```

### Search strains

Search for cannabis strains by keyword. Returns matching strain objects with the same shape as list_strains results. Searches against strain name and aliases.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to match against strain names. |
| `skip` | integer | No | Number of results to skip for pagination. |
| `take` | integer | No | Number of results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/leafly/search-strains \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","skip":"<integer>","take":"<integer>"}'
```

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