Documentation

API Reference

Base URL: https://data.buyersmarket.app
All requests require the X-API-Key header. Responses are JSON.

GET Prices

/v1/prices

Current price observations scraped daily from Jamaican retailers. Each record represents one product at one store with its A-B-C rating. 1 credit per request.

Query parameters

Parameter Type Description
qstringFull-text search on product name
product_idUUIDFilter by specific product
store_idUUIDFilter by specific store
categorystringFilter by product category (e.g. Dairy, Produce)
brandstringFilter by brand name
ratingA | B | CFilter by A-B-C price rating
min_pricenumberMinimum price in JMD
max_pricenumberMaximum price in JMD
limitint (1–1000)Results per page. Default: 50
offsetintPagination offset. Default: 0

Example

curl "https://data.buyersmarket.app/v1/prices?category=Dairy&rating=A&limit=10" \
  -H "X-API-Key: bm_your_key"

Response schema

{
  "data": [
    {
      "id": "uuid",
      "product_id": "uuid",
      "product_name": "string",
      "barcode": "string | null",
      "brand": "string | null",
      "category": "string",
      "price_jmd": 425.00,
      "store_id": "uuid",
      "store_name": "string",
      "chain_name": "string",
      "rating": "A | B | C | null",
      "scraped_at": "ISO 8601 datetime"
    }
  ],
  "total": 847,
  "page": 1,
  "page_size": 10,
  "has_next": true
}

GET Products

/v1/products  ·  /v1/products/{id}

Browse or search the 18,000+ product catalog. Includes barcodes, brands, categories, and unit sizes. 1 credit per request.

Query parameters

Parameter Type Description
qstringFull-text search
categorystringCategory filter
brandstringBrand filter
barcodestringExact barcode lookup (EAN-13 / UPC)
limit / offsetintPagination

Response schema

{
  "data": [
    {
      "id": "uuid",
      "name": "Grace Full Cream Milk 1L",
      "barcode": "054871000123",
      "brand": "Grace",
      "category": "Dairy",
      "subcategory": "Milk",
      "unit_size": 1.0,
      "unit_type": "litre",
      "image_url": "https://storage.googleapis.com/...",
      "created_at": "ISO 8601"
    }
  ],
  "total": 18302,
  "page": 1
}

GET Stores

/v1/stores  ·  /v1/stores/{id}

List of 31 store locations across Jamaica with GPS coordinates and chain affiliation. 1 credit per request.

Response schema

{
  "data": [
    {
      "id": "uuid",
      "name": "Hi-Lo — Liguanea",
      "chain_id": "uuid",
      "chain_name": "Hi-Lo Food Stores",
      "address": "Liguanea Plaza, Kingston 6",
      "parish": "Kingston",
      "latitude": 17.9908,
      "longitude": -76.7778,
      "is_active": true
    }
  ],
  "total": 31
}

GET Market & BGPI

/v1/market/bgpi  ·  /v1/market/summary

The BuyersMarket Grocery Price Index (BGPI) is a composite measure of the cost of a standard basket of Jamaican staples, updated daily. 1 credit per request.

BGPI response schema

{
  "date": "2026-03-03",
  "index_value": 1243.75,
  "basket_size": 50,
  "categories": {
    "Produce": { "avg_price": 285.40, "pct_change_30d": 1.2 },
    "Dairy": { "avg_price": 425.00, "pct_change_30d": -0.8 },
    "Meat": { "avg_price": 890.20, "pct_change_30d": 3.1 }
  },
  "stores_covered": 31,
  "generated_at": "2026-03-03T07:00:00Z"
}

Market summary endpoint

GET /v1/market/summary

{
  "total_products": 18302,
  "total_prices": 20932,
  "total_stores": 31,
  "categories": ["Dairy","Produce","Meat","Beverages",...],
  "last_scraped_at": "2026-03-03T06:30:00Z",
  "data_freshness_hours": 1.5
}

API Keys

Endpoint Method Description
/v1/keys/meGETYour key details, quota used, tier
GET /v1/keys/me

{
  "key_prefix": "bm_abc123",
  "name": "University of the West Indies",
  "tier": "research",
  "monthly_quota": 1000,
  "quota_used": 142,
  "quota_remaining": 858,
  "is_active": true,
  "created_at": "2026-02-15T10:00:00Z",
  "last_used_at": "2026-03-03T09:14:00Z"
}

A-B-C Price Ratings

Every price observation carries an A, B, or C rating based on the product's 90-day price history. This tells you whether a price is a good deal relative to recent history.

A
Grab It!
Current price is at or below the lowest price seen in the last 90 days. Exceptional value.
B
Fair Price
Within 10% of the 90-day low. A normal price — not a steal, not overpriced.
C
Hold Off
More than 10% above the 90-day low. This product has been cheaper recently.
Note: Rating is null when fewer than 2 price history records exist for the product.

Pagination

All list endpoints use offset-based pagination.

Field Type Description
totalintTotal matching records
pageintCurrent page number (1-indexed)
page_sizeintRecords returned in this response
has_nextboolWhether more pages exist
Iterate all pages
import httpx

client = httpx.Client(
    base_url="https://data.buyersmarket.app",
    headers={"X-API-Key": "bm_your_key"},
)

offset, all_prices = 0, []
while True:
    resp = client.get("/v1/prices", params={"category": "Dairy", "limit": 200, "offset": offset})
    page = resp.json()
    all_prices.extend(page["data"])
    if not page["has_next"]:
        break
    offset += page["page_size"]

print(f"Fetched {len(all_prices)} dairy prices")

Authentication

Detail Value
Header nameX-API-Key
Key formatbm_<32 chars>
Error on missing keyHTTP 401
Error on inactive keyHTTP 403
Quota exhaustedHTTP 429