Comments (15)
Looks like IKEA has changed up their API. Subscribing in hopes that somebody finds a workaround.
from ikea-availability-checker.
The api.ingka.ikea.com API doesn’t support all details but at least the current stock available for pickup and the restore probability.
The API requires just the "x-client-id"-header to be present and contain a valid API key. For US stores the API key used in the Browser is "da465052-7912-43b2-82fa-9dc39cdccef8" and works:
curl 'https://api.ingka.ikea.com/cia/availabilities/ru/us?itemNos=00494394&expand=StoresList,Restocks&' \
-X 'GET' \
-H 'x-client-id: da465052-7912-43b2-82fa-9dc39cdccef8'
{
"availabilities": [
{
"buyingOption": {
"cashCarry": {
"availability": {
"probability": {
"thisDay": {
"messageType": "HIGH_IN_STOCK"
}
},
"quantity": 2
},
"unitOfMeasure": "PIECE"
}
}
"classUnitKey": {
"classUnitCode": "026", // store code
"classUnitType": "STO"
},
}
]
}
I’ll make adjustments to the code so that this API also works.
from ikea-availability-checker.
Hi @Ephigenia thank you very much for this wonderful project. Could you plz point me In the right direction on how to mod the script to use that API ? I'm a non-programmer searching us stores . Stay awesome
from ikea-availability-checker.
Yes, more and more countries don’t work anymore. I’m planning to create a smoke test shell script that tests every country and puts the results in a table. If someone wants to contribute … it‘s welcome :)
from ikea-availability-checker.
All PL stores are returning 403 error code too...
from ikea-availability-checker.
subbed. same problem. hope this project gets revived.
from ikea-availability-checker.
For those that are just hopiing to check for availablity on a specific product, I found an endpoint that works. It's the one that is getting called from the product page on their site (USA). I'm sorry, I'm not able to see how this works for other countries right now, but hopefully it helps some people out or starts them down the right path.
Here's an example request:
https://api.ingka.ikea.com/cia/availabilities/ru/us?itemNos=20487415&zip=32746&expand=Restocks,SalesLocations
.
You'll need to pass some header params, here's what I'm usng just to mimic the web browser. Your client id needs to be unique and you can get one from inspecting requests to the same endpont in your browser.
'x-client-id': <insert client id here>
'accept': 'application/json;version=2',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9',
'origin': 'https://www.ikea.com',
'referer': 'https://www.ikea.com/',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'sec-gpc': '1',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36'
from ikea-availability-checker.
@JK-TC thanks for that hint! I’ll investigate this
from ikea-availability-checker.
The ingka api works for all countries except for russia:
countryCode | iows2 | ingka |
---|---|---|
at | ✓ | ✓ |
au | ✓ | ✓ |
be | ✗ | ✓ |
ca | ✓ | ✓ |
ch | ✓ | ✓ |
cn | ✗ | ✓ |
cz | ✓ | ✓ |
de | ✓ | ✓ |
dk | ✓ | ✓ |
es | ✓ | ✓ |
fi | ✗ | ✓ |
fr | ✗ | ✓ |
gb | ✗ | ✓ |
hk | ✗ | ✓ |
hr | ✓ | ✓ |
hu | ✓ | ✓ |
ie | ✗ | ✓ |
it | ✓ | ✓ |
jo | ✓ | ✓ |
jp | ✗ | ✓ |
kr | ✗ | ✓ |
kw | ✓ | ✓ |
lt | ✓ | ✓ |
my | ✗ | ✓ |
nl | ✓ | ✓ |
no | ✓ | ✓ |
pl | ✗ | ✓ |
pt | ✓ | ✓ |
qa | ✓ | ✓ |
ro | ✓ | ✓ |
ru | ✗ | ✗ |
sa | ✓ | ✓ |
se | ✓ | ✓ |
sg | ✗ | ✓ |
sk | ✓ | ✓ |
th | ✗ | ✓ |
tw | ✗ | ✓ |
us | ✗ | ✓ |
from ikea-availability-checker.
This package uses the undocumented iows2 api by IKEA which doesn’t work for several countries anymore: be, cn, fi, fr, gb, hk, ie, jp, kr, my, pl, ru, sg, th, tw, us
If you want to get availabilities for those countries please consider testing the alpha channel of this package by installing the "2.0.0-alpha.1" version:
npm install -g [email protected]
Please report any bugs related to this alpha in the issues: https://github.com/Ephigenia/ikea-availability-checker/issues
from ikea-availability-checker.
Please consider rating this package: https://openbase.com/js/ikea-availability-checker 🙇♂️
from ikea-availability-checker.
Thank you!
Note: There's a typo in the npm
command in the above comment. It should read:
npm install -g [email protected]
(check
-> checker
)
from ikea-availability-checker.
@BHSPitMonkey thanks! Got it fixed.
from ikea-availability-checker.
Hi, I'm trying to test the alpha channel, and I do npm run start -- stock --country pl 80382321
. Got an error TypeError: Cannot read properties of undefined (reading 'stock') at C:\ikea\node_modules\ikea-availability-checker\source\cli-stock.js:152:65 at Array.filter (<anonymous>) at C:\ikea\node_modules\ikea-availability-checker\source\cli-stock.js:152:32 at processTicksAndRejections (node:internal/process/task_queues:96:5)
from ikea-availability-checker.
@okniazik I’ve created an issue for this, will be fixed in a few minutes …
from ikea-availability-checker.
Related Issues (20)
- undefined "stock" in alpha version HOT 1
- undefined store for fr country HOT 3
- ERR_HTTP_403 with pl country HOT 4
- Error "ERR_HTTP_403" on 2.0.0-alpha.1 version HOT 10
- The automated release is failing 🚨
- The automated release is failing 🚨 HOT 2
- Help HOT 1
- 403 Error / Deprecated on Alpha 5 HOT 12
- smoke test for all countries HOT 1
- recurring smoke test (cron) HOT 7
- get stores from meta files HOT 7
- get list of countries from JS file
- bug: ERR_HTTP_403 on country KR using npx HOT 1
- bug: France store 518 metadata fix HOT 1
- Typescript support HOT 1
- Wrong Coordinates for store in Karlsruhe HOT 1
- SyntaxError: Unexpected token '.' HOT 3
- 403 for all request to BE stores HOT 6
- Szczecin store not visible in the software HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ikea-availability-checker.