MushroomBans.com API

Access mushroom legal status data programmatically. Perfect for merchants building compliance tools, checkout validation, and more.

Pricing & Usage

The API includes a small free tier that's perfect for initial testing and prototyping. For production use, especially in high-traffic checkout flows, you should provision a dedicated API key so you're not limited by anonymous rate limits.

The official WooCommerce plugin is designed to run with a MushroomBans API key so validation remains reliable under load. Without an API key configured in WordPress, the plugin will skip validation and never block checkout.

Endpoints

Get All States

GET /api/status

Returns a list of all states with their current legal status.

Try it →

Get State by Slug

GET /api/status/[state]

Returns detailed information for a specific state, including county restrictions.

Example: /api/status/california

Try it →

Checkout Geo-Blocking

POST /api/checkout/validate

Validate mushroom orders at checkout against state and local bans before you capture payment.

View checkout integration guide →

Integration Guides

WooCommerce Plugin

Official WooCommerce plugin that calls /api/checkout/validate to block mushroom orders to banned or restricted destinations.

View WooCommerce integration guide →

Response Format

{
  "state": "California",
  "stateCode": "CA",
  "slug": "california",
  "status": "RESTRICTED",
  "ageRestriction": 21,
  "effectiveDate": "2024-01-01",
  "lastUpdated": "2025-12-15T00:00:00.000Z",
  "lastVerified": "2025-12-15T00:00:00.000Z",
  "summary": "Legal statewide with age restriction",
  "countyRestrictions": [
    {
      "countyName": "San Diego",
      "status": "BANNED",
      "details": "Board voted to ban sales",
      "effectiveDate": "2026-01-15"
    }
  ]
}

Usage Examples

curl

# All states
curl "https://mushroombans.com/api/status"

# Single state (e.g. California)
curl "https://mushroombans.com/api/status/california"

Python

import requests

# Check if mushroom can be shipped to a state
r = requests.get("https://mushroombans.com/api/status/california")
data = r.json()

if data.get("status") == "BANNED":
    print("Cannot ship to California - mushroom is banned")
else:
    # Check county restrictions
    for c in data.get("countyRestrictions", []):
        if c.get("status") == "BANNED":
            print(f"Cannot ship to {c.get('countyName')} County")

JavaScript

// Check if mushroom can be shipped to a state
const response = await fetch('https://mushroombans.com/api/status/california');
const data = await response.json();

if (data.status === 'BANNED') {
  alert('Cannot ship to California - mushroom is banned');
}

// Check county restrictions
const county = data.countyRestrictions.find(
  c => c.countyName === userCounty && c.status === 'BANNED'
);

if (county) {
  alert(`Cannot ship to ${county.countyName} County`);
}

Powered by MushroomBans API

Using our API? Add a badge to your site. Every embed helps others discover the API and reinforces legitimacy.

Embed code:

<a href="https://mushroombans.com/api" target="_blank" rel="noopener noreferrer" title="mushroom legal status by state">
  Powered by MushroomBans API
</a>

Why Choose MushroomBans.com API?

Only Source for mushroom legal status API

The only API providing comprehensive mushroom legal status data across all 50 states.

County-Level Detail

Most APIs don't go this granular. We track restrictions down to the county and city level.

Lower risk of Compliance Violations

High-stakes use case. Block illegal shipments before they happen, protecting your business.

Real-Time Updates

Automated monitoring ensures your data stays current. Legal changes reflected within 24 hours.

Critical for Checkout Validation

Integrate directly into your checkout flow to verify legality by customer IP or address in real-time. (Need help with integration?)

API Access Tiers

Pro subscriptions are available now. Subscribe and you'll receive your API key immediately after checkout.

Free

$0/month

  • 10 requests/day
  • All endpoints
  • Community support

No API key required. Just start making requests.

MOST POPULAR

Pro

$99/month

  • Unlimited requests
  • Dedicated API key
  • Priority email support
  • Real-time updates

Enterprise

Custom

  • Everything in Pro
  • SLA guarantees
  • Dedicated support
  • Custom integrations
Contact Sales

Authentication

Pro and Enterprise users authenticate using an API key. Include it in your requests. This is for the public API (status, stats, updates); use X-API-Key with your subscriber API key. Admin/backend APIs use X-Admin-Key (or an admin API key in X-API-Key) and do not accept subscriber keys.

Option 1: Header (recommended)

curl -H "X-API-Key: kb_pro_your_api_key_here" \ https://mushroombans.com/api/status

Option 2: Query parameter

https://mushroombans.com/api/status?api_key=kb_pro_your_api_key_here