Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of genres (categories) on iTunes/the App Store #3

Closed
baltpeter opened this issue Jan 10, 2023 · 1 comment
Closed

List of genres (categories) on iTunes/the App Store #3

baltpeter opened this issue Jan 10, 2023 · 1 comment
Labels

Comments

@baltpeter
Copy link
Member

We need a list of all the possible categories (Apple internally calls them "genres") on the App Store.

@baltpeter
Copy link
Member Author

This one's easy: https://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/genres has a full list.

We are interested in first-level category 36 (App Store). The grab a list of all second-level subcategories (there are also third-level categories but only for "Games", "Magazines & Newspapers", "Stickers") :

const genreJson = await fetch('https://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/genres').then((r) =>
    r.json()
);

const appsGenres = genreJson[36];
if (appsGenres.name !== 'App Store') throw new Error('Unexpected API response.');

const subgenres = Object.values(appsGenres.subgenres).reduce((acc, cur) => ({ ...acc, [cur.name]: +cur.id }), {});
subgenres.all = 36;
console.log(subgenres);

That yields:

{
  "Business": 6000,
  "Weather": 6001,
  "Utilities": 6002,
  "Travel": 6003,
  "Sports": 6004,
  "Social Networking": 6005,
  "Reference": 6006,
  "Productivity": 6007,
  "Photo & Video": 6008,
  "News": 6009,
  "Navigation": 6010,
  "Music": 6011,
  "Lifestyle": 6012,
  "Health & Fitness": 6013,
  "Games": 6014,
  "Finance": 6015,
  "Entertainment": 6016,
  "Education": 6017,
  "Books": 6018,
  "Medical": 6020,
  "Magazines & Newspapers": 6021,
  "Catalogs": 6022,
  "Food & Drink": 6023,
  "Shopping": 6024,
  "Stickers": 6025,
  "Developer Tools": 6026,
  "Graphics & Design": 6027,
  "all": 36
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant