The BigBasket categories API for the full category tree
Fetch the BigBasket category tree as a flat JSON list. Pass a slug to the BigBasket Products API as its category to browse that shelf.
BigBasket Categories API at a glance
This API returns the BigBasket category tree as JSON. Send a POST request, then read the categories array. Run the example below to see the exact shape.
- Endpoint
POST /v1/data/bigbasket/categories- Authentication
- API key as
Authorization: Bearer wh_… - Stage
- Stable
- Output
- A categories array plus a count. Each entry has category_id, name, slug, level, url, parent_slug, path and image_url
- Depth
- max_depth from 1 to 3. The default is 3.
- Subtree
- parent takes a slug such as dairy or a bigbasket.com/pc URL
- Location
- No location option. The request takes max_depth, parent and timeout_ms only.
- Next step
- Pass a slug to BigBasket Products as category
- Credit weight
- 1. See the pricing page for current rates.
One request, structured JSON.
This request lists the direct children of the dairy category. The response below shows two of the ten categories returned. Copy the request to try it yourself.
curl -X POST "https://api.datablue.dev/v1/data/bigbasket/categories" \
-H "Authorization: Bearer wh_..." \
-H "Content-Type: application/json" \
-d '{
"parent": "dairy",
"max_depth": 1
}'{
"success": true,
"source": "bigbasket",
"captured_at": "2026-11-21T08:29:20Z",
"count": 10,
"categories": [
{
"category_id": "375",
"name": "Cheese",
"slug": "cheese",
"level": 2,
"url": "https://www.bigbasket.com/pc/bakery-cakes-dairy/dairy/cheese/",
"parent_slug": "dairy",
"path": ["Bakery, Cakes & Dairy", "Dairy", "Cheese"],
"image_url": "https://www.bbassets.com/media/uploads/category_images/nr/cheese_nr_1.png"
},
{
"category_id": "1913",
"name": "Fresh Milk",
"slug": "fresh-milk",
"level": 2,
"url": "https://www.bigbasket.com/pc/bakery-cakes-dairy/dairy/fresh-milk/",
"parent_slug": "dairy",
"path": ["Bakery, Cakes & Dairy", "Dairy", "Fresh Milk"],
"image_url": "https://www.bbassets.com/media/uploads/category_images/nr/fresh-milk_nr_1.png"
}
]
}What a category returns.
Each category arrives as one object with named fields.
Identity
Every category has a category_id, a name and a slug. Pass the slug to BigBasket Products as its category value.
Level and parent
The level field gives the depth of an entry. Children of dairy came back at level 2 in our sample, and each pointed to dairy. The parent_slug field links each entry to its parent, so you rebuild the tree from the flat list.
Path and links
The path array lists the names from the top level down to the entry itself. The url field links to the category page on bigbasket.com. The image_url field points to a category image.
Entry count
The response also carries a count of the entries returned. It was 10 for the dairy children. Check it against the length of your categories array.
Options that shape your tree.
All three options are optional in the schema. Add parent or max_depth to narrow the tree.
Depth
Use max_depth with a value from 1 to 3 to choose how deep the returned list goes. Without max_depth the tree comes back 3 levels deep. A value of 1 returns only top-level entries, or only direct children when you set parent.
Parent subtree
Set parent to a slug such as dairy to return only the entries inside that branch. A bigbasket.com/pc category URL also works as a value. Pair it with max_depth 1 for the direct children only.
No location option
This API takes no location option in its schema. Product results depend on the delivery location, so pass a pincode when you browse a slug with BigBasket Products.
Timeout
Set timeout_ms from 3000 to 60000 milliseconds. The provider deadline defaults to 20000 milliseconds. Keep the default while you test a new request.
What teams build with it.
A category tree guides catalogue crawls and market maps.
Catalogue crawl planning
Fetch the tree at depth 3, then loop over every slug in the list you get back. Call BigBasket Products with the slug as category. Add a pincode to every one of those calls.
Taxonomy mapping
Map your own category list onto BigBasket names and slugs. Use the path array to match entries by depth.
Change tracking
Fetch the tree on a schedule and compare category_id values. New or missing ids show where the tree changed.
Pickers and navigation
Feed the list into a picker so users choose a shelf by name, and store the slug behind each name.
Why use an API instead of reading the site yourself.
A flat list is easier to loop over than a nested menu in the page markup. Every entry carries its level and parent_slug, so the hierarchy is still there when you need it.
You also get slugs that BigBasket Products accepts. Pass one to BigBasket Products as category, and that shelf is listed at the pincode you send. The tree request itself takes no pincode.
Each response says how many entries it holds in count. Check count against the length of your list so your crawl knows it has the whole branch. Try one branch first with the parent option.
Your first category list in a minute.
Sign up, get a key and list one branch.
Create an account
Sign up to get your API key.
Request the tree
POST to /v1/data/bigbasket/categories with a Bearer key, then add parent and max_depth to narrow it.
Browse a shelf
Copy a slug from the list, then send it to the BigBasket Products API as category with a pincode.
BigBasket categories API questions.
Short answers about data and billing before you start.
It returns the BigBasket category tree as a flat list, with one JSON object for each category. Each entry has a name, a slug and a level.
Still have a question?Ask us anything
Send a POST request to /v1/data/bigbasket/categories with your Bearer key. Add parent to list the entries of one branch.
Copy the slug field from any entry in the list. Pass it as category to the BigBasket Products API, and add the pincode you want.
Use max_depth with a value from 1 to 3 to choose how deep the returned list goes. Without max_depth the list goes 3 levels deep. A value of 1 returns only top-level entries, or only direct children when you set parent.
This API takes no location option in its schema. Product results from BigBasket Products depend on the delivery location, so pass a pincode there.
Each entry carries a category_id, a name and a slug. It also carries a level and a parent_slug. The url, path and image_url fields round it out. Compare these fields with the sample response above.
This API is marked stable in our catalogue today. Build against the documented fields, then check the changelog before each upgrade you ship to production.
This API has a credit weight of 1. Check the pricing page for current rates.
List BigBasket categories in a minute.
Create an account to get your key. Then paste the example request into your terminal.
Start free
