Giter Club home page Giter Club logo

systembolaget-api's Introduction

๐Ÿบ systembolaget-api

A public REST API for retrieving information about Systembolaget's products, and which products that are available in which store.

๐Ÿ”” NOTE

Currently in communication with Systembolaget about whether this API breaks their terms and conditions, and the API is therefore not available at this time.


version url status
v1 https://systembolaget.dcronqvist.se/v1 Uptime Robot status

But Systembolaget has removed their API for retrieving products, so how does this work?

That is correct, they no longer provide an official API for getting product information, they now only provide an API for getting information about their stores, and their providers. However, if one only spends a minute looking at the network traffic when searching for products at systembolaget.se, you'll see that the front end uses an API to retrieve all products available in a certain store.

Its product search endpoint is this: https://api-extern.systembolaget.se/sb-api-ecommerce/v1/productsearch, but it requires an API key to be used, which can be found in all requests in the network traffic, cfc702aed3094c86b92d6d4ff7a54c84 :).

I start by getting all stores through their official API for store information, and using those, I lookup all products that exist in each store by supplying a storeId parameter to their product search endpoint. Unfortunately they've restricted the amount of products per page that they return to 30, so I've had to make about ~60 requests for each of the 450 stores to get all the products. Data is recollected on a weekly basis.

GET /products

Allows for retrieving information about all products in Systembolaget's assortment. Supplying no parameters returns all products.

  • productId: number, returns the product with the corresponding product identifier.
  • category: enum[vin, รถl, cider, sprit], filters out products which match the given category.
  • name: string, filters out products with names that contains the given substring. (not case-sensitive)
  • minPrice: number, filters out products which have a price that is at least the given number.
  • maxPrice: number, filters out products which have a price that is at most the given number.
  • producer: string, filters out products with producers whose name contains the given substring.

GET /stores

Allows for retrieving information about all stores that Systembolaget has, together with which products they have in that specific store. The following parameters cannot be used together, instead they should be seen as different ways of finding and looking up stores. Supplying no parameters returns all stores.

  • siteId: string, returns the store with the corresponding site identifier.
  • city: string, returns all stores in the given city, e.g. malmรถ. (not case-sensitive).
  • lat: float, lng: float, returns the closest store to the given coordinates. e.g lat=57.68751&lng=11.9785 would give the store located at Kapellplatsen in Gothenburg (calculates distance using the great-circle distance).
  • lat: float, lng: float, maxdist: number, returns all stores within a radius of maxdist kilometers from the given coordinates.

Suggestions or want to contribute?

Feel free to make an issue or open a PR with new stuff!

systembolaget-api's People

Contributors

dcronqvist avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

systembolaget-api's Issues

[Request] image url

Hi!

Would it be possible to add image URLs supplied by Systembolaget for each product entry?

Missing products

Hi, there is a large number of items missing. Currently it returns 12785 products out of 23103.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.