Jump to content
McKay Development

About appinfo: Where to get names for categories & genres?


Recommended Posts

Posted (edited)

I there, thanks for developing steam-user!

When calling getProductinfo([48240],[]), the returned apps[48240].appinfo.common object contains :

  • genres
    genres: { '0': '2' },
  • categories
    "category":{
      "category_2":"1",
      "category_1":"1",
      "category_29":"1",
      "category_45":"1",
      "category_46":"1"
    },

But where to get the names/descriptions for these id's? and what's the meaning of "1" behind every category?

I've found the following, which looks accurate, but that's just a manually updated partial list of some random dev...

Also looking at the store page only 2 categories are shown: https://store.steampowered.com/app/48240
While the webapi returns 3 categories: https://store.steampowered.com/api/appdetails?appids=48240 (So i guess some category/genre names can be found out this way. But isn't there a better way?)

wtf?

Edited by Claude
fixing typos, genres/category is under appinfo.common
Posted
On 2/6/2023 at 12:11 PM, Claude said:

But where to get the names/descriptions for these id's?

I think it's probably just hardcoded directly into the Steam client. I haven't seen anything that would deliver category or genre names to the client dynamically. It looks like you can get category names from HTML on the search page under "narrow by feature" (e.g. I see data-param="category2" data-value="50" data-loc="Additional High-Quality Audio"

Of course, Steam Workshop is on there twice with IDs 30 and 51, because Valve...

Looks like category2 and category3 are both using the same shared "category" values. category1 likely is as well.

I haven't seen anywhere on the store site that directly lists genre IDs, but at least there's not too many of them to figure out individually.

On 2/6/2023 at 12:11 PM, Claude said:

and what's the meaning of "1" behind every category?

Product info is internally delivered as VDF, which doesn't have any concept of lists/arrays. So when Valve needs a list of values, they sometimes just encode it as "intended_value"     "1"

On 2/6/2023 at 12:11 PM, Claude said:

Also looking at the store page only 2 categories are shown: https://store.steampowered.com/app/48240
While the webapi returns 3 categories: https://store.steampowered.com/api/appdetails?appids=48240 (So i guess some category/genre names can be found out this way. But isn't there a better way?)

Valve is really good at creating systems that don't return output at all deterministically.

On 2/6/2023 at 12:11 PM, Claude said:

wtf?

Welcome to the adventure of dealing with Steam.

Posted (edited)
12 hours ago, Dr. McKay said:

I think it's probably just hardcoded directly into the Steam client. I haven't seen anything that would deliver category or genre names to the client dynamically. It looks like you can get category names from HTML on the search page under "narrow by feature" (e.g. I see data-param="category2" data-value="50" data-loc="Additional High-Quality Audio"

Looks like category2 and category3 are both using the same shared "category" values. category1 likely is as well.

I haven't seen anywhere on the store site that directly lists genre IDs, but at least there's not too many of them to figure out individually.

Product info is internally delivered as VDF, which doesn't have any concept of lists/arrays. So when Valve needs a list of values, they sometimes just encode it as "intended_value"     "1"

Thanks, awesome! Interesting how the store partitions them into different buckets.
After already scraping category-names of ~1200 games from store.steampowered.com/api/appdetails, your tips yielded three i didn't already know. great!

Those games, when querying the client (app_info_print), yield category id's undiscoverable via the store (api, search page and game pages): 12,33,45,46. (the latter two match 35% of the games, while the first tow match ~1% and ~5% respectively. at least to me there is no obvious pattern...)
Additionally i'm missing names of categories 3-5,11,26,34, plus anything above 53, if that exists. (also totally unknown to the store)

Also tried a quick grep to find category-names lying around in steam directories as plaintext. But alas no such luck 🥲

12 hours ago, Dr. McKay said:

Of course, Steam Workshop is on there twice with IDs 30 and 51, because Valve...

Funny! Did a quick check: out of ~1200 games, 2 match both, 12% match 30, zero match just 51, the rest don't support steam workshop. No clue as to why there are two categories though.

12 hours ago, Dr. McKay said:

Valve is really good at creating systems that don't return output at all deterministically.

Welcome to the adventure of dealing with Steam.

And there goes my illusion of valve being great at doing things... 😉 Well i have a guess: whats advertised vs whats actually supported 😎

Edited by Claude
fixed percentages

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...