<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/MusicDataRequest/currentCountryCode",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit0A11DataRequestV18currentCountryCodeSSvpZ"
  },
  "title" : "currentCountryCode"
}
-->

# currentCountryCode

Fetches the current country code for the user’s Apple Music account.

```
static var currentCountryCode: String { get async throws }
```

## Discussion

The current country code may be useful to construct the URL for a
[`MusicDataRequest`](/documentation/MusicKit/MusicDataRequest) because a typical catalog endpoint for
Apple Music API requires the inclusion of a country code
in the path of the corresponding URL.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)