Logo

Docs

Stations

Endpoints

Station endpoint reference.

GET
/stations/{type}/{id}

Path Parameters

type*string

Resource type used as the station seed.

id*string

Resource id. This can be a local id or an OpenMusicMetadata id like omm:song:123456789.

Query Parameters

lang?string

Preferred language as a BCP 47 language tag.

include?string

Comma-separated relationships to include. Nested includes use dot notation and may be up to three levels deep from the root resource.

limit[{resource}:{relationship}]?integer

Limit an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example limit[album:tracks].

sort[{resource}:{relationship}]?string

Sort an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example sort[album:tracks]. Supports name, dateAdded, and minus-prefixed descending variants. Song and album relationships also support releaseDate and -releaseDate.

fields[station]?string

Comma-separated station fields.

fields[song]?string

Comma-separated song fields.

Response Body

application/json

application/json

curl -X GET "https://example.com/stations/song/123456789?lang=en-US&include=albums&limit%5B%7Bresource%7D%3A%7Brelationship%7D%5D=10&sort%5B%7Bresource%7D%3A%7Brelationship%7D%5D=name&fields%5Bstation%5D=name%2Cdescription&fields%5Bsong%5D=name%2CartworkUrl"
{  "data": {    "id": "station_artist_123",    "type": "station",    "attributes": {      "name": "Artist Station",      "seed": {        "kind": "resource",        "type": "artist",        "id": "artist_123"      }    }  }}
{  "error": {    "status": 100,    "message": "string",    "details": [      {        "message": "string",        "param": "string",        "value": null      }    ],    "requestId": "string"  }}
GET
/stations/genres/{name}

Path Parameters

name*string

Query Parameters

lang?string

Preferred language as a BCP 47 language tag.

include?string

Comma-separated relationships to include. Nested includes use dot notation and may be up to three levels deep from the root resource.

limit[{resource}:{relationship}]?integer

Limit an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example limit[album:tracks].

sort[{resource}:{relationship}]?string

Sort an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example sort[album:tracks]. Supports name, dateAdded, and minus-prefixed descending variants. Song and album relationships also support releaseDate and -releaseDate.

fields[station]?string

Comma-separated station fields.

fields[song]?string

Comma-separated song fields.

Response Body

application/json

application/json

curl -X GET "https://example.com/stations/genres/string?lang=en-US&include=albums&limit%5B%7Bresource%7D%3A%7Brelationship%7D%5D=10&sort%5B%7Bresource%7D%3A%7Brelationship%7D%5D=name&fields%5Bstation%5D=name%2Cdescription&fields%5Bsong%5D=name%2CartworkUrl"
{  "data": {    "id": "station_genre_jazz",    "type": "station",    "attributes": {      "name": "Jazz Station",      "seed": {        "kind": "genre",        "name": "jazz"      }    }  }}
{  "error": {    "status": 100,    "message": "string",    "details": [      {        "message": "string",        "param": "string",        "value": null      }    ],    "requestId": "string"  }}
GET
/stations/popular

Query Parameters

lang?string

Preferred language as a BCP 47 language tag.

include?string

Comma-separated relationships to include. Nested includes use dot notation and may be up to three levels deep from the root resource.

limit[{resource}:{relationship}]?integer

Limit an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example limit[album:tracks].

sort[{resource}:{relationship}]?string

Sort an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example sort[album:tracks]. Supports name, dateAdded, and minus-prefixed descending variants. Song and album relationships also support releaseDate and -releaseDate.

fields[station]?string

Comma-separated station fields.

fields[song]?string

Comma-separated song fields.

Response Body

application/json

application/json

curl -X GET "https://example.com/stations/popular?lang=en-US&include=albums&limit%5B%7Bresource%7D%3A%7Brelationship%7D%5D=10&sort%5B%7Bresource%7D%3A%7Brelationship%7D%5D=name&fields%5Bstation%5D=name%2Cdescription&fields%5Bsong%5D=name%2CartworkUrl"
{  "data": {    "id": "station_popular",    "type": "station",    "attributes": {      "name": "Popular",      "seed": {        "kind": "popular"      }    }  }}
{  "error": {    "status": 100,    "message": "string",    "details": [      {        "message": "string",        "param": "string",        "value": null      }    ],    "requestId": "string"  }}
GET
/station/{id}

Path Parameters

id*string

Resource id. This can be a local id or an OpenMusicMetadata id like omm:song:123456789.

Query Parameters

lang?string

Preferred language as a BCP 47 language tag.

include?string

Comma-separated relationships to include. Nested includes use dot notation and may be up to three levels deep from the root resource.

limit[{resource}:{relationship}]?integer

Limit an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example limit[album:tracks].

sort[{resource}:{relationship}]?string

Sort an included relationship. Replace {resource}:{relationship} with the singular resource type and relationship name, for example sort[album:tracks]. Supports name, dateAdded, and minus-prefixed descending variants. Song and album relationships also support releaseDate and -releaseDate.

fields[station]?string

Comma-separated station fields.

fields[song]?string

Comma-separated song fields.

