开发文档
Blinkit API 技术参考
Blinkit API 参考文档:位置输入及其替代名称、商品标识、搜索分页,以及搜索结果行、商品详情和门店覆盖的返回字段。
另见: Blinkit 商品与配送数据接口概览与价格 · Blinkit API 指南:搜索、比价与跟踪价格
本页内容
Blinkit API 的位置输入与替代名称
blinkit-product、blinkit-search 与 blinkit-store 每次都读取一个地点,即 body.pincode,或 body.lat 加 body.lon。PIN 码会被解析为一个地点,只有该地点的邮政编码与它相同时才被接受,回复中的 location 会回显它。
下列替代名称会被接受:
pin、pin_code、postal_code与zip对应body.pincodelng对应body.lon
body.lat 与 body.lon 是配送点以 WGS84 表示的纬度和经度,这一对坐标可代替 PIN 码。
本节涉及的字段(6)
blinkit-product, blinkit-search, blinkit-store, body.pincode, body.lat, body.lon
Blinkit 商品详情:商业字段与商品标识
body.product_id 接受搜索结果行原样返回的 product_id,也接受商品页面的地址,其中 ID 位于 prid 之后。id、prid、url 与 product_url 被接受为替代名称。
product 内的商业字段如下:
price是销售价,mrp是 MRP,discount_percent是折扣,price_text是价格的文字写法,additional_charges表示附加费用,currency表示货币inventory是库存数量,in_stock显示该商品是否有货available_at_store显示该前置仓是否销售这件商品merchant_id与merchant_type描述服务该地点的门店,eta_minutes是以分钟计的送达预计时间product_state给出商品的状态
本节涉及的字段(2)
blinkit-product, body.product_id
Blinkit 商品详情:变体、属性与分类
在 product 内,variants 列出其他规格。每个条目给出自己的 product_id 与 pack_size,带有 price_text 和 price,并通过 selected 显示它是否为所选条目。attributes 把 name 与 value 配成一对,shown_to_customer 说明这一对是否展示给购物者。
category_ids 在 l0、l1 与 l2 下给出分类标识,breadcrumb 是商品的分类路径,images 列出它的图片。
name、brand、pack_size 与 description 描述商品本身。manufacturer、shelf_life、country_of_origin 与 fssai_license 给出生产商、保质期、原产国与 FSSAI 信息。
本节涉及的字段(1)
blinkit-product
Blinkit 搜索结果行:取值与分页
body.query 接受在 Blinkit 搜索框中输入的文字,q、keyword 与 search 被接受为替代名称。超出支持范围的 body.page 会被该操作拒绝,每页约 12 行。
results 内的文字写法与链接如下:
price_text、mrp_text与discount_text分别是价格、MRP 与折扣的文字写法product_id是要用作body.product_id的值,rank是该条目在列表中的排名
similar_result 标出在直接匹配用完之后追加的条目,search_method 为 basic 或 similarity。
本节涉及的字段(3)
blinkit-search, body.query, body.page
Blinkit 门店覆盖字段
blinkit-store 不返回商品数据。serviceable 显示 Blinkit 是否配送到该地点,eta_minutes 是以分钟计的送达承诺,eta_title 是与该承诺一起显示的标题。location 含有该地点的 address、locality、city、state 与 postal_code。
stores 的每个条目是一个前置仓:merchant_id 标识它,services 把服务名称映射到该服务所需的分钟数,名称例如 express、longtail、large order 与 pharmacy。由于每个条目都有自己的 services,分钟数要按前置仓和服务分别读取。
本节涉及的字段(1)
blinkit-store
操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
商品详情
POST /api/v1/blinkit/blinkit-product
读取单个配送地点上某个商品的价格、MRP、库存、各规格与商品属性。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.product_id | string | 必填 | — | — |
body.lat | number | 可选 | — | — |
body.lon | number | 可选 | — | — |
body.pincode | string | 可选 | — | — |
请求示例
# 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/blinkit/blinkit-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"400020","product_id":"68482"}}'商品搜索
POST /api/v1/blinkit/blinkit-search
按单个配送地点搜索商品,每行带有价格、MRP、折扣、库存、评分和送达分钟数。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.query | string | 必填 | — | — | — |
body.lat | number | 可选 | — | — | — |
body.lon | number | 可选 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–5 |
body.pincode | string | 可选 | — | — | — |
请求示例
# 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/blinkit/blinkit-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"400020","query":"atta"}}'响应字段
querylocationpincodelatlonaddresslocalitycitystatepostal_code
serviceableeta_minutestotalexact_match_countsearch_methodpagehas_nextreturnedrepeated_from_earlier_pagesnon_product_tiles_skippedresults[]product_idnamebrandpack_sizepricemrpdiscount_percentdiscount_textprice_textmrp_textprice_text_matchescurrencyinventoryin_stockproduct_statemerchant_idmerchant_typeeta_identifiereta_minutesgroup_idratingaveragecountcount_text
sponsoredsimilar_resultrepeated_from_earlier_pageimageimage_counturlvariants[]product_idpack_sizepricemrpdiscount_percentinventoryin_stock
rank
配送覆盖
POST /api/v1/blinkit/blinkit-store
查询某个地点是否在配送范围内,并读取送达分钟数及其对应的前置仓。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.lat | number | 可选 | — | — |
body.lon | number | 可选 | — | — |
body.pincode | string | 可选 | — | — |
请求示例
# 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/blinkit/blinkit-store' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"pincode":"110001"}}'调用方式
- 使用
POST /api/v1/blinkit/<action>,并携带x-api-key、Content-Type: application/json和必需的Idempotency-Key。 - 调用成功时返回
ok: true:data是操作的结果,meta.requestId标识已记录的请求,meta.chargedCreditUnits是实际扣费金额。否则ok为false,error.code说明原因;请读取ok和error.code,不要只依赖 HTTP 状态码。每个网关响应都带有供支持使用的请求 ID:meta.requestId;没有meta的响应(如受理前被拒绝)则为顶层requestId。 - 只有调用成功才按标价扣费。失败不扣费;结果无法确认时,最多 900 秒后释放,不扣费。
- 请求完成后,以同一个 Idempotency-Key 重复发送相同请求,24 小时内返回已保存的响应,不会再次扣费。
网关调用参考: