• Register

Lineup Airings (TV Grid)

/lineups/:lineupId/grid

Returns TV grid information for a specific lineupId. Optional stationId parameter allows restricting results to one or more stations. Optional size parameter allows basic control of program metadata returned. Optional channel types parameter excludes certain types of stations: non-HD, music (radio or music-only stations), ppv (pay-per-view), adult, premium.

Airing information can be requested up to 14 days in advance, for a maximum grid duration of 6 hours. Parameters for startDateTime and endDateTime should be specified on the hour or half-hour (e.g., 2:00 or 2:30, instead of 2:05 or 2:53) for best grid display and performance.

Response data will be grouped by channel, then sorted by startDateTime within channel. Programs already in progress at startDateTime will be included in response data. Grid information will vary based upon program types. 

Request Parameters

Parameter

Mandatory?

Description

lineupId

Yes

LineupId for which to return grid information. This ID can be obtained using Lineups by postal code.

stationId

No

One or more stationIds (comma-separated) for which to return grid information. This ID can be obtained using Lineup channel listing. If not specified, data will be returned for all stations in lineup.

startDateTime

Yes

DateTime to begin grid information, specified in ISO 8601 format.
Must be no more than 14 days after current dateTime.
See DateTime documentation for tips on formatting.

endDateTime

No

DateTime to end grid information, specified in ISO 8601 format.
Must be no more than 6 hours after startDateTime.
If not specified, defaults to 3 hours after startDateTime.
See DateTime documentation for tips on formatting.

size

No

Amount of program metadata to return. Valid values are Basic, Detailed and DetailedNoImage. Default value is Detailed. For smaller returns, specify Basic. The DetailedNoImage value is the same as Detailed but without image references in order to optimize the response time.

imageSize

No

Small, medium, large, master sizes are available.
Valid values are: Sm, Md, Lg, Ms. See Image Sizing for details.
If not specified, defaults to Md.
If requested image size is not available, generic image will be returned.

imageAspectTV

No

Requested aspect ratio (horizontal by vertical) for TV show images
Valid values are: 2x3, 3x4, 4x3, 16x9
If not specified, defaults to 2x3
If requested aspect ratio is not available, generic image will be returned.

imageText No

Boolean indicating preference for image types with text (banners) or without text (iconics). If requested preference is not available, image selection will continue to next type (banner/iconic), before finally returning generic if no image found. Defaults to true for text preference.

excludeChannels No Comma-separated list of channel types to exclude from response. Valid types are nonhd, music, ppv, adult, premium. Do not include spaces in list.
enhancedCallSign No Boolean (true/false) indicating whether to use display-friendly call signs in response. If true, callSign response field will include display-friendly call signs, where available.
Defaults to false.

api_key

Yes

24-character key obtained during application registration

Response Body

Response

size
Basic

size
Detailed

Description

channel x x channel number, omitted if stationId specified
callSign x x station call sign (e.g., WCIU)
stationId x x TMS-generated id; consistent for station across providers/lineups
preferredImage x x station logo, if available; see Image Metadata for details
airings x x Collection of program and schedule information, each with the following info:
startTime x x specified in UTC, offset must be applied for display in local time
endTime x x specified in UTC, offset must be applied for display in local time
duration x x number of airing minutes; calculated based on endTime - startTime
ratings x x ratings body and code (e.g., body=MPAA, code=PG-13); provided for US and Canadian ratings boards; not available for all airings
qualifiers x x comma-separated list of program qualifiers/notes (e.g., CC, Stereo, Live, New, HDTV)
program x x Object with the following properties:
tmsId x x TMS-generated 14-character alphanumeric identifier for program record; first 2 characters generally identify program type (MV=movie, SH=show/series, EP=episode, SP=sports event)
rootId x x numeric identifier used to connect related program records with different title language, description language, and versions
seriesId x x numeric identifier corresponding to rootId of series' main program record; all episode records of a single series will have same seriesId; omitted when program is not related to a series
subType x x program subtype; see Program Metadata for full list of subType values
title x x program title; for episode records, this is series title
titleLang x x 2-letter language abbreviation code (e.g., 'en'=English, 'es'=Spanish)
shortDescription
x x program description, maximum 100 characters
descriptionLang
x x 2-letter language abbreviation code (e.g., 'en'=English, 'es'=Spanish)
genres x x comma-separated list of program genres (e.g., Romance, Comedy, News)
eventTitle
x x sports only; for team events, includes team names and location (e.g., Kansas at Missouri); for non-team events, provides greater detail than common 'Title' field
organizationId x x sports only
sportsId x x sports only
origAirDate x x also known as OAD, date of original TV airing; format is yyyy-mm-dd
seasonNum x x episodes only; season number; will not be provided for non-seasonal shows such as soap operas
episodeNum x x episodes only; episode number within season
episodeTitle x x episodes only; episode-specific title
releaseYear x x movies only; year of theatrical movie release, formatted yyyy
releaseDate x x movies only; earliest date of theatrical movie release, formatted yyyy-mm-dd
entityType x x type of program: movie, show, episode, special
preferredImage x program image
longDescription x program description, maximum 250 characters for episodes and sports, max 500 characters for movies, max 1000 characters for shows
topCast x comma-separated list of top cast member names, in billing order
directors x comma-separated list of director names
qualityRating x movies only; object has these properties: ratingsBody, value;
value is a numeric rating; TMS has a 0.5 - 4.0 star rating system
gameDate x sports only; format is yyyy-mm-dd
teams x sports only; team ids, names, and logos
season x sports only;  includes season type (Reg, Pre, Post) and year

