{"id":25408964,"url":"https://github.com/bartmachielsen/supermarktconnector","last_synced_at":"2025-04-10T00:17:50.693Z","repository":{"id":23366740,"uuid":"98797951","full_name":"bartmachielsen/SupermarktConnector","owner":"bartmachielsen","description":"Collecting product information from Dutch supermarkets: Albert Heijn and Jumbo using the Mobile API","archived":false,"fork":false,"pushed_at":"2022-12-06T19:48:22.000Z","size":253,"stargazers_count":131,"open_issues_count":7,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T00:17:41.681Z","etag":null,"topics":["ah","albert","albert-heijn","connector","jumbo","python","rest-api","supermarkets","supermarkt"],"latest_commit_sha":null,"homepage":"http://www.bartmachielsen.nl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartmachielsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-30T13:05:09.000Z","updated_at":"2025-04-02T14:46:52.000Z","dependencies_parsed_at":"2023-01-13T23:11:37.240Z","dependency_job_id":null,"html_url":"https://github.com/bartmachielsen/SupermarktConnector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartmachielsen%2FSupermarktConnector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartmachielsen%2FSupermarktConnector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartmachielsen%2FSupermarktConnector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartmachielsen%2FSupermarktConnector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartmachielsen","download_url":"https://codeload.github.com/bartmachielsen/SupermarktConnector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131318,"owners_count":21052820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ah","albert","albert-heijn","connector","jumbo","python","rest-api","supermarkets","supermarkt"],"created_at":"2025-02-16T08:18:25.654Z","updated_at":"2025-04-10T00:17:50.671Z","avatar_url":"https://github.com/bartmachielsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SupermarketConnector\n\n![Publish](https://github.com/bartmachielsen/SupermarktConnector/workflows/Publish/badge.svg)\n\nCollecting product information from Dutch supermarkets: Albert Heijn and Jumbo\n\n## Getting Started\nInstall the Pip package\n```bash\npip install supermarktconnector\n```\n\n## Sample\nImport the jumbo connector and search for a product\n```python\nfrom supermarktconnector.jumbo import JumboConnector\nconnector = JumboConnector()\nconnector.search_products(query='Smint', size=1, page=0)\n```\n```json\n{\n  \"products\": {\n    \"data\": [\n      {\n        \"id\": \"70942PAK\",\n        \"title\": \"Smint Peppermint Sugarfree 100 Stuks 2 x 35g\",\n        \"quantityOptions\": [\n          {\n            \"defaultAmount\": 1,\n            \"minimumAmount\": 1,\n            \"amountStep\": 1,\n            \"unit\": \"pieces\",\n            \"maximumAmount\": 99\n          }\n        ],\n        \"prices\": {\n          \"price\": {\n            \"currency\": \"EUR\",\n            \"amount\": 365\n          },\n          \"unitPrice\": {\n            \"unit\": \"kg\",\n            \"price\": {\n              \"currency\": \"EUR\",\n              \"amount\": 5214\n            }\n          }\n        },\n        \"available\": true,\n        \"productType\": \"Product\",\n        \"quantity\": \"2 x 35 g\",\n        \"imageInfo\": {\n          \"primaryView\": [\n            {\n              \"url\": \"https://ish-images-static.prod.cloud.jumbo.com/product_images/240420200540_70942PAK-1_360x360.png\",\n              \"height\": 360,\n              \"width\": 360\n            }\n          ]\n        }\n      }\n    ]\n  }\n}\n```\n\nYou can also get the different product-categories:\n```python\nfrom supermarktconnector.ah import AHConnector\nconnector = AHConnector()\nconnector.get_categories()\n```\n```json\n[\n  {\n    \"id\": 6401,\n    \"name\": \"Aardappel, groente, fruit\",\n    \"images\": [\n      {\n        \"height\": 400,\n        \"width\": 600,\n        \"url\": \"https://static.ahold.com//cmgtcontent/media//002304400/000/002304468_001_groenten-fruit.png\"\n      }\n    ],\n    \"nix18\": false\n  }\n]\n```\n\n## Deprecated\n### X-Digest (Albert Heijn)\nThe Albert Heijn used a special X-Digest for verifying that the app data traffic was coming from the backend, in the new versions this has been removed.\n\n_This X-Digest is an hashed value that uses SHA1 to check if the request is valid and made by the original android app. The logic behind this hash is:_\n\n`X_DIGEST = URL + PARAMETERS + USERNAME + POST_BODY (Max 1000 bytes) + SECRET_PASSWORD`\n\n### Price differences (Jumbo)\nIn the past all the the jumbo stores where divided over 5 different categories, with each category a different price for some of the products. The token used for store identification is no longer working in the new versions, It might be handled on the backend.\n\nI created an [interactive map](https://www.google.com/maps/d/u/0/edit?mid=1uPq5t6Ymcjs9TbrNbyAl5uS08sY\u0026ll=51.93466534760809%2C6.304439426712179\u0026z=8) which sorts all the stores by category.\n\n![Jumbo prices](/jumbo-prices.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartmachielsen%2Fsupermarktconnector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartmachielsen%2Fsupermarktconnector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartmachielsen%2Fsupermarktconnector/lists"}