Response Body

application/json

application/json

curl -X GET "https://example.com/station/123456789?lang=en-US&include=albums&limit%5B%7Bresource%7D%3A%7Brelationship%7D%5D=10&sort%5B%7Bresource%7D%3A%7Brelationship%7D%5D=name&fields%5Bstation%5D=name%2Cdescription&fields%5Bsong%5D=name%2CartworkUrl"
{  "data": {    "id": "station_custom_123",    "type": "station",    "attributes": {      "name": "Custom Station",      "seed": {        "kind": "custom"      }    }  }}
{  "error": {    "status": 100,    "message": "string",    "details": [      {        "message": "string",        "param": "string",        "value": null      }    ],    "requestId": "string"  }}
GET
/station/{id}/tracks

Path Parameters

id*string

Resource id. This can be a local id or an OpenMusicMetadata id like omm:song:123456789.

Query Parameters

lang?string

Preferred language as a BCP 47 language tag.

fields[song]?string

Comma-separated song fields.

limit?integer

Maximum number of resources to return. The usual maximum is 100.

offset?integer

Number of resources to skip.

sort?string

Sort field. Supports name, dateAdded, and minus-prefixed descending variants. dateAdded is the date the resource was added to the server. Song and album result sets also support releaseDate and -releaseDate.

Response Body

application/json

application/json

curl -X GET "https://example.com/station/123456789/tracks?lang=en-US&fields%5Bsong%5D=name%2CartworkUrl&sort=name"
{  "data": [    {      "id": "123456789",      "type": "song",      "attributes": {        "name": "string",        "files": {          "preferred": {            "id": "string",            "lossless": true,            "mimeType": "audio/flac",            "sizeBytes": 0,            "durationMs": 0,            "streamUrl": "http://example.com",            "downloadUrl": "http://example.com",            "codec": "flac",            "bitrateKbps": 0,            "sampleRateHz": 0,            "channels": 1          },          "alternatives": [            {              "id": "string",              "lossless": true,              "mimeType": "audio/flac",              "sizeBytes": 0,              "durationMs": 0,              "streamUrl": "http://example.com",              "downloadUrl": "http://example.com",              "codec": "flac",              "bitrateKbps": 0,              "sampleRateHz": 0,              "channels": 1            }          ]        },        "albumName": "string",        "artistName": "string",        "isrc": "string",        "artworkUrl": "string",        "trackNumber": 1,        "discNumber": 1,        "genres": [          "string"        ],        "releaseDate": "string",        "durationMs": 0,        "lyrics": {          "lang": "en-US",          "text": "string",          "ttml": "string"        }      },      "relationships": {        "albums": {          "data": [            {              "id": "123456789",              "type": "album",              "attributes": {                "name": "string",                "trackCount": 0,                "artistName": "string",                "artworkUrl": "string",                "upc": "string",                "genres": [                  "string"                ],                "releaseDate": "string"              },              "relationships": {                "tracks": {                  "data": [],                  "meta": {                    "limit": 0,                    "offset": 0,                    "total": 0                  }                },                "artists": {                  "data": [                    {                      "id": "123456789",                      "type": "artist",                      "attributes": {                        "name": "string",                        "artworkUrl": "string"                      },                      "relationships": {                        "tracks": {                          "data": [],                          "meta": {                            "limit": 0,                            "offset": 0,                            "total": 0                          }                        },                        "albums": {                          "data": [],                          "meta": {                            "limit": 0,                            "offset": 0,                            "total": 0                          }                        }                      }                    }                  ],                  "meta": {                    "limit": 0,                    "offset": 0,                    "total": 0                  }                }              }            }          ],          "meta": {            "limit": 0,            "offset": 0,            "total": 0          }        },        "artists": {          "data": [            {              "id": "123456789",              "type": "artist",              "attributes": {                "name": "string",                "artworkUrl": "string"              },              "relationships": {                "tracks": {                  "data": [],                  "meta": {                    "limit": 0,                    "offset": 0,                    "total": 0                  }                },                "albums": {                  "data": [                    {                      "id": "123456789",                      "type": "album",                      "attributes": {                        "name": "string",                        "trackCount": 0,                        "artistName": "string",                        "artworkUrl": "string",                        "upc": "string",                        "genres": [                          "string"                        ],                        "releaseDate": "string"                      },                      "relationships": {                        "tracks": {                          "data": [],                          "meta": {                            "limit": 0,                            "offset": 0,                            "total": 0                          }                        },                        "artists": {                          "data": [],                          "meta": {                            "limit": 0,                            "offset": 0,                            "total": 0                          }                        }                      }                    }                  ],                  "meta": {                    "limit": 0,                    "offset": 0,                    "total": 0                  }                }              }            }          ],          "meta": {            "limit": 0,            "offset": 0,            "total": 0          }        }      }    }  ],  "meta": {    "limit": 0,    "offset": 0,    "total": 0  }}
{  "error": {    "status": 100,    "message": "string",    "details": [      {        "message": "string",        "param": "string",        "value": null      }    ],    "requestId": "string"  }}