Markets Endpoint Reference

Functions

async get_available_markets(client: SpotanticClient) APICallModel[GetAvailableMarketsRequest, JsonAPIResponse, list[SpotifyMarketID]]

Get the list of markets where Spotify is available.

Deprecated since version 0.1.0: This endpoint is deprecated since 11 February 2026 for new users. Existing users may be able to continue using it. More information on the deprecation can be found in the Spotify API documentation: Update on Developer Access and Platform Security.

Parameters:

clientSpotanticClient instance.

Returns:

An object containing the request used to obtain the response, the retrieved data and parsed data as model.

Request models

class GetAvailableMarketsRequest(*, required_scopes: set[AuthScope] = <factory>, url: HttpUrl | None = None, endpoint: str | None = 'markets', method_type: HTTPMethod = <HTTPMethod.GET>, headers: RequestHeadersModel = <factory>, params: None = None, body: None = None)

Bases: RequestModel[NoneType, NoneType]

Request model for Get Available Markets endpoint.

classmethod build() GetAvailableMarketsRequest

Builds a request model based on given parameters.

The function automatically determines the endpoint if it is not static. Also, it automatically assigns parameters to request query or body.

Returns:

Validated Request object.

endpoint: str | None

Endpoint associated with the request.

method_type: HTTPMethod

HTTP method for the request.