Publix category tree
GET https://api.api.sh/publix/v1/categories
Publix's category tree: ids (usable as category in search), names and links.
Every response includes credits_used: the credits this call cost.
Part of the Publix API: 6 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
store_id | string | Publix store number (default 1083; see /publix/v1/stores). Example: 1651 |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/publix/v1/categories?store_id=1651" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/publix/v1/categories",
params={"store_id": "1651"},
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/publix/v1/categories");
url.searchParams.set("store_id", "1651");
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)
{"store_id": 1651,"count": 16,"categories": [{"id": "76208a0d-ced5-456f-8c30-fdd1698a302b","name": "Baby","slug": "Baby","url": "https://www.publix.com/c/baby/76208a0d-ced5-456f-8c30-fdd1698a302b","children": [{"id": "78e5beda-3150-479b-ad86-8d41b82aa0fb","name": "Baby Food","slug": "Baby-Food","url": "https://www.publix.com/c/baby-food/78e5beda-3150-479b-ad86-8d41b82aa0fb","children": []},{"id": "f82897dc-d2d8-450a-a9bd-f07ffb7379cf","name": "Baby Health","slug": "Baby-Health","url": "https://www.publix.com/c/baby-health/f82897dc-d2d8-450a-a9bd-f07ffb7379cf","children": []},"… 7 more"]},{"id": "1cebeb50-903e-4505-9bae-05224866b19d","name": "Bakery","slug": "Bakery","url": "https://www.publix.com/c/bakery/1cebeb50-903e-4505-9bae-05224866b19d","children": [{"id": "c1843c68-8418-4b6d-adb9-c3ecfdcdc011","name": "Bagels and English Muffins","slug": "Bagels-and-English-Muffins","url": "https://www.publix.com/c/bagels-and-english-muffins/c1843c68-8418-4b6d-adb9-c3ecfdcdc011","children": []},{"id": "429fd504-d583-4589-91c8-1a3bdfa86c32","name": "Bakery Platters","slug": "Bakery-Platters","url": "https://www.publix.com/c/bakery-platters/429fd504-d583-4589-91c8-1a3bdfa86c32","children": []},"… 11 more"]},"… 14 more"],"cached": false,"credits_used": 1} The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.