Using the TagStation API

Follow

The TagStation API is available for developers who wish to use the event data for their station in other contexts across the web. You can query information about what's played or what's playing now on the station and display that information however you'd like.

Before you get started, be sure to locate your API channel key from your station Settings page at the http://admin.tagstation.com. The key is in upper right corner. You won’t be able to make calls to the API without one. 

API Methods

To receive data in a particular format, modify your Accept header.

  • Accepted values: application/json, application/xml
  • Default: application/json

Now Playing
api-partner.tagstation.com/nowplaying/{{ APIChannelKey }}

Displays the most current event from your automation system.

Parameters

none

Response

single event or null


On Air Now
api-partner.tagstation.com/onairnow/{{ APIChannelKey }}

Displays the most current event from your Schedule.

Parameters

none

Response

single event or null


Recently Played
api-partner.tagstation.com/recentlyplayed/{{ APIChannelKey }}

Retrieves the last 25 events from given StartTime

Parameters
Response

array of multiple events; empty array when there are no events to satisfy the request

 

Radio Event Data Structure

PropertyTypeNotes
Category string Possible values: Default, Schedule, Campaign, Song
Album string Populated when Category = Song
Artist string Populated when Category = Song
SongName string Populated when Category = Song
ArtworkURLHi string 450x450 pixels
ArtworkURLLo string 170x170 pixels
Headline string Populated when Category != Song
Description string Populated when Category != Song
ShareURL string URL to event’s NextRadio sharing page
StartTime datetime Air date/time
Duration int Duration in milleseconds
NextPollTime datetime StartTime + Duration + Buffer
 
JSON
Radio Event
{
    Album: (string)
    Artist: (string)
    ArtworkURLHi: (string)
    ArtworkURLLo: (string)
    Category: (string)
    Description: (string)
    Duration: (int)
    Headline: (string)
    NextPollTime: (datetime)
    ShareURL: (string)
    SongName: (string)
    StartTime: (datetime)
}
Radio Events
[{RadioEvent}, {RadioEvent}, {RadioEvent}]
 
XML
Radio Event
<?xml version="1.0" encoding="utf-8"?>
<RadioEvent 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SongName>(string)</SongName>
    <Artist>(string)</Artist>
    <Album>(string)</Album>
    <Headline>(string)</Headline>
    <Description>(string)</Description>
    <ArtworkURLHi>(string)<ArtworkURLHi>
    <ArtworkURLLo>(string)</ArtworkURLLo>
    <ShareURL>(string)</ShareURL>
    <Category>(string)</Category>
    <StartTime>(datetime)</StartTime>
    <Duration>(int)</Duration>
    <NextPollTime>(datetime)</NextPollTime>
</RadioEvent>
Radio Events
<?xml version="1.0" encoding="utf-8"?>
<RadioEvents 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RadioEvent/>
    <RadioEvent/>
    <RadioEvent/>
 </RadioEvents>   
Have more questions? Submit a request

Comments

Powered by Zendesk