Skip to content
DocumentationAPI Reference

Get Available Markets

MarketListResponse markets().list(MarketListParamsparams = MarketListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/markets

Get the list of markets where Spotify is available.

ParametersExpand Collapse
MarketListParams params
ReturnsExpand Collapse
class MarketListResponse:
Optional<List<String>> markets

Get Available Markets

package dev.cjav.spotted.example;

import dev.cjav.spotted.client.SpottedClient;
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient;
import dev.cjav.spotted.models.markets.MarketListParams;
import dev.cjav.spotted.models.markets.MarketListResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        SpottedClient client = SpottedOkHttpClient.fromEnv();

        MarketListResponse markets = client.markets().list();
    }
}
{
  "markets": [
    "CA",
    "BR",
    "IT"
  ]
}
Returns Examples
{
  "markets": [
    "CA",
    "BR",
    "IT"
  ]
}