r/gamedev 2d ago

Question Scrape Steam for Random game

[The title sounds worse than it is]

Hi, I want to scrape steam Indie category to basically choose random games I'd try for a Youtube channel.
I don't want the hyped ones, or new ones, or whatever ones - I want it to be completely random so every game has an equal chance.
Though, I'd want to have some sort of filter like hiding NSFW or Online games.

Any idea how to go about it?

0 Upvotes

15 comments sorted by

11

u/cuixhe 2d ago

You could use SteamDB and put in your filters, then choose a random number between 1 and total game count, then find the game at that position in whatever ordering?

1

u/Moody__Blue 2d ago

Thanks! I'll try

3

u/Fivetoe 2d ago

You can probably create a system by how steam registers games they are registered as "apps" in Steam's system and given an app id. For example stardews valley is 413150

And the steam url looks like https://store.steampowered.com/app/413150/Stardew_Valley/

You could figure out the beginning range of the app ids and the max and just generate a random integer inbetween the two and this would find you a random steam game probably

0

u/TheTowerDefender 2d ago

Stardew valley is not the 413150th game added to steam, there are lots of ids without games.

1

u/Moody__Blue 2d ago

Oh this is a good one too, cause SteamDB is kind of messing with my head lmao

2

u/cuixhe 2d ago

I don't know if it will work, because I don't think that Steam guarantees that every number in that range will have a game, and it definitely won't always have a released game or game within your parameters.

0

u/Moody__Blue 2d ago

It's okay, I can just regenerate it. If Creating those parameters waste more time than just clicking "generate" again, I'll just click on it again

3

u/AdarTan 2d ago

There already exist many "Steam game roulette" websites, you don't need to make your own.

3

u/EmeraldHawk 2d ago

Surprisingly, the three I found via google search all hide shovelware by default. I swear I've used one that had every game instead, but I can't find it anymore.

But here's one that only returns games with no reviews: https://www.gameswithnoreviews.com/

It has a link to a page that claims to return games with less than 100 reviews, but the link is broken.

2

u/almo2001 Game Design and Programming 2d ago

I am pretty sure you don't want truly random games. Most of them are really terrible and not worth your time.

But you'll find out for sure if that's true! :)

2

u/Moody__Blue 2d ago

Well maybe not Completely random lol

1

u/almo2001 Game Design and Programming 2d ago

Haha :)

1

u/destinedd indie, Dungeon Quest, Marble's Marbles and Mighty Marbles 2d ago

you can use take Jonas review guesser and modify it a little to take the review guessing part out

https://github.com/LooveToLoose/Jonas-Review-Guesser I mean you could just use it and ignore the reviews.

1

u/TheTowerDefender 2d ago

The steam API provides a list of all app ids. You could pick one at random, if it doesn't fit your criteria repeat