Lineup Airings (TV Grid)
/lineups/ /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. |
| stationId | No | One or more stationIds (comma-separated) for which to return grid information. 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. |
| 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. |
| 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. 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 |
| 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 |
| 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.
Sample Request 2``
Return basic primetime (8-11pm EDT) TV grid info for CNN, CNNHD, CSPAN, and HBO
Sample Response 1 - detailed size
Code