开发文档
11st API 参考:4 个操作
11st API 参考文档:4 个操作中每个输入的作用、搜索分页与排行视图的规则,以及返回字段的含义。
另见: 11st 韩国购物平台 API 概览与价格 · 11st API 指南:搜索、商品、排行与评价
本页内容
11st API 请求体规则
每个操作读取 body 中的 JSON 对象。以下替代名称同样可以使用:
id、prdNo和url可以代替body.product_idq、keyword和kwd可以代替body.queryprice_min和price_max可以分别代替body.min_price和body.max_price
商品编号是各操作之间共用的键:body.product_id 接受与搜索结果行或排行行中 product_id 完全相同的数字,也接受 11st 商品页面的地址,因此复制的链接同样有效。
body.query 中的搜索关键词会做 NFKC 规范化,在匹配前把全角字符和兼容字符转换为标准形式。
本节涉及的字段(3)
body, body.product_id, body.query
商品详情:post-11st-product
post-11st-product 针对 body.product_id 中给出的商品编号或页面地址,返回一个对象 product。其字段分为以下几组:
| 分组 | 字段 |
|---|---|
| 标识 | product_id, title, url, images, brand, brand_id, category_path, category, catalog_id, market_type |
| 商品状态 | sell_status、sold_out 和总库存 stock_qty |
| 基本价格 | sell_price, market_price, final_price, discount_percent |
| 立减折扣 | 卖家给出的 instant_discount_seller、11st 给出的 instant_discount_11st |
| 优惠券(商品页显示优惠券时) | coupon_price, coupon_discount |
| 最大优惠 | max_benefit_price、max_benefit_discount_percent 以及逐项列出的 price_breakdown |
| 其他价格信息 | multi_buy_discount、card_discount_text 中的银行卡优惠文字、lowest_price_label 以及这些金额所用的 currency |
| 买家反馈 | rating, satisfied_pct, review_count, qna_count, like_count |
| 促销附加信息 | category_best, promo_line, max_reward_points |
options 是选择层级的列表;每一级有 level、name 和自己的 options 行。每个选项行包含:
- 标识:
name和option_id - 可购状态:
sell_status、sold_out和stock_qty - 价格:
add_price、sell_price、final_price和discount_percent - 另外两个字段:
selected和notice
嵌套的 seller 块包含卖家 id、店铺、满意度百分比、回复率、销售等级和店铺点赞数,嵌套的 delivery 块包含快递公司、运费、承诺送达时间、下单截止时间以及济州岛和其他岛屿的附加费。
本节涉及的字段(2)
post-11st-product, body.product_id
Best 500 排行:post-11st-ranking
post-11st-ranking 每次读取 11st Best 500 销量榜的一个视图,返回该视图排名最前的 40 个名次,由各输入决定是哪个视图。body.group 从 15 个榜单中选择一个:0 为整体榜,从 1 开始的其余取值依次为生鲜食品、加工食品、电子券与礼品卡、品牌时尚、生活用品、服装、时尚杂货、美妆、母婴儿童、家具、休闲与汽车、数码与家电、图书旅行与爱好,以及海外直购。body.category 把视图缩小到该类目组内的某个子类目,例如类目组 8 中护肤为 1001324,因此需要与对应的类目组一起发送;可用的 id 会在 subcategories 中返回,每项带有 category 和 name。
body.gender 在整体视图与男性或女性视图之间切换。results 中每行包含:
- 名次:
rank - 商品:
product_id、title、url和image - 划线价
strike_price、price、discount_percent和currency free_shipping和flags列表- 卖家:
seller_name、seller_id和seller_url - 点赞数:
like_count
结果行之外,data 还以 group、category 和 gender 重复所查看的视图,group_name 和 category_name 给出其可读名称。
本节涉及的字段(4)
post-11st-ranking, body.group, body.category, body.gender
买家评价:post-11st-reviews
在 post-11st-reviews 中,body.page 用于翻页,每页 10 条评价,has_more 显示后面是否还有一页,page 回显所返回的页码。body.sort 为 recommended 时沿用 11st 推荐的顺序,为 newest 时最新评价排在最前。body.rating 把结果限定在一个区间:positive 为 4 或 5 星的评价,negative 为更低评分的评价。
把 body.media_only 设为 true 时,只返回带图片或视频的评价。results 中每条评价包含:
- 标识
review_id和product_id - 1 到 5 的
rating、text和date author昵称和买家购买的option- 有用数
helpful_count evaluations中以name与value成对给出的评价者属性回答- 附带的
images和has_video
结果行之外,total 是评价数量,positive_count 和 negative_count 把它分到两个区间。
本节涉及的字段(6)
post-11st-reviews, body.product_id, body.page, body.sort, body.rating, body.media_only
关键词搜索:post-11st-search
post-11st-search 把 body.query 的自然匹配结果放在 results 中,赞助结果则单独放在 ads 中;广告行的字段与自然结果行相同,另加 ad_slot。搜索最多有 24 页结果,每页约 84 条自然结果,第 24 页之后的页面与第 24 页重复,因此 body.page 止于 24;last_page 和 has_more 显示某个查询的结果列表在哪里结束。body.sort 的 7 种排序如下:
ranking综合广告、销量和相关度popular综合销量和相关度price_asc和price_desc按价格排序sales按累计销量排序reviews按评价数量排序newest按上架时间排序
body.min_price 和 body.max_price 是以韩元计的金额,与折扣价比较,因此会出现返回的 final_price 略超区间的情况。body.product_type 只保留 used 二手商品或 global_direct 海外直购商品,或用 exclude_global_direct 排除海外直购,body.category 接受以下一级类目之一:
- 100001316:时尚服装
- 100002055:时尚杂货
- 100005475:化妆品与美容
- 100004750:数码与家电
- 100005941:家具与家居
- 100005808:孕产与育儿
- 100006456:食品
- 100003066:运动与休闲
- 100002032:生活与健康
- 100015973:休闲与生活服务
- 100015974:图书
body.free_shipping 只保留包邮商品,body.official_store 只保留品牌官方和百货商场卖家。每条自然结果行包含以下字段:
| 字段 | 描述内容 |
|---|---|
product_id, title, url, image, brand | 商品标识 |
sell_price, final_price, discount_percent, instant_discount, currency | 价格:sell_price 为折扣前的价格,final_price 为显示的折扣价 |
price_from | 各选项价格不同时为 true |
seller_name, seller_id, store_id, store_url, seller_badge | 卖家 |
shipping_fee, free_shipping, shipping_text, today_dispatch, dispatch_cutoff_hour, delivery_badge, delivery_types | 配送 |
rating, rating_scale, review_count, sales_count, sales_badge, sales_badge_min | 购买热度,其中 rating 取值 0 到 5 |
is_11st_lowest_price, is_30day_lowest_price, is_deal, is_official | 徽标标记 |
point_reward, free_return, labels, sold_out, remaining_qty, category_id, adult | 其余行字段 |
结果行之外,total 统计该查询的匹配数量,page 给出所返回的页码。
本节涉及的字段(10)
post-11st-search, body.query, body.page, body.sort, body.min_price, body.max_price, body.free_shipping, body.official_store, body.product_type, body.category
{
"body": {
"query": "운동화",
"page": 2,
"sort": "sales",
"min_price": 30000,
"max_price": 50000,
"free_shipping": true
}
}{
"body": {
"product_id": "9165481054",
"sort": "newest",
"rating": "negative",
"media_only": true
}
}操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
商品详情
POST /api/v1/elevenst/post-11st-product
针对一个 11st 商品编号或商品链接,返回价格与折扣、各选项库存、买家计数、卖家信息和配送条件。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.product_id | 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/elevenst/post-11st-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"9165481054"}}'Best 500 销量排行
POST /api/v1/elevenst/post-11st-ranking
返回 11st Best 500 销量排行中排名最前的 40 个名次,可看整体,也可按类目组、子类目和购物者性别查看。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.category | string | 可选 | — | — | — |
body.gender | string | 可选 | "all" | "all""men""women" | — |
body.group | string | 可选 | "0" | 15 个值"0""1""2""3""4""5""6""7""8""9""10""11""12""13""14" | — |
请求示例
# 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/elevenst/post-11st-ranking' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"group":"0"}}'买家评价
POST /api/v1/elevenst/post-11st-reviews
返回某个 11st 商品的一页买家评价(每页 10 条),可按推荐或最新排序,并可按评分区间和图片视频筛选。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.product_id | string | 必填 | — | — | — |
body.media_only | boolean | 可选 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–500 |
body.rating | string | 可选 | — | "positive""negative" | — |
body.sort | string | 可选 | "recommended" | "recommended""newest" | — |
请求示例
# 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/elevenst/post-11st-reviews' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"9165481054"}}'关键词搜索
POST /api/v1/elevenst/post-11st-search
用韩文或拉丁字母关键词搜索 11st 商品,提供 7 种排序和多项筛选,自然结果与赞助结果分开返回。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.query | string | 必填 | — | — | — |
body.category | string | 可选 | — | 11 个值"100001316""100002032""100002055""100003066""100004750""100005475""100005808""100005941""100006456""100015973""100015974" | — |
body.free_shipping | boolean | 可选 | — | — | — |
body.max_price | integer | 可选 | — | — | 0–9007199254740991 |
body.min_price | integer | 可选 | — | — | 0–9007199254740991 |
body.official_store | boolean | 可选 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–24 |
body.product_type | string | 可选 | — | "used""global_direct""exclude_global_direct" | — |
body.sort | string | 可选 | "ranking" | "ranking""popular""price_asc""price_desc""sales""reviews""newest" | — |
请求示例
# 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/elevenst/post-11st-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"운동화"}}'调用方式
- 使用
POST /api/v1/elevenst/<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 小时内返回已保存的响应,不会再次扣费。
网关调用参考: