op1ekun / PolishOurPrices

@PolishOurPrices
MIT License
2 stars 0 forks source link

Investigate Steam/SteamDB APIs if such are available #1

Closed op1ekun closed 1 week ago

op1ekun commented 2 weeks ago

It would be great to have access to LIVE data instead of relying on scraped one. Less dependency on 3rd part software is usually a better option.

op1ekun commented 2 weeks ago

Useful links:

Steam Web API: https://partner.steamgames.com/doc/webapi_overview https://steamwebapi.azurewebsites.net/ https://stackoverflow.com/questions/13784059/how-to-get-the-price-of-an-app-in-steam-webapi https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appdetails

SteamDB: https://steamdb.info/blog/store-prices-api/ https://steamdb.info/donate/

op1ekun commented 1 week ago

First breakthrough! We can request details for multiple apps :)

https://store.steampowered.com/api/appdetails?appids=57690,57000&filters=price_overview

...and we can select the currency for the overview: https://store.steampowered.com/api/appdetails?appids=57690,57000&filters=price_overview&cc=de

op1ekun commented 1 week ago

Jekyll workflow supports npm scripts, so the API calls can happen in the build step :) The webapp will work with the produced json files.

janjag commented 1 week ago

There is 100k calls/day limit, so we have some margin to work with, but in long term some form of caching could be helpful. From code i saw we have ~212 calls per currency but this probably will be lower, as some fields returns empty data field or "success": false

janjag commented 1 week ago

Additional links:

janjag commented 1 week ago

I've got 429 response code on one of API calls, so the 100k limit could be only for calls with api key

op1ekun commented 1 week ago

Trying static API approach:

https://dev.to/matmooredev/can-you-host-a-read-only-api-on-github-pages-1jib

https://github.com/MatMoore/jargon/tree/gh-pages

https://op1ekun.github.io/PolishOurPrices/api (WATCH OUT, IT'S HEAVY! ~80MB!)

op1ekun commented 1 week ago

Trimmed to around ~8600 apps (using 5% price difference, and is at least 5PLN criteria) https://op1ekun.github.io/PolishOurPrices/api/diff5

NEXT step is to trim down even further by reviews count (skip the ones with <20 reviews)

op1ekun commented 1 week ago

added reviews filter https://op1ekun.github.io/PolishOurPrices/api/diff5/review20/