开发文档
1stDibs API 参考
1stDibs API 参考:端点与 action id、各输入的边界和默认值,以及搜索、筛选项、详情和经销商操作返回的字段。
另见: 1stDibs 古董与设计品市场 API 概览与价格 · 1stDibs API 指南:slug、批量详情与经销商店铺
本页内容
调用 1stDibs API
字段名的其他写法也会被接受,例如:
q代替body.querylimit代替body.max_resultscolour代替body.coloritem_id代替body.itemdealer代替body.seller
由操作本身判断某个 slug 或 id 是否对应 1stDibs 上的内容。
本节涉及的字段(5)
body, post-1stdibs-search, post-1stdibs-filters, post-1stdibs-detail, post-1stdibs-seller
post-1stdibs-search:范围与 slug 筛选
请提供 body.query 或 body.category 之一;该 action 需要其中之一来确定范围。body.query 是与 1stDibs 搜索框相同形式的自由文本,例如 eames lounge chair。body.category 是从 1stDibs 链接中复制的、由斜杠分隔的一到四层小写路径,例如 furniture/seating/lounge-chairs。
body.vertical 是顶级类目的简写,只要提供了 body.category 就会被忽略。随后由 slug 筛选缩小范围:
body.style:例如art-decobody.period:20th-century、18th-century-and-earlier、19th-century 或 21st-century-and-contemporary,或 1920s 到 1990s 的十年 slugbody.material:例如mahogany、brass、oil-paint、canvas 或 18k-gold;对艺术品而言该维度标注为 Mediumbody.origin:作品的制造地,例如austrianbody.creator:例如nestor-torobody.location:经销商的发货地,例如france-europebody.color:例如blue,由 1stDibs 根据照片判定
可用的 slug 因类目而异,类目不认识的值会使请求失败,而不会被丢弃。
本节涉及的字段(11)
post-1stdibs-search, body.query, body.category, body.vertical, body.style, body.period, body.material, body.origin, body.creator, body.location, body.color
post-1stdibs-search:价格区间、促销、排序与分页
body.price_min 和 body.price_max 以美元计;同时提供两者构成区间,只提供一个则是单侧边界。body.on_sale 为 true 时只返回经销商已降价的商品。body.sort 取以下排序:
recommended:1stDibs 的默认排序newest:最近上架的在前price-high和price-low:两种价格排序都按美元标价排列popular:浏览最多的在前
结果最多提供到偏移量 6000,因此最后可达页为 6000 除以 body.max_results 再加 1,即 last_reachable_page 报告的页码;更靠后的页会返回 page_exists 为 false 且没有结果行,要获取更深的库存需要缩小查询范围。
本节涉及的字段(7)
post-1stdibs-search, body.price_min, body.price_max, body.on_sale, body.sort, body.max_results, body.page
post-1stdibs-search:响应字段
在 data 中,applied_filters 回显搜索实际应用的筛选条件,results 包含商品结果行。每行含以下字段:
- 商品与类目:
item_id、url、title、vertical、category_code、category_path和category_url - 价格:
price、currency、price_status、price_is_upon_request、price_type、discount_percent、price_quantity_note和converted_prices - 商品状态:
is_sold、is_available、is_on_hold、is_new_listing、is_multi_sku和creation_date - 作品本身:
period、style、place_of_origin和creators - 经销商与发货:
seller信息块、ships_from_country和ships_from_city - 尺寸与图片:
dimensions_in和images
在这些行的 seller 中,seller_id 和 name 有值,而 order_count 与 is_distinguished 为空,由详情和店铺 action 提供。价格未公开的行 price 为 null,price_status 为 "upon_request"(并设置 price_is_upon_request),而不是零。
本节涉及的字段(2)
post-1stdibs-search, data
post-1stdibs-filters:筛选维度与子类目
post-1stdibs-filters 接受搜索中除颜色外的范围与 slug 输入,取值相同,范围规则也相同:由 body.query 或 body.category 之一确定范围,给出类目时 body.vertical 会被忽略。categories 对象列出所请求层级的子类目及其数量,逐层浏览类目树就靠它。在 filters 中,每个筛选维度及其选项含以下字段:
- 筛选维度:
name、label、value_count和values values中的每个选项:value、label、count、linkable、currency和hex_code
当某个筛选维度存在对应的搜索输入时,其 name 与该输入名完全相同,因此可以把 value 直接复制到对应的搜索字段。筛选维度的集合取决于类目:艺术品增加 Orientation、Size、Art Subject 和 Frame Included,家具增加 Number in Set 和 Dimensions。
本节涉及的字段(4)
post-1stdibs-filters, body.query, body.category, body.vertical
post-1stdibs-detail:完整商品记录
body.item 接受 1stDibs 显示的商品 id,例如家具 f_52078502、艺术品 a_18430382、珠宝 j_30657952 或腕表 v_29932282。它也接受 1stdibs.com 商品链接,并从链接的 /id- 段中读取 id。
用逗号分隔的多达 10 个 id 会在一次调用中获取。items 中的每个元素是在搜索行基础上扩展的记录,增加以下字段:
- 描述与品相:
description、condition和condition_notes - 分类:
materials、styles、periods和origins - 制造与标识:
date_of_manufacture、set_size、reference_numbers、attributes和sku - 展示:
dimensions_display、seller_location、breadcrumbs和details - 运费:
shipping,即经销商按目的地区给出的运费报价 - 浏览:
listing_views_6m,即六个月内的浏览次数 - 价格差异:
price_mismatch,报告标价与schema_org_offer中 schema.org 报价之间的不一致
本节涉及的字段(2)
post-1stdibs-detail, body.item
post-1stdibs-seller:经销商店铺
body.seller 接受 1stdibs.com/dealers/ 链接中的店铺 slug,例如 morentz,或完整的店铺链接。分页深度同样受偏移量 6000 的窗口限制。results 中的行与搜索结果行逐字段一致,搜索行中为空的订单数和认可经销商标记,可以在店铺的 seller 信息块中读取。
本节涉及的字段(2)
post-1stdibs-seller, body.seller
{
"body": {
"item": "f_52078502,a_18430382"
}
}
{
"body": {
"category": "furniture/seating/lounge-chairs"
}
}
{
"body": {
"seller": "morentz",
"sort": "newest",
"max_results": 10
}
}
操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
商品详情
POST /api/v1/firstdibs/post-1stdibs-detail
返回一件或多件商品的完整记录,以商品 id 或 1stDibs 商品链接指定。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.item | 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/firstdibs/post-1stdibs-detail' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"item":"f_52078502"}}'响应字段
requestedfoundmissing[]items[]
筛选项与类目
POST /api/v1/firstdibs/post-1stdibs-filters
返回某个关键词或类目范围下的筛选维度与子类目。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.category | string | 可选 | — | — |
body.creator | string | 可选 | — | — |
body.location | string | 可选 | — | — |
body.material | string | 可选 | — | — |
body.origin | string | 可选 | — | — |
body.period | string | 可选 | — | — |
body.query | string | 可选 | — | — |
body.style | string | 可选 | — | — |
body.vertical | string | 可选 | "furniture""art""jewelry""fashion" | — |
请求示例
# 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/firstdibs/post-1stdibs-filters' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category":"furniture/seating/lounge-chairs"}}'响应字段
querycategorytotal_availablefilter_countcategoriesfilters[]
商品搜索
POST /api/v1/firstdibs/post-1stdibs-search
按关键词或类目路径返回分页商品行,可用可选筛选条件缩小范围。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.category | string | 可选 | — | — | — |
body.color | string | 可选 | — | — | — |
body.creator | string | 可选 | — | — | — |
body.location | string | 可选 | — | — | — |
body.material | string | 可选 | — | — | — |
body.max_results | integer | 可选 | 50 | — | 1–200 |
body.on_sale | boolean | 可选 | false | — | — |
body.origin | string | 可选 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–6001 |
body.period | string | 可选 | — | — | — |
body.price_max | number | 可选 | — | — | ≥ 0 |
body.price_min | number | 可选 | — | — | ≥ 0 |
body.query | string | 可选 | — | — | — |
body.sort | string | 可选 | "recommended" | "recommended""newest""price-high""price-low""popular" | — |
body.style | string | 可选 | — | — | — |
body.vertical | string | 可选 | — | "furniture""art""jewelry""fashion" | — |
请求示例
# 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/firstdibs/post-1stdibs-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category":"furniture/seating/lounge-chairs","max_results":10}}'响应字段
querycategorytotal_availablepagepage_sizepage_existslast_reachable_pagehas_moresortpage_kindapplied_filters[]page_titleresults[]
经销商店铺
POST /api/v1/firstdibs/post-1stdibs-seller
返回单个经销商的资料数据,以及该经销商商品的分页列表,行结构与商品搜索相同。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.seller | string | 必填 | — | — | — |
body.max_results | integer | 可选 | 50 | — | 1–200 |
body.page | integer | 可选 | 1 | — | 1–6001 |
body.sort | string | 可选 | "recommended" | "recommended""newest""price-high""price-low""popular" | — |
请求示例
# 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/firstdibs/post-1stdibs-seller' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"max_results":10,"seller":"morentz"}}'响应字段
seller_slugsellerseller_idnameorder_countis_distinguishedships_from_country
total_availablehas_live_inventorypagepage_sizepage_existshas_moreresults[]
调用方式
- 使用
POST /api/v1/firstdibs/<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 小时内返回已保存的响应,不会再次扣费。
网关调用参考: