CANNASTACK/docs · API referencesettled 24h $0.00· reqs
← BACK

API reference,
no keys, no contracts.

Every endpoint is a single POST. Pay per request in USDC via x402. Same JSON for humans, agents, and on-chain wallets.

Quick start

Every endpoint is a single JSON POST. Without payment it returns HTTP 402 with payment requirements; route the call through an x402-capable client (the x402 fetch shim, AgentCash, or any wallet that speaks x402) to settle $0.02 in USDC on Abstract and receive the data. The exact same URL serves both the 402 challenge and the 200 response.

# Unpaid request returns HTTP 402 + payment requirements
curl -i -X POST https://cannastack.0x402.sh/api/strain-finder \
  -H 'Content-Type: application/json' \
  -d '{"strain":"Blue Dream","location":"Denver, CO"}'

# Pay + retry automatically with an x402 client (settles USDC on Abstract)
PRICING
$0.02 per request, settled in USDC. No subscriptions.
COVERAGE
13 US metros crawled. Live Weedmaps fallback elsewhere.
LATENCY
DB-backed responses typically under 600ms. Live fallback under 2s.

strain-finder

$0.02 per callPOST /api/strain-finder

Search a strain across every dispensary menu within range. Sorted cheapest first.

PARAMETERS
strainstringrequired
Strain name. Partial match supported.
locationstringrequired
City, address, or "City, ST". US only.
radiusnumberoptional
Search radius in miles. Default 15, max 50.
REQUEST
{
  "strain": "Blue Dream",
  "location": "Denver, CO",
  "radius": 15
}
CURL
curl -X POST https://cannastack.0x402.sh/api/strain-finder \
  -H 'Content-Type: application/json' \
  -d '{"strain":"Blue Dream","location":"Denver, CO","radius":15}'
RESPONSE (truncated)
{
  "ok": true,
  "strain": "Blue Dream",
  "location": {
    "query": "Denver, CO",
    "lat": 39.7392,
    "lng": -104.9849,
    "resolved": "Denver, Colorado, USA"
  },
  "source": "database",
  "dispensaries_searched": 24,
  "results": [
    {
      "dispensary": "Native Roots",
      "rating": 4.6,
      "reviews": 1248,
      "address": "1146 Broadway, Denver, CO",
      "url": "https://...",
      "matches": [
        {
          "name": "Blue Dream",
          "category": "flower",
          "brand": "House",
          "genetics": "hybrid",
          "price": 28,
          "orderable": true
        }
      ]
    }
  ],
  "summary": "Searched 24 dispensaries near Denver, CO for \"Blue Dream\". Found 12 matches at 8 dispensaries. Cheapest: $28 at Native Roots.",
  "response_ms": 612
}

price-compare

$0.02 per callPOST /api/price-compare

Compare prices for a category across every dispensary in range. Returns min/max/avg.

PARAMETERS
categorystringrequired
flower, edibles, vape, concentrates, pre-rolls, drinks, tinctures, topicals, wellness
locationstringrequired
City, address, or "City, ST". US only.
geneticsstringoptional
Filter by genetics: sativa, indica, hybrid
radiusnumberoptional
Search radius in miles. Default 15, max 50.
limitnumberoptional
Max products to return. Default 50, max 100.
REQUEST
{
  "category": "flower",
  "location": "Seattle, WA",
  "genetics": "sativa",
  "limit": 50
}
CURL
curl -X POST https://cannastack.0x402.sh/api/price-compare \
  -H 'Content-Type: application/json' \
  -d '{"category":"flower","location":"Seattle, WA","genetics":"sativa","limit":50}'
RESPONSE (truncated)
{
  "ok": true,
  "category": "flower",
  "genetics": "sativa",
  "total_matches": 50,
  "results": [
    {
      "name": "Sour Diesel",
      "brand": "House",
      "genetics": "sativa",
      "price": 22,
      "unit": "eighth",
      "dispensary": "Have a Heart",
      "orderable": true
    }
  ],
  "stats": {
    "min": 22,
    "max": 65,
    "avg": 41.3,
    "count": 50
  },
  "summary": "Compared 50 flower (sativa) products across 18 dispensaries near Seattle, WA. Cheapest: $22. Average: $41.30.",
  "response_ms": 290
}

deal-scout

$0.02 per callPOST /api/deal-scout

Find dispensaries with active deals. Optionally filter by category.

PARAMETERS
locationstringrequired
City, address, or "City, ST". US only.
categorystringoptional
Filter deals to one category (flower, vape, etc.)
radiusnumberoptional
Search radius in miles. Default 15, max 50.
REQUEST
{
  "location": "Las Vegas, NV",
  "category": "flower"
}
CURL
curl -X POST https://cannastack.0x402.sh/api/deal-scout \
  -H 'Content-Type: application/json' \
  -d '{"location":"Las Vegas, NV","category":"flower"}'
RESPONSE (truncated)
{
  "ok": true,
  "category": "flower",
  "total_dispensaries": 32,
  "deals_dispensaries": 18,
  "results": [
    {
      "dispensary": "Planet 13",
      "rating": 4.7,
      "address": "2548 W Desert Inn Rd, Las Vegas, NV",
      "deal_products": [
        {
          "name": "Sour Diesel",
          "price": 18,
          "brand": "House"
        }
      ]
    }
  ],
  "summary": "18 of 32 dispensaries near Las Vegas, NV have active deals. Best value: Sour Diesel at $18 (Planet 13).",
  "response_ms": 483
}

price-history

$0.02 per callPOST /api/price-history

Track price changes over time for a strain or dispensary. Returns trend up/down/stable.

PARAMETERS
strainstringoptional
Strain name (provide this OR dispensary)
dispensarystringoptional
Dispensary name (provide this OR strain)
locationstringoptional
Optional: scope to a city
categorystringoptional
Filter by category
daysnumberoptional
Lookback window in days. Default 30, max 365.
REQUEST
{
  "strain": "Gelato 42",
  "days": 30
}
CURL
curl -X POST https://cannastack.0x402.sh/api/price-history \
  -H 'Content-Type: application/json' \
  -d '{"strain":"Gelato 42","days":30}'
RESPONSE (truncated)
{
  "ok": true,
  "query": {
    "strain": "Gelato 42",
    "days": 30
  },
  "history": [
    {
      "item_name": "Gelato 42",
      "dispensary_name": "Native Roots",
      "price_eighth": 28,
      "recorded_at": "2026-05-10T14:22:00Z"
    }
  ],
  "stats": {
    "current": 28,
    "oldest": 32,
    "change_pct": -12.5,
    "trend": "down",
    "data_points": 14
  },
  "summary": "14 price changes in the last 30 days. Current: $28. Trend: down (-12.5%).",
  "response_ms": 81
}

Errors

Every error responds with HTTP 4xx/5xx and a JSON body of the shape {"ok":false,"error":"…"}. The most common cases: Missing 'strain' / Missing 'location' / Could not geocode (US locations only) / Unknown category.