Market NinjaMarket Ninja
方法

取得商品價格歷史

GET
/products/{id}/price-history

某項商品價格與庫存觀測記錄的完整時間序列——與目前價格不同(目前價格已包含在 GET /productsGET /products/{id} 中),這個端點僅在需要分析歷史趨勢時才用到。

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer 權杖——取得方式與使用方法請參閱 API 概覽

In: header

Path Parameters

id*string
Formatuuid

Query Parameters

country_code?string

限定某一個國家市場版本(例如電商平台的國家網域代碼,如 Wildberries 的 ru/kz/by/am)。不區分大小寫比對。

region_code?string

限定某一個特定地區或倉庫(該代碼是電商平台自有的,不做跨平台統一)。

user_auth_status?string

依所顯示的價格是訪客價格還是登入使用者價格進行篩選。

Value in

  • "anonymous"
  • "authenticated"
from?string

時間範圍起點(ISO 8601)。不能晚於 to

Formatdate-time
to?string

時間範圍終點(ISO 8601)。

Formatdate-time
page?integer

無效或缺失的值會被靜默限制為預設值,而不會以 400 錯誤拒絕。

Range1 <= value
Default1
page_size?integer

最大值為 500——相較於典型的面向 UI 的 API,這個值刻意設定得更寬鬆,專為批次拉取情境設計。

Range1 <= value <= 500
Default100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/products/e86bee19-9cc9-4a83-b9cc-6b61f1209d90/price-history?from=2026-08-01T00%3A00%3A00Z&to=2026-08-02T00%3A00%3A00Z"
{  "data": [    {      "country_code": "ru",      "region_code": null,      "user_auth_status": "anonymous",      "price": 7093,      "old_price": 8651,      "currency": "RUB",      "stock_status": null,      "stock_quantity": null,      "recorded_at": "2026-08-02T23:21:53.185302+00:00"    },    {      "country_code": "ru",      "region_code": null,      "user_auth_status": "anonymous",      "price": 6993,      "old_price": 8688,      "currency": "RUB",      "stock_status": null,      "stock_quantity": null,      "recorded_at": "2026-08-01T01:03:17.999423+00:00"    }  ],  "meta": {    "total": 2,    "page": 1,    "page_size": 100  }}