Category tree
List the category tree with names, slugs, ids, page addresses and nested child categories.
Loading / 加载中…
BigBasket API · E-commerce & marketplace data
The BigBasket API offers four calls: delivery details for a PIN code, the category tree, a filtered product search for one PIN code and the detail of a single product with its pack sizes.
JSON in, a structured response out. Every public gateway endpoint uses POST.
List the category tree with names, slugs, ids, page addresses and nested child categories.
Check how BigBasket serves one PIN code: its place, services, stores and next delivery slots.
Read one product at one PIN code with its price, stock, nutrition details and pack sizes.
Search the products of one PIN code by keyword, category or brand with price, rating and sort filters.
The PIN code resolves to a place, so the call returns place, area, city and state with the coordinates lat and lng. pincode repeats the code sent to bigbasket-pincode.
serviceable shows whether the PIN code is served. For a located PIN code the call also lists stores, the service areas, whose eta and eta_message carry the delivery promise, such as Get it in 10 mins. next_slots adds the next available slot of a store with its slot_time, eta_minutes, message and slots_full.
bigbasket-categories needs no input and returns the category tree in three levels: top level, sub-category and leaf. Each entry in categories has a name, a slug, an id and a url, and its children hold the entries one level below; count comes with the list.
A row of bigbasket-search also reports where its product sits in the tree. category holds the top, mid and leaf names with the top_slug and mid_slug slugs. leaf_id identifies the leaf category.
Each row of results in a bigbasket-search answer describes one product with the pack it shows, at the PIN code of the search:
| Field | What it tells you |
|---|---|
price | the selling price of the pack in the row |
mrp | the maximum retail price of that pack |
discount_percent | the share of the MRP that the shelf price saves, which discount_text writes out for display |
unit_price | the price per unit, with the figure in amount and its unit in per, such as 100 g or a litre |
in_stock | shows whether the pack of the row is available at the searched location |
offer_text | the offer text shown on the shelf |
rating | the average rating with the counts in ratings and reviews |
is_best_value | whether the pack counts as the best value among the pack sizes |
other_packs lists the other pack sizes of the same product with their own prices and stock, and product_id is the value bigbasket-product takes to read the product itself.
A search starts from one of three entry points. body.query searches the way the BigBasket search box does, body.category lists one category and body.brand opens the page of one brand. Next to body.query or body.category, body.brand works as a brand filter instead.
body.sort sets the order of the rows and defaults to relevance. The other five values are:
price_asc: the lowest selling price firstprice_desc: the highest selling price firstsaving_asc: the smallest rupee saving firstsaving_desc: the largest rupee saving firstdiscount_desc: the largest percentage off firstBesides results, the data of a search carries a summary of the call. pincode, query, category and brand repeat what was searched, total is the count that BigBasket reports for the search, and returned shows how many rows the page holds.
page and last_page place the page within the results, and has_next shows whether a further page exists. location holds city_id, and serviceable shows whether BigBasket serves the PIN code.
When nothing matches, the page is filled with suggestions. substituted_results shows that this happened, and substituted_for says what the suggestions replaced.
bigbasket-product returns a product object and a packs list together with pincode, location and serviceable.
product carries the name, brand, pack_size and ean barcode of the item. Its price, mrp, discount_percent and unit_price give the money figures, and in_stock with availability_code gives the stock state. rating, category and food_type describe the item further, breadcrumb is its category trail, images lists its pictures and tags its tags.
description, ingredients, nutrition and storage hold the text of the product page, and other_info adds details such as the manufacturer and the best-before information. packs lists the pack sizes sold under the product, each with its own price, mrp, unit_price, in_stock and is_best_value.
BigBasket is an Indian online grocer based in Bengaluru, founded in 2011 and owned by Tata Digital, a Tata Group company. Tata Digital, a wholly owned subsidiary of Tata Sons, acquired a majority stake in the company that operates the platform in May 2021.
Shoppers order groceries online and have them delivered to their home on a date and in a time slot they choose. BigBasket also sells a private label range alongside other brands, and its BB Now service promises delivery within minutes from a nearby store.
POST /api/v1/bigbasket/<action> with x-api-key, Content-Type: application/json and a required Idempotency-Key.ok: true: data is the result of the operation, meta.requestId identifies the recorded request and meta.chargedCreditUnits is the amount charged. Otherwise ok is false and error.code names the reason; read ok and error.code rather than relying on the HTTP status alone. Every gateway reply carries a request id for support: meta.requestId, or a top-level requestId in a reply without meta (such as a refusal before admission).body.page starts at 1.body.pincode and at least one of body.query, body.category or body.brand; body.category is not combined with body.query.body.price_band matches the product family, so a row whose shown pack lies outside the band can appear; rows_outside_price_filter counts those rows.body.sort follows BigBasket's own sorting and is not strictly monotonic.ean in a search row holds a GTIN only when its check digit is valid.Send the PIN code as body.pincode to bigbasket-pincode and read the bbnow entry of services. The entries of services are the BigBasket services, such as bb-b2c for slot delivery and bbnow for quick delivery, and each value is the state of that service. pin, pin_code, postal_code and zip are accepted as alternative names for the input, and the code is a 6-digit Indian PIN code.
Send body.pincode and body.query to bigbasket-search, for example 400020 and atta. The matching rows come back in results, each with its product_id, price, mrp and in_stock. q, keyword and search are accepted as alternative names for body.query. Narrow the rows of the answer further with body.brand, body.price_band, body.discount_band or body.min_rating, and read total for the count that the search reports.
Call bigbasket-categories, which needs no input. Its categories list nests the top-level, sub-category and leaf entries through children, and the slug of an entry is the value to send as body.category in bigbasket-search. A slug from any level of the tree lists that category, and category_slug is accepted as an alternative name for body.category. The slugs in the category of a search row work in the same way.
Take the product_id from a search row and send it with the same body.pincode to bigbasket-product. The product object carries price, mrp, discount_percent and discount_text, and unit_price gives the price per unit. A search row carries the same figures, so one bigbasket-search call lists them for several products at once.
Yes. The catalogue, the prices and the stock depend on body.pincode, and the same search at Bangalore 560004 and at Mumbai 400020 gives different totals and prices. Send the PIN code of the area you care about in every search and product call, and read in_stock and availability_code of a row for the stock state at that PIN code.
Take the slug from the brand_slug of any search row, for example aashirvaad, and send it exactly as returned in body.brand together with body.pincode. brand_slug is also accepted as an alternative name for body.brand. Without body.query and body.category the call opens the page of that brand, and body.page moves through its pages.
Add body.price_band, body.discount_band or body.min_rating to a search, alone or together, and each filter narrows the same set of rows. Price bands are under_20, 21_50, 51_100, 101_200, 201_500 and over_500, and they describe the selling price in rupees. Discount bands are upto_5, 5_10, 10_15, 15_25 and over_25, and they describe the discount off the MRP in percent. body.min_rating takes 3, 4 or 5 as the minimum star rating.
The id is the segment after /pd/ in the address of a product page. body.product_id also accepts the whole address, so it can be pasted in as it is, and id, sku, url and product_url are accepted as alternative names. In a search, the product_id of each row carries the same value.