LCBO API

LCBO API Version 1

Stores

The store object represents a physical LCBO location.

Agency stores are not included in LCBO API, a JSON file of them was kindly provided by Svante Richter.

Open and close times are reperesented in minutes since midnight. This format can be converted into 24 hour time using the approach below:

function msmTo24time(msm) {
  var hour = msm / 60;
  var mins = msm % 60;

  return [hour, mins];
}

You will probably want to convert the minutes since midnight to 12 hour time since that’s what most Ontarians will be familiar with, you can do that with a few extra steps:

function msmTo12time(msm) {
  var time = msmTo24time(msm);
  var h24  = time[0];
  var h12  = (0 == h24 ? 12 : (h24 > 12 ? (h24 - 10) - 2 : h24));
  var ampm = (h24 >= 12 ? 'PM' : 'AM');

  return [h12, time[1], ampm];
}

Store Attributes

Attribute Description
address_line_1

Street address

address_line_2

Secondary address information (Not all stores)

city

City the store is in

fax

Fax number (not all stores have one)

has_beer_cold_room

True if the store has a walk-in beer fridge

has_bilingual_services

True if the store has bilingual services

has_parking

True if the store has a parking lot

has_product_consultant

True if the store has a product consultant on staff

has_special_occasion_permits

True if the store can issue special occasion permits

has_tasting_bar

True if the store has a tasting bar

has_transit_access

True if the store is accessible by public transit

has_vintages_corner

True if the store has a Vintages area

has_wheelchair_accessability

True if the store can be entered via wheelchair

id

LCBO store number

inventory_count

Total inventory units at the store

inventory_price_in_cents

Total retail value of all products at the store

inventory_volume_in_milliliters

Total volume of all products at the store

is_dead

When a store is removed it is marked as “dead”

latitude

Reported latitude

longitude

Reported longitude

name

Official LCBO store name

postal_code

Postal code

products_count

Total unique products at the store

store_no

LCBO store number [Deprecated: Use id instead]

[sunday..monday]_close

Minutes since midnight that the store closes

[sunday..monday]_open

Minutes since midnight that the store opens

tags

A string of tags that reflect the store

telephone

Telephone number

updated_at

Time that the store information was updated

Store HTTP Endpoints

GET lcboapi.com/stores

Returns a list of stores that can be filtered and ordered by parameters.

URL Query Parameters

Param Value Description
page Page number

The page number you’d like to return.

Example
lcboapi.com/stores?page=3
per_page Page size

The number of objects to include per page. The defaults is 50, and the maximum is 200.

Example
lcboapi.com/stores?per_page=150
where is_dead
has_wheelchair_accessability
has_bilingual_services
has_product_consultant
has_tasting_bar
has_beer_cold_room
has_special_occasion_permits
has_vintages_corner
has_parking
has_transit_access
Example
lcboapi.com/stores?where=has_parking
Allows multiple values
Separate them with a comma like this: where=one,two,three
where_not is_dead
has_wheelchair_accessability
has_bilingual_services
has_product_consultant
has_tasting_bar
has_beer_cold_room
has_special_occasion_permits
has_vintages_corner
has_parking
has_transit_access
Example
lcboapi.com/stores?where_not=is_dead
Allows multiple values
Separate them with a comma like this: where_not=one,two,three
order distance_in_meters
inventory_volume_in_milliliters
id
products_count
inventory_count
inventory_price_in_cents

Sort the returned stores by one or more of the listed attributes. Ascending or descending order is specified by adding .asc or .desc to the end of the attribute name.

Example
lcboapi.com/stores?order=id.asc
Allows multiple values
Separate them with a comma like this: order=one,two,three
q URI-encoded search query

Returns all stores that match the provided full-text search query, this is purely text-based, look to the lat, lon, and geo parameters for geographical queries.

Example
lcboapi.com/stores?q=dupont
product_id LCBO Product ID

Returns only stores that have inventory for the specified product.

Example
lcboapi.com/stores?product_id=18
lat
lon
Latitude and Longitude

Returns all stores starting from closest to the specified geographical point. Adds distance_in_meters attribute to the returned store objects, and defaults to ordering them by distance_in_meters.asc.

Example
lcboapi.com/stores?lat=43.659&lon=-79.439
geo Point of interest: postal code, major intersection, city, address

Geocodes the provided value, and if successful, returns all stores in the same manner as above. Subject to aggressive rate-limiting, use lat and lon whenever possible. Google Maps JavaScript API is excellent for geocoding client-side.

Example
lcboapi.com/stores?geo=m6h+1p2

GET lcboapi.com/stores/{store_id}

Returns one store by {store_id}.