Documentation
BigBasket API technical reference
Reference for the BigBasket API: PIN code inputs, category slugs, search inputs and what the category, delivery, product and search calls return.
See also: BigBasket API overview and prices · BigBasket API guide: search products and compare packs
On this page
BigBasket API category tree entries
bigbasket-categories takes no input. In categories, a top-level entry is a broad group, its children hold the sub-categories and the leaf categories sit below them. name is the label of the entry, url is its page address, id is its identifier, and count comes with the list.
slug is the part to carry forward: it is the value for body.category in bigbasket-search, and category_slug is accepted as an alternative name for that input. The tree shows which slugs exist before a search uses one.
Fields in this section (2)
bigbasket-categories, body.category
PIN code delivery fields
body.pincode is a 6-digit Indian PIN code. pin, pin_code, postal_code and zip are accepted as alternative names for it, and the resolved code comes back as pincode. The fields of the answer fall into three groups:
- Place:
place,area,cityandstatename the place the PIN code resolves to, andlatandlnggive its coordinates - Serviceability:
serviceableshows whether BigBasket delivers to the PIN code,servicesmaps each service name to its state, with bb-b2c for slot delivery and bbnow for quick delivery, andlocationholdscity_id - Delivery: each entry of
storeshas astore_id, itsserviceslist, anetaand aneta_messagesuch as Get it in 10 mins, and each entry ofnext_slotshas astore_id, amessage,eta_minutes,slot_timeandslots_full
stores and next_slots describe the delivery to a located PIN code.
Fields in this section (2)
bigbasket-pincode, body.pincode
Product detail inputs and fields
body.product_id takes the product_id exactly as a search row returns it. The address of the product page is accepted in its place, with the id in the segment after /pd/, and id, sku, url and product_url are accepted as alternative names. pin, pin_code, postal_code and zip are accepted as alternative names for body.pincode, which comes back as pincode.
Inside product, discount_text is the discount written as text and unit_price is the price per unit. breadcrumb lists the category trail, images the product images and tags the tags of the product. sections keeps the sections of the product page, and other_info holds details such as the manufacturer and the best-before information.
packs repeats the pack fields for each pack size of the product, so a pack has its own url, price, mrp and unit_price, and is_best_value marks the best-value pack.
Fields in this section (3)
bigbasket-product, body.product_id, body.pincode
Search inputs and their effects
body.pincode, a 6-digit Indian PIN code, selects the catalogue, prices and stock that a search reads, so the same term at two PIN codes gives different totals and prices. pin, pin_code, postal_code and zip are accepted as alternative names for it.
A search needs one of body.query, body.category or body.brand, and body.category is not combined with body.query:
body.queryis the text typed into the BigBasket search box, andq,keywordandsearchare accepted as alternative namesbody.categoryis a category slug, taken from the category tree or from the slugs in thecategoryof a row, andcategory_slugis accepted as an alternative namebody.brandis a brand slug as rows return it inbrand_slug, andbrand_slugis accepted as an alternative name; alone it lists the page of the brand, and next tobody.queryorbody.categoryit filters
The filters narrow the same result set: body.price_band by selling price in rupees, body.discount_band by the discount off the MRP and body.min_rating by minimum star rating. sort_by and order are accepted as alternative names for body.sort. body.page starts at 1, and a page holds 40 rows for a keyword search and 48 rows for a category or brand page.
Fields in this section (10)
bigbasket-search, body.pincode, body.query, body.category, body.brand, body.price_band, body.discount_band, body.min_rating, body.sort, body.page
Search result fields
The top level of data summarises the search. total shows the count that BigBasket reports and returned shows how many rows the page holds. page, last_page and has_next place the page, and query, category and brand repeat what was searched.
substituted_results shows that nothing matched and the page holds suggestions, and substituted_for says what they stand in for. rows_outside_price_filter counts the rows whose shown pack lies outside body.price_band.
A row of results has these groups of fields:
- Identity:
product_idis the value the product call takes,name,brandandbrand_slugname the product and its brand,urlandimagepoint to its page and picture, andimage_countcounts the pictures - Pack:
pack_sizeandpack_descriptiondescribe the pack the row shows, andother_packslists the other pack sizes with their own price and stock fields - Price:
price,mrp,discount_percent,discount_text,currency,unit_priceandoffer_textcarry the figures, andoffer_typenames the kind of offer - Stock:
in_stockandavailability_codegive the stock state,not_for_saleshows that a product is not for sale, andetais the delivery estimate - Other fields:
rankis the position of the row,store_idnames the store,ratingholdsaverage,ratingsandreviews, andeanholds a GTIN only when its check digit is valid
Fields in this section (1)
bigbasket-search
Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
Category tree
POST /api/v1/bigbasket/bigbasket-categories
List the category tree with names, slugs, ids, page addresses and nested child categories.
Input fields
This operation takes no input fields. Send the JSON request body shown below.
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bigbasket/bigbasket-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'PIN code delivery
POST /api/v1/bigbasket/bigbasket-pincode
Check how BigBasket serves one PIN code: its place, services, stores and next delivery slots.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.pincode | string | Required | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bigbasket/bigbasket-pincode' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"560001"}}'Product detail
POST /api/v1/bigbasket/bigbasket-product
Read one product at one PIN code with its price, stock, nutrition details and pack sizes.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.pincode | string | Required | — | — |
body.product_id | string | Required | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bigbasket/bigbasket-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"400020","product_id":"30006887"}}'Response fields
pincodelocationserviceableproductproduct_idnamebrandpack_sizeurleanean_code_rawean_on_pagepricemrpdiscount_percentdiscount_textunit_priceunit_price_consistentoffer_textin_stockavailability_codecategoryratingfood_typebreadcrumb[]images[]descriptioningredientsnutritionstorageother_infosectionstags[]
packs[]product_idpack_sizeurlpricemrpdiscount_percentdiscount_textunit_pricein_stockavailability_codeis_best_value
Product search
POST /api/v1/bigbasket/bigbasket-search
Search the products of one PIN code by keyword, category or brand with price, rating and sort filters.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.pincode | string | Required | — | — | — |
body.brand | string | Optional | — | — | — |
body.category | string | Optional | — | — | — |
body.discount_band | string | Optional | — | "upto_5""5_10""10_15""15_25""over_25" | — |
body.min_rating | string | Optional | — | "3""4""5" | — |
body.page | integer | Optional | 1 | — | 1–9007199254740991 |
body.price_band | string | Optional | — | "under_20""21_50""51_100""101_200""201_500""over_500" | — |
body.query | string | Optional | — | — | — |
body.sort | string | Optional | "relevance" | "relevance""price_asc""price_desc""saving_desc""saving_asc""discount_desc" | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bigbasket/bigbasket-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"400020","query":"atta"}}'Response fields
pincodelocationcity_id
serviceablequerycategorybrandtotalpagelast_pagehas_nextreturnedsubstituted_resultssubstituted_forrows_outside_price_filterresults[]product_idnamebrandbrand_slugpack_sizepack_descriptionurlimageimage_counteanean_code_rawpricemrpdiscount_percentdiscount_textcurrencyunit_priceamountper
unit_price_consistentoffer_textoffer_typein_stockavailability_codenot_for_salebuttonetais_best_valuecategorytoptop_slugmidmid_slugleafleaf_id
ratingaverageratingsreviews
food_typeother_packs[]product_idpack_sizeurlpricemrpdiscount_percentdiscount_textunit_priceunit_price_consistentin_stockavailability_codeis_best_value
store_idrank
How calls work
POST /api/v1/bigbasket/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: