开发文档
billiger.de API 技术参考
billiger.de API 参考:六类调用如何处理标识、筛选与分页,以及返回的结果行、报价、历史与商品字段的含义。
另见: billiger.de 比价数据接口概览与价格 · billiger.de API 指南:从搜索到价格历史
本页内容
billiger.de API 搜索:查询词、结果行与筛选项
body.query 接受自由搜索词或 EAN,q、keyword 与 searchstring 可作为别名使用。筛选输入取自此前某次调用 facets 里的标识:
body.brand_id取facets.brand条目的id,也接受brand代替body.category_filter按facets.category条目的id把搜索限定在一个分类内,别名是category_facetbody.shop_id按facets.shop条目的id只保留某家店铺出售的商品,别名是shop
在 results 中,product 行是目录商品,baseproduct 行是含多个款式的商品系列,offer 行是单条店铺报价。只有报价行带有 shop、seller 与 shipping_cost。price_is_from 表示 price 是否为起步价。
total 是 billiger.de 自己对 body.row_types 所选视图给出的计数,三种视图各有自己的总数。shop_count 统计店铺,facets 还列出 availability、paymentmethod 与 price_range 条目。
billiger.de 会把部分查询转成分类页。redirected_to 标出这种情形,category_path 说明该页在分类树中的位置,结果行只有目录商品,body.row_types 不起作用。
分页用 body.page 指定页码,用 body.page_size 指定行数,行数分三种规格:48、72 与 96 行。页码超出最后一页时没有结果行,并会设置 page_beyond_last;has_more 表明后面是否还有一页。
本节涉及的字段(8)
billiger-search, body.query, body.brand_id, body.category_filter, body.shop_id, body.row_types, body.page, body.page_size
分类列表:标识、着陆页与筛选项
billiger-category 列出数字标识放在 body.category_id 中的那个分类,category 与 k 可作为别名,3551 是 Kaffeevollautomaten。该标识是 billiger-product 结果中 category_path 里的 category_id、搜索结果 facets.category 条目的 id,或 billiger.de 分类页地址中的数字。
结果行与搜索相同,筛选的作用方式也相同:body.brand_id 取品牌标识,例如 2451932 对应 De'Longhi,body.shop_id 只保留该店铺出售的商品。size 可作为 body.page_size 的别名,available_only 可作为 body.in_stock_only 的别名。
回复在 category 中给出所列分类的 category_id、name 与 url,category_path 保留它在分类树中的位置。顶层分类(例如 100165,Kaffeegeräte)是不带 total 的着陆页,需要行数时应使用下级分类的标识。
本节涉及的字段(6)
billiger-category, body.category_id, body.brand_id, body.shop_id, body.page_size, body.in_stock_only
店铺报价:单个商品或商品系列
两个标识二选一:body.product_id 选定单个商品,body.baseproduct_id 选定商品系列;系列把颜色、容量等款式归在一起,所以系列的报价由它的各个款式合并而来。id 与 p 可作为 body.product_id 的别名,family_id 可作为 body.baseproduct_id 的别名。
offers 每家店铺一行,position 是该行在列表中的位置。condition 取 new、used、refurbished 或 b_stock,condition_text 用文字给出状况。
total_price_source 为 printed 表示总价来自报价页面,为 price_plus_shipping 表示由价格加运费算出。voucher_code 与 voucher_terms 出现在价格需要优惠券的地方。
每行的 shop 块包含以下部分:
rating与rating_count:店铺的星级评分及其背后的评分数量marketplace与trusted_shops:店铺的交易市场与 Trusted Shops 条目id、name与url:店铺及其页面
seller 是交易市场上的卖家,more_offers_from_shop 说明同一店铺还有多少条其他报价。cheapest_price 与 cheapest_total_price 分别给出最低商品价格和最低总价。
body.max_offers 决定返回多少行店铺报价。
本节涉及的字段(6)
billiger-offers, body.product_id, body.baseproduct_id, body.sort, body.condition, body.max_offers
没有商品页的单条报价
billiger-offer 读取 billiger.de 在没有商品页的情况下列出的报价,也就是搜索和分类结果中 row_type 为 offer 的那类行。body.offer_id 取这种行的 offer_id,或 billiger.de 报价页地址中的数字,id 可作为别名。
offer 对象包含以下部分:
title、url、image与condition:报价本身及其状况price、price_without_voucher、voucher_code与original_price:价格以及背后的优惠券或划线原价shipping_cost、total_price、delivery_time与free_return_days:运费、总价、配送时间与免费退货天数shop与seller:带评分的店铺和交易市场卖家
category_path 说明该报价在分类树中的位置,价格字段的含义与 billiger-offers 相同。
本节涉及的字段(2)
billiger-offer, body.offer_id
价格历史:窗口、可疑低点与店铺线
body.time_range 设定窗口:1m、3m 与 6m 分别回溯最近一个月、三个月与六个月,all 则追溯到 billiger.de 保存历史的起点,并且只有它会增加 shop_lines,即 billiger.de 为大型市场(如 eBay、Kaufland、Otto)画出的分市场每日线。每次调用都需要用 body.product_id 指定要读取历史的商品。range 可作为 body.time_range 的别名,id 与 p 可作为 body.product_id 的别名。
points 记录商品在每个 date 的最低价。某一天远低于价格带的骤降会照原样保留并带有 suspect_low;suspect_point_count 统计这类点,lowest_in_range_excluding_suspect 是去掉它们之后的最低价。first_date、last_date 与 count 描述序列本身,product 中的 price_now 是当前价格。
lowest_in_range 带有最低点的 date 与 price,highest_in_range 与 median_in_range 补全区间汇总。price_assessment 的条目给出 billiger.de 对当前价格在每个 days 天周期内的评判,例如“Aktuell hoher Preis”,并附有 typical_low 与 typical_high 构成的价格带及其比较所用的 current_price。identity 中的 last_point_equals_price_now 表示最后一个点是否等于 price_now。
本节涉及的字段(3)
billiger-price-history, body.product_id, body.time_range
商品资料:评分、规格、报告与款式
两个标识二选一:body.product_id 读取单个商品,别名为 id 与 p;body.baseproduct_id 读取商品系列,别名为 family_id。两个标识都来自搜索或分类结果的行,或来自 billiger.de 商品页或系列页地址中的数字。
对于系列,各个款式出现在 variants 中,每个款式有自己的 product_id、url、gtin、color 与 size 以及价格区间。variant_count 统计款式。
gtin 即 EAN。overall_grade 是 billiger.de 按德国学校评分制给出的评分,1 分最好,overall_grade_label 是其文字表述,overall_rating 是对应的星级。
user_rating 与 test_report_rating 分别附有计数 user_rating_count 与 test_report_count。popularity_rank 给出商品在其 category 内的 rank。
product 中的列表包含以下条目:
specs:规格表,每项规格一条,含group、label与valuekey_specs:规格表之外的主要规格pros与cons:编辑给出的优点与缺点test_reports:专业测试,每条含title、date与publishergrade_display、grade_scale与grade:测试给出的评分、所用评分制及其数值rating:测试评分对应的 5 星等级,另有该测试各自的pros与cons
本节涉及的字段(3)
billiger-product, body.product_id, body.baseproduct_id
操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
分类列表
POST /api/v1/billiger/billiger-category
按标识列出 billiger.de 单个分类下的目录商品,可按品牌、店铺与价格缩小范围。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.category_id | string | 必填 | — | — | — |
body.brand_id | string | 可选 | — | — | — |
body.in_stock_only | boolean | 可选 | false | — | — |
body.page | integer | 可选 | 1 | — | 1–50 |
body.page_size | integer | 可选 | 48 | — | 48–96 |
body.price_max | number | 可选 | — | — | ≥ 0 |
body.price_min | number | 可选 | — | — | ≥ 0 |
body.shop_id | string | 可选 | — | — | — |
body.sort | string | 可选 | "relevance" | "relevance""popularity""price_asc""price_desc" | — |
请求示例
# 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/billiger/billiger-category' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":"3551"}}'单条报价
POST /api/v1/billiger/billiger-offer
按标识读取单条店铺报价,含店铺、价格、运费、总价与送达时间。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.offer_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/billiger/billiger-offer' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"offer_id":"3046341211"}}'店铺报价
POST /api/v1/billiger/billiger-offers
读取单个商品或系列的店铺报价,含价格、运费、总价与店铺评分。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.baseproduct_id | string | 可选 | — | — | — |
body.condition | string | 可选 | "new" | "new""used" | — |
body.in_stock_only | boolean | 可选 | false | — | — |
body.max_offers | integer | 可选 | 20 | — | 1–100 |
body.product_id | string | 可选 | — | — | — |
body.sort | string | 可选 | "price" | "price""total_price" | — |
请求示例
# 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/billiger/billiger-offers' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3443116743"}}'价格历史
POST /api/v1/billiger/billiger-price-history
读取单个商品每日最低价,以及所选区间的最低、最高与中位价。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.product_id | string | 可选 | — | — | — |
body.time_range | string | 可选 | "6m" | "1m""3m""6m""all" | — |
请求示例
# 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/billiger/billiger-price-history' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3443116743","time_range":"6m"}}'商品资料
POST /api/v1/billiger/billiger-product
读取单个商品或系列的品牌、EAN、评分、规格、测试报告与款式。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.baseproduct_id | string | 可选 | — | — |
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/billiger/billiger-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3443116743"}}'响应字段
productrow_typeproduct_idbaseproduct_idtitleurlbrandgtincolorvariant_attributescategorycategory_path[]category_idname
imagedescriptionprice_minprice_maxprice_nowoffer_countcurrencyoverall_gradeoverall_grade_labeloverall_ratinguser_ratinguser_rating_counttest_report_ratingtest_report_countpopularity_rankrankcategory
pros[]cons[]key_specs[]specs[]grouplabelvalue
test_reports[]titledatepublishergrade_displaygrade_scalegraderatingproscons
variants[]product_idtitleurlgtincolorsizeprice_minprice_maxoffer_count
variant_count
关键词搜索
POST /api/v1/billiger/billiger-search
按关键词或 EAN 搜索 billiger.de,并可按品牌、分类、店铺、价格区间与可立即发货筛选。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.query | string | 必填 | — | — | — |
body.brand_id | string | 可选 | — | — | — |
body.category_filter | string | 可选 | — | — | — |
body.in_stock_only | boolean | 可选 | false | — | — |
body.page | integer | 可选 | 1 | — | 1–50 |
body.page_size | integer | 可选 | 48 | — | 48–96 |
body.price_max | number | 可选 | — | — | ≥ 0 |
body.price_min | number | 可选 | — | — | ≥ 0 |
body.row_types | string | 可选 | "all" | "all""products""offers" | — |
body.shop_id | string | 可选 | — | — | — |
body.sort | string | 可选 | "relevance" | "relevance""popularity""price_asc""price_desc" | — |
请求示例
# 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/billiger/billiger-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"kaffeevollautomat delonghi"}}'调用方式
- 使用
POST /api/v1/billiger/<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 小时内返回已保存的响应,不会再次扣费。
网关调用参考: