Skip to main contentSkip to navigation
← Back to documentation

Price History

Daily aggregated price trends for a product over up to 180 days.

Price History
GET /v1/products/{id}/price-history

Daily aggregated price trends for a product over up to 180 days.

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key>

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesProduct UUID

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoNumber of days of history. Default: 30, max: 180

Example Request

curl -s "https://api.buywhere.ai/v1/products/a1b2c3d4-e5f6-7890-abcd-ef1234567890/price-history?days=30" \
  -H "Authorization: Bearer $BUYWHERE_API_KEY"

Response

{
  "data": {
    "product_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Sony WH-1000XM5 Wireless Headphones",
    "current_price": 349.00,
    "currency": "SGD",
    "daily": [
      {
        "day": "2026-05-16",
        "currency": "SGD",
        "min": 345.00,
        "max": 349.00,
        "avg": 347.50,
        "data_points": 8
      },
      {
        "day": "2026-05-15",
        "currency": "SGD",
        "min": 349.00,
        "max": 369.00,
        "avg": 355.00,
        "data_points": 6
      }
    ],
    "stats": {
      "min": 299.00,
      "max": 549.00,
      "avg": 375.50
    }
  },
  "meta": {
    "days": 30,
    "response_time_ms": 89
  }
}

Response Fields

FieldTypeDescription
data.product_idstringProduct UUID
data.current_pricenumberLatest price
data.currencystringCurrency code
data.daily[]arrayDaily price aggregations
data.daily[].daystringDate (YYYY-MM-DD)
data.daily[].minnumberLowest price recorded that day
data.daily[].maxnumberHighest price recorded that day
data.daily[].avgnumberAverage price that day
data.daily[].data_pointsintegerNumber of price observations
data.stats.minnumberAll-time low in the period
data.stats.maxnumberAll-time high in the period
data.stats.avgnumberAverage price across the period

Granular Price History

GET /v1/products/{id}/prices

Individual price observations with timestamps, for more detailed analysis.

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoDefault: 30, max: 90

Example Response

{
  "data": {
    "product_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Sony WH-1000XM5 Wireless Headphones",
    "current_price": 349.00,
    "currency": "SGD",
    "history": [
      { "price": 349.00, "currency": "SGD", "at": "2026-05-16T14:30:00Z" },
      { "price": 369.00, "currency": "SGD", "at": "2026-05-15T08:00:00Z" },
      { "price": 349.00, "currency": "SGD", "at": "2026-05-14T20:15:00Z" }
    ],
    "stats": {
      "min": 299.00,
      "max": 549.00,
      "avg": 375.50,
      "data_points": 142
    }
  },
  "meta": {
    "days": 30,
    "response_time_ms": 75
  }
}

Get the best deals weekly

Price drops, new markets, and AI shopping tips — straight to your inbox.