Storefronts
Access via musicKit.storefronts.
getAll(props?, raw?)
Section titled “getAll(props?, raw?)”List all available storefronts.
const storefronts = await musicKit.storefronts.getAll()Response
{ "status": 200, "data": [ { "id": "us", "explicitContentPolicy": "allowed", "name": "United States", "defaultLanguageTag": "en-US", "supportedLanguageTags": ["en-US", "es-MX"] }, { "id": "gb", "explicitContentPolicy": "allowed", "name": "United Kingdom", "defaultLanguageTag": "en-GB", "supportedLanguageTags": ["en-GB"] } ], "error": null}const raw = await musicKit.storefronts.getAll({}, true)Raw response
{ "status": 200, "data": [ { "id": "us", "type": "storefronts", "href": "/v1/storefronts/us", "attributes": { "explicitContentPolicy": "allowed", "name": "United States", "defaultLanguageTag": "en-US", "supportedLanguageTags": ["en-US", "es-MX"] } } ], "error": null}Filtering
Section titled “Filtering”Pass optional props to paginate or configure the response:
const result = await musicKit.storefronts.getAll({ limit: 5, offset: 0 })get(storefront, props?, raw?)
Section titled “get(storefront, props?, raw?)”Fetch a single storefront by its identifier (e.g. "us", "gb", "jp").
const storefront = await musicKit.storefronts.get("us")Response
{ "status": 200, "data": [ { "id": "us", "explicitContentPolicy": "allowed", "name": "United States", "defaultLanguageTag": "en-US", "supportedLanguageTags": ["en-US", "es-MX"] } ], "error": null}const raw = await musicKit.storefronts.get("us", {}, true)Returns the same shape as the raw getAll() response.