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)strain-finder
$0.02 per callPOST /api/strain-finderSearch a strain across every dispensary menu within range. Sorted cheapest first.
{
"strain": "Blue Dream",
"location": "Denver, CO",
"radius": 15
}curl -X POST https://cannastack.0x402.sh/api/strain-finder \
-H 'Content-Type: application/json' \
-d '{"strain":"Blue Dream","location":"Denver, CO","radius":15}'{
"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-compareCompare prices for a category across every dispensary in range. Returns min/max/avg.
{
"category": "flower",
"location": "Seattle, WA",
"genetics": "sativa",
"limit": 50
}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}'{
"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-scoutFind dispensaries with active deals. Optionally filter by category.
{
"location": "Las Vegas, NV",
"category": "flower"
}curl -X POST https://cannastack.0x402.sh/api/deal-scout \
-H 'Content-Type: application/json' \
-d '{"location":"Las Vegas, NV","category":"flower"}'{
"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-historyTrack price changes over time for a strain or dispensary. Returns trend up/down/stable.
{
"strain": "Gelato 42",
"days": 30
}curl -X POST https://cannastack.0x402.sh/api/price-history \
-H 'Content-Type: application/json' \
-d '{"strain":"Gelato 42","days":30}'{
"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.