Sample Request 1

Return 3 hours of detailed TV grid info for all stations in lineup, starting from current dateTime.

http://data.tmsapi.com/v1.1/lineups/USA-NC32461-X/grid?startDateTime=2012-02-20T14:00Z&api_key=1234567890

Sample Request 2

Return basic primetime (8-11pm EDT) TV grid info for CNN, CNNHD, CSPAN, and HBO

http://data.tmsapi.com/v1.1/lineups/USA-NC32461-X/grid?startDateTime=2015-02-14T00:00Z&endDateTime=2015-02-14T03:00Z&stationId=10142,58646,10161,10240&size=Basic&api_key=1234567890

Sample Response 1 - detailed size


[
  {
    "stationId":"16715",
    "callSign":"POPSD",
    "channel":"000",
    "preferredImage":{
      "width":"360",
      "height":"270",
      "uri":"h3/NowShowing/16715/s16715_h3_aa.png",
      "category":"Logo",
      "primary":"true"
    },
    "airings":[
      {
        "startTime":"2015-02-14T00:00Z",
        "endTime":"2015-02-14T01:00Z",
        "duration":60,
        "qualifiers":["Stereo","CC"],
        "channels":["000"],
        "stationId":"16715",
        "ratings":[
          {
            "body":"USA Parental Rating",
            "code":"TV14"
          }
        ],
        "program":{
          "tmsId":"EP000044223045",
          "rootId":"11472718",
          "seriesId":"183904",
          "subType":"Series",
          "title":"The Young and the Restless",
          "releaseYear":2015,
          "releaseDate":"2015",
          "origAirDate":"2015-02-13",
          "titleLang":"en",
          "descriptionLang":"en",
          "entityType":"Episode",
          "genres":["Soap"],
          "shortDescription":"Drama revolves around three families in Genoa City.",
          "longDescription":"Drama revolves around three families in Genoa City.",
          "topCast":["Eric Braeden", "Melody Thomas Scott", "Peter Bergman"],
          "preferredImage":{
            "width":"240",
            "height":"360",
            "uri":"assets/p183904_b_v5_aa.jpg",
            "category":"Banner-L1",
            "text":"yes",
            "primary":"true",
            "tier":"Series"
          }
        }
      },
      {
        "startTime":"2015-02-14T01:00Z",
        "endTime":"2015-02-14T05:00Z",
        "duration":240,
        "qualifiers":["Stereo","CC","Tape"],
        "channels":["000"],
        "stationId":"16715",
        "ratings":[
          {
            "body":"FCC-TVPG (USA)",
            "code":"TVPG"
          }
        ],
        "program":{
          "tmsId":"SH017388940000",
          "rootId":"9973659",
          "seriesId":"9973659",
          "subType":"Special",
          "title":"The 57th Annual Grammy Awards",
          "releaseYear":2015,
          "releaseDate":"2015-02-08",
          "origAirDate":"2015-02-08",
          "titleLang":"en",
          "descriptionLang":"en",
          "entityType":"Show",
          "genres":["Music","Awards","Special"],
          "longDescription":"For the 57th year, the Recording Academy honors musical acts for their achievements in the industry. The ceremony, broadcast from the Staples Center in Los Angeles, will be hosted by entertainment icon LL Cool J. Scheduled performances include some of the industry's top artists: Eric Church, Ariana Grande, Ed Sheeran and Madonna. Beyoncé, Sam Smith and Pharrell Williams lead all artists with six nominations each, with all three in the running for Album of the Year -- considered the most-prestigious award at the ceremony -- along with Beck and Ed Sheeran.",
          "shortDescription":"LL Cool J hosts festivities in Los Angeles honoring excellence in the recording industry.",
          "topCast":["LL Cool J","Eric Church","Ariana Grande"],
          "directors":["Louis J. Horvitz"],
          "preferredImage":{
            "width":"240",
            "height":"360",
            "uri":"assets/p9973659_b_v5_aa.jpg",
            "category":"Banner-LO",
            "text":"yes",
            "primary":"true"
          }
        }
      }
    ]
  },
  {
    "stationId":"10162",
    "callSign":"CSPAN2",
    "channel":"001",
    "preferredImage":{
      "width":"360",
      "height":"270",
      "uri":"h3/NowShowing/10162/s10162_h3_aa.png",
      "category":"Logo",
      "primary":"true"
    },
    "airings":[
      {
        "startTime":"2015-02-13T23:00Z",
        "endTime":"2015-02-14T01:00Z",
        "duration":120,
        "qualifiers":["Stereo"],
        "channels":["001"],
        "stationId":"10162",
        "program":{
          "tmsId":"SH018079070000",
          "rootId":"10261471",
          "seriesId":"10261471",
          "subType":"Special",
          "title":"Key Capitol Hill Hearings",
          "releaseYear":2013,
          "releaseDate":"2013",
          "origAirDate":"2013-09-24",
          "titleLang":"en",
          "descriptionLang":"en",
          "entityType":"Show",
          "genres":["Special","Politics"],
          "longDescription":"Speeches from policy makers and coverage from around the country.",
          "shortDescription":"Speeches from policy makers and coverage from around the country.",
          "preferredImage":{
            "width":"240",
            "height":"360",
            "uri":"assets/p10261471_b_v5_aa.jpg",
            "category":"Banner-L3",
            "text":"yes",
            "primary":"true"
          }
        }
      },
      ... additional airings ...
   }
]

Sample Response 2 - basic size


[
  {
    "stationId":"10142",
    "callSign":"CNN",
    "preferredImage":{
      "width":"360",
      "height":"270",
      "uri":"h3/NowShowing/10142/s10142_h3_aa.png",
      "category":"Logo",
      "primary":"true"
    },
    "airings":[
      {
        "startTime":"2015-02-14T00:00Z",
        "endTime":"2015-02-14T01:00Z",
        "duration":60,
        "qualifiers":["New"],
        "stationId":"10142",
        "program":{
          "tmsId":"SH014781490000",
          "rootId":"8855245",
          "seriesId":"8855245",
          "subType":"Series",
          "title":"Erin Burnett OutFront",
          "releaseYear":2011,
          "releaseDate":"2011-10-04",
          "origAirDate":"2011-10-03",
          "titleLang":"en",
          "descriptionLang":"en",
          "entityType":"Show",
          "genres":["News"],
          "shortDescription":"News and current events."
        }
      },
      {
        "startTime":"2015-02-14T01:00Z",
        "endTime":"2015-02-14T02:00Z",
        "duration":60,
        "qualifiers":["New","CC"],
        "stationId":"10142",
        "program":{
          "tmsId":"SH006062990000",
          "rootId":"185440",
          "seriesId":"185440",
          "subType":"Series",
          "title":"Anderson Cooper 360",
          "releaseYear":2003,
          "releaseDate":"2003",
          "origAirDate":"2003-09-08",
          "titleLang":"en",
          "descriptionLang":"en",
          "entityType":"Show",
          "genres":["Talk","Newsmagazine"],
          "shortDescription":"Anchor Anderson Cooper reports in New York."
        }
      },
      {
        "startTime":"2015-02-14T02:00Z",
        "endTime":"2015-02-14T03:00Z",
        "duration":60,
        "stationId":"10142",
        "program":{
          "tmsId":"SH003118650000",
          "rootId":"606820",
          "seriesId":"606820",
          "subType":"Series",
          "title":"CNN Special Report",
          "releaseYear":1999,
          "releaseDate":"1999",
          "origAirDate":"1999-04-22",
          "titleLang":"en",
          "entityType":"Show",
          "genres":["News"]
        }
      }
    ]
  },
  {
    "stationId":"58646",
    "callSign":"CNNHD",
    "preferredImage":{
      "width":"360",
      "height":"270",
      "uri":"h3/NowShowing/58646/s58646_h3_aa.png",
      "category":"Logo",
      "primary":"true"
    },
    "airings":[
      {
        "startTime":"2015-02-14T00:00Z",
        "endTime":"2015-02-14T01:00Z",
        "duration":60,
        "qualifiers":["New","HDTV"],
        "stationId":"58646",
        "program":{
            ... additional programs and airings ...

        }
      }
    ]
  }
]