Weedmaps brand's product categories
The product categories a brand sells in, with subcategories and product counts; pass a slug as category to brand/products.
Every response includes credits_used: the credits this call cost.
Part of the Weedmaps API: 18 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
slug | string | The brand slug. Example: stiiizy |
url | string | A weedmaps.com brand link, instead of slug. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/weedmaps/v1/brand/categories?slug=stiiizy" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/weedmaps/v1/brand/categories",
params={"slug": "stiiizy"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/weedmaps/v1/brand/categories");
url.searchParams.set("slug", "stiiizy");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"brand_slug": "stiiizy","count": 7,"categories": [{"id": 2,"name": "Flower","slug": "flower","products_count": 709,"subcategories": [{"id": 388,"name": "Buds","slug": "buds","products_count": 643},{"id": 387,"name": "Smalls","slug": "smalls","products_count": 49},"… 1 more"]},{"id": 4,"name": "Vape Pens","slug": "vape-pens","products_count": 133,"subcategories": [{"id": 40,"name": "Disposable","slug": "disposable","products_count": 64},{"id": 7,"name": "Batteries","slug": "batteries","products_count": 61,"subcategories": [{"…": "4 fields"}]},"… 1 more"]},"… 5 more"],"cached": false,"credits_used": 1}