Skip to content
DocumentationAPI Reference

Get Available Markets

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

Get the list of markets where Spotify is available.

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

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

fun main() {
    val client: SpottedClient = SpottedOkHttpClient.fromEnv()

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