Programs API data documentation
Automatically generated on 04.06.2015, Kim Viljanen
Introduction
This document describes the schema of the Programs API data.
The abstract level
On the abstract level, the world of TV and Radio programs consists of many kinds of things, such as TV programs and Radio programs (for example, a specific episode of “Frasier” or the movie “Rentun ruusu”), TV series and Radio series (such as “Frasier”, “Yle Uutiset”), brands (e.g. “Pikku Kakkonen”, “Yle”), TV seasons and Radio seasons, channels and services (e.g. “Yle Areena”, “YleX”, “Yle Fem”), people and organizations, music records (e.g. played during a radio broadcast), and so on.
There is also lot of information describing these things, such as the title of the program and the format (e.g., video or audio) of the program, and the broadcast time and channel for the specific program. More importantly, there may also be lots of relations involved, such as <this program> –is a part of–> <that series>, and <this music record> –was played in–> <that radio show>.
The following example depicts a few relations a TV program may have in Yle’s case:

In the image above, a specific TV program (episode) is part of a TV series. The TV Program has been created by a specific organization. The content subject of the program is described using vocabularies, by interlinking the program to descriptive concepts. The program has been both shown on a TV channel (scheduled transmission) and published via an ondemand service (ondemand publication).
There might also exist relations between things in the programs domain to other domains, such as newspaper articles mentioning a specific program, photographies shot during the production of the program, clips (e.g. trailer), and websites (such as the Wikipedia page of the “Frasier” series).
Linked data
To represent this multitude of different kinds of resources (the “things”) and the relations and other information involved, the Programs API uses a graph approach following the principles of Linked Data. Each resource is represented as a node in the graph and the resource can have relations to other nodes (e.g. “part of series” relation) and other attributes (e.g. title).
Each resource (node) is identified with a unique identifier (unique inside Yle’s data). In addition, each resource may have other attributes, such as the type of the resource (e.g. “TVProgram”) or the title, or have relations to other resources (nodes), such as <this program> –is part of–> <that series>.
The following example illustrates some of the information and relations of one episode of “Foyle’s War”:

The practical level
Each API request provides one viewpoint to the graph. When the client application requests data from the Programs API, the response is represented as a JSON object tree, which contains a selection of resources from the underlying data graph. The following image gives an overview of how an API request is processed. The data provided via the API is updated constantly based on changes in the background systems.

The JSON format follows the JSON-LD recommendation for serializing the linked data. As a general rule, each JSON object corresponds and represents one resource in the underlying linked data graph. The object / resource is identified with an identifier (the “id” field) and described with a type (e.g. “TVProgram”). In addition to these core attributes, the JSON object may contain additional attributes (e.g. “title”) and relations (e.g. “partOfSeries”) to other objects.
For example if the user requests all information about the program identified with the id “1-217500”, the response would be following (lots of detail omitted below):
{
"id":"1-217500",
"@id":"https://programs.api.yle.fi/v1/id/1-217500",
"type":"TVProgram",
"title":{"fi":"Ponille kyytia"}
"partOfSeries":{
"id":"1-105262",
"type":"TVSeries",
...
},
"publicationEvents":[ ... ]
...
}
To limit the size of the response, the amount of attributes may be reduced. Typically, on the root level of the JSON tree, the JSON objects contain more attributes and deeper in the tree the amount of attributes is reduced. If the client application needs to get the omitted information, the URL of the attribute “@id” can be used for requesting all information about the given resource.
The schema
The different attributes and the valid values for each attribute are defined in the Programs API data schema and are documented in this document (which you are now reading).
A few general remarks about the attributes:
-
All attributes are “global” among all results returned by the Programs API. They should be interpreted in the same way always when encountered in the data. For example, if a specific program and a specific series both have a attribute called “title”, the title represents the same information (=the title of that specific resource).
-
The value for each attribute is always represented in the same way, e.g. as JSON arrays or JSON objects. If the value of an attribute is sometimes an object, it will always be an object for that attribute.
-
Internationalized strings are represented as JSON objects where the key is the ISO language code for the language (e.g. “fi”) and the value is the string in that language. The language code is “unknown” if not known.
-
Attributes with no values are omitted from the result set. However, also attributes and their values which are considered less relevant for the specific API query at hand, may be omitted to minimize the size of the result.
The schema is built according to linked data practices and is following and is influenced by many existing metadata schemas, such as Schema.org, Dublin Core, and EBUCore. When possible, the relations between the Programs API data schema and external schemas have been or will be defined (e.g., Programs API’s title compared to Dublin core’s title). In addition, the JSON-LD Context definitions will later be published (work in progress), to make it possible for the user to automatically transform the Programs API data to an RDF representation.
Object types
All Program API data resources (serialized as JSON objects) are classified according to the following class hierarchy. The classes include, for example, “TVProgram” (subclass of “Program” and “TVContent”) and “ScheduledTransmission” (subclass of “PublicationEvent”).
The type of the resource (JSON object) is represented with the attribute type.

Additional details about each class will be added later to this documentation.
Attributes
Please note: The documentation below is not completed and many details are missing. Work in progress!
Core attributes
All JSON objects representing resources have a type. Typically all objects have a (unique) identifier and/or a (mnemonic, descriptive) key.
Example of core attributes (of a TV Program resource):
{
"id": "1-12345",
"type": "TVProgram"
...
}
“id”
title: Primary identifier for this resource
value type: string
JSON-LD Context: @id
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:identifier’
}
“@id”
title: API URL for fetching this resource
description: For fetching all data related to a specific resource (data object). To optimize the size of returned data, the JSON objects may contain only a selection of all available data. For example, objects deeper in the result tree (the JSON object tree) may be compressed to the most basic information, such as only the id of the resource.
value type: url
“key”
title: Human readable id
value type: string
“type”
title: Type of the resource
description: The nature (type) of the current JSON Object (resource), such as a TV Program, Radio Channel or an Organization. The possible type values are modelled as a class hierarchy where e.g. a TV Program and Radio Program has a common upper class, a Program.
value type: string
JSON-LD Context: @type
All other attributes
“addressCountry”
title: Country
value type: string
“addressLocality”
title: Post office
value type: string
“addressRegion”
title: Region/province/county
value type: string
“ageRating”
title: Age rating of the resource
value type: array
“ageRestriction”
title: Restricted under years (0 = no restriction)
value type: integer
“alternativeDescription”
title: Other description(s) of the resource
value type: array
value items: {
‘$ref’ => {
‘title’ => ‘Description of the resource’,
‘@context’ => {
‘@container’ => ‘@language’
},
‘rdf’ => {
‘rdfs:subPropertyOf’ => ‘dcterms:description’
},
‘$ref’ => ‘http://id.yle.fi/ns/yle-content-schema-v1.json#/definitions/_iString’
}
}
“alternativeId”
title: Alternative identifiers for this resource
value type: array
value items: {
‘pattern’ => ‘^\d+\-\S+$’,
‘type’ => ‘string’
}
“alternativeTitle”
title: Alternative titles
value type: array
value items: {
‘$ref’ => {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
}
JSON-LD Context: {
‘@container’ => ‘@language’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:title’
}
“amountOfEpisodes”
title: Amount of episodes
value type: integer
“amountOfItems”
title: Amount of items
value type: integer
“amountOfSeasons”
title: Amount of seasons
value type: integer
“audio”
title: Audio tracks of the resource
value type: array
value items: {
‘type’ => ‘object’
}
“availability”
title: Availablity
value type: string
“available”
title: Is the resource represented by this object available currently?
value type: boolean
“band”
title: The frequency band
value type: string
“broader”
title: Parent concept
value type: object
“collection”
title: The collection this resource belongs to
value type: string
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:partOf’
}
“conductor”
title: Conductor
value type: object
“content”
title: The content related to the current resource, e.g. the publication event.
“contentRating”
title: The content rating of the current resource
value type: object
“contributor”
title: Contributor of the resource
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:contributor’
}
“countryOfOrigin”
title: Country of origin of the resource
value type: array
“creator”
title: Creator of the resource
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:creator’
}
“delta”
title: Relational position of this resource
description: Relational position of this resource compared to other resources in the result set. For example, the current song played by the radio station (delta=0), the previous song (delta=-1) and the next song is (delta=1).
value type: integer
“description”
title: Description of the resource
inherited definition: {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
JSON-LD Context: {
‘@container’ => ‘@language’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:description’
}
“device”
title: Compatible device
value type: string
“displayOrder”
title: Recommended display order
description: This value can be used for displaying channels and other services in a logical order.
value type: integer
“duration”
title: Duration of the resource
description: Duration = endtime - starttime.
value type: string
“endTime”
value type: string
“episodeNumber”
title: Number of the episode this resource represents
value type: integer
“familyName”
title: Family name (last name) of the person.
value type: string
title: Technical format
description: For example, the video format of a VideoTrack can be HD.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:format’
}
title: This resource is a format version of another resource (same intellectual content)
description: A related resource that is substantially the same - the same intellectual content - as the described resource, but in another format.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:isFormatOf’
}
“frequency”
title: The frequency (inside the given band)
value type: number
“frequencyUnit”
title: Frequency unit
value type: string
“givenName”
title: Given name (first name) of the person.
value type: string
title: Format version of this resource (same intellectual content)
description: A related resource that is substantially the same - the same intellectual content - as the described resource, but in another format.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:hasFormat’
}
“hasPart”
title: This resource has an other part / other parts
value type: string
“hasVersion”
title: Has a related resource that is a version, edition, or adaptation of the current resource.
description: For example, this movie has a remake.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:hasVersion’
}
“homepage”
title: Homepage for this resource.
description: For example, the homepage of a TV or Radio channel.
value type: object
“image”
title: Primary image of the resource
inherited definition: {
‘type’ => ‘object’,
‘properties’ => {
‘title’ => {
‘$ref’ => ‘http://id.yle.fi/ns/yle-content-schema-v1.json#/definitions/_iString’
},
‘creator’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Image object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:description’
}
“inScheme”
title: Vocabulary identifier
description: The identifier key of the vocabulary this concept is part of. With the help of this key, the programmer can choose to use only those vocabularies that are relevant for ones application needs.
value type: string
RDF: {
‘rdfs:subPropertyOf’ => ‘skos:inScheme’
}
“interaction”
value type: array
value items: {
‘type’ => ‘object’
}
“itemTitle”
title: The episode / individual title
description: The title that identifies this specific resource, e.g. episode title of a program.
inherited definition: {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
JSON-LD Context: {
‘@container’ => ‘@language’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:title’
}
“items”
value type: array
value items: {
‘type’ => ‘object’
}
“language”
title: The language version(s) of the resource
value type: array
value items: {
‘type’ => ‘string’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:language’
}
“license”
title: License for using the resource
value type: string
“logo”
title: Logo of the resource
value type: object
“longDescription”
title: Long description of the resource
inherited definition: {
‘title’ => ‘Description of the resource’,
‘@context’ => {
‘@container’ => ‘@language’
},
‘rdf’ => {
‘rdfs:subPropertyOf’ => ‘dcterms:description’
},
‘$ref’ => {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
}
value type: object
“name”
title: Name of the agent/person/organization
value type: string
“narrower”
title: Child concept
value type: object
“operatingSystem”
title: Operating system
value type: string
“originalTitle”
title: Title of the resource
inherited definition: {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
JSON-LD Context: {
‘@container’ => ‘@language’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:title’
}
“outlet”
title: The available receiving/distribution methods of the service
description: For example, the outlets of a radio service may contain multiple different broadcast frequencies at different geographical locations, internet streaming services, mobile applications, among others.
value type: array
value items: {
‘type’ => ‘object’
}
“partOf”
title: Part of something
value type: object
“partOfSeason”
title: Part of season
value type: object
“partOfSeries”
title: Part of series
value type: object
title: Performer
value type: array
value items: {
‘type’ => ‘object’
}
“postOfficeBoxNumber”
title: Post office box number
value type: string
“postalCode”
title: Postal code
value type: string
“productionId”
title: Yle production identifier
description: This program (and potentially other programs) have been created as a result of a production identified with this production identifier.
value type: string
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:identifier’
}
“programGuide”
title: Program guide(s) for this resource.
description: For example, the program guide(s) of a TV or Radio channel.
value type: array
value items: {
‘type’ => ‘object’
}
“publicationEvent”
title: Publication events of this resource
value type: array
value items: {
‘type’ => ‘object’
}
“ratingSystem”
title: Rating System
value type: string
“reason”
title: Content rating reason
value type: array
“region”
title: Region
value type: string
title: related to
value type: object
“releaseDate”
title: Release date of the resource
value type: string
“restrictions”
title: Haittamerkinnät
value type: string
“season”
title: The seasons of this series
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:hasPart’
}
“seasonNumber”
title: The number of this season
description: Based on the original season numbering given by the producer of the series, if possible.
value type: integer
“seeAlso”
title: See also
description: Related, additional content
value type: array
value items: {
‘type’ => ‘object’
}
“service”
title: The publication service for this content
value type: object
“serviceProvider”
title: Service provider
value type: string
“shortDescription”
title: Short description of the resource
inherited definition: {
‘title’ => ‘Description of the resource’,
‘@context’ => {
‘@container’ => ‘@language’
},
‘rdf’ => {
‘rdfs:subPropertyOf’ => ‘dcterms:description’
},
‘$ref’ => {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
}
“startTime”
value type: string
“streetAddress”
title: Street address
value type: string
“subject”
title: The topic(s) of the resource
description: The content subject of the resource will be represented with controlled vocabularies / categorizations.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:subject’
}
“subtitling”
title: Subtitling tracks of the resource
value type: array
value items: {
‘type’ => ‘object’
}
“symbol”
title: Id object
value type: object
“targetAudience”
title: Target audience of the resource
value type: string
“teletextPage”
title: Teletext page number for subtitling
value type: integer
“temporalStatus”
title: Is this event in past, current or in future
value type: string
“title”
title: Title of the resource
description: The default, recommended title for this resource. Hint: This title should be useful in most cases, but e.g. in the case of programs consider also itemTitle and other titles.
inherited definition: {
‘patternProperties’ => {
‘^[a-z]{2,3}$’ => {
‘type’ => ‘string’
}
},
‘additionalProperties’ => bless( do{(my $o = 0)}, ‘JSON::XS::Boolean’ ),
‘type’ => ‘object’,
‘properties’ => {
‘unknown’ => {
‘type’ => ‘string’
}
},
‘title’ => ‘(Internal) Internationalized string’
}
JSON-LD Context: {
‘@container’ => ‘@language’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dc:title’
}
“topConcept”
title: Top concepts of the classification
value type: array
value items: {
‘type’ => ‘object’
}
“tracking”
title: Tracking for statistical purposes
value type: object
“typeCreative”
title: Type helper: the inherited creative type of the current type value. See: type
value type: string
title: Type helper: the inherited media type of the current type value. See: type
value type: string
“url”
title: URL of the object
value type: string
“value”
title: Value of the object
value type: string
“versionOf”
title: A related resource that is a version, edition, or adaptation of the described resource.
description: For example, this movie is a remake of the given movie.
value type: array
value items: {
‘type’ => ‘object’
}
RDF: {
‘rdfs:subPropertyOf’ => ‘dcterms:isVersionOf’
}
“video”
title: Video track of the resource
value type: object
“vocalist”
title: Vocalist
value type: array
value items: {
‘type’ => ‘object’
}
“webpage”
value type: string
RDF Schema mappings (experimental)
Schema mappings, serialized in RDF / Turtle format. (Please note, only existing mapping definitions are listed, may contain errors - there will be more soon. Work in progress!)
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix : <https://programs.api.yle.fi/v1/data-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
:itemTitle rdfs:subPropertyOf dc:title .
:contributor rdfs:subPropertyOf dcterms:contributor .
:language rdfs:subPropertyOf dcterms:language .
:format rdfs:subPropertyOf dcterms:format .
:title rdfs:subPropertyOf dc:title .
:alternativeTitle rdfs:subPropertyOf dc:title .
:image rdfs:subPropertyOf dcterms:description .
:hasVersion rdfs:subPropertyOf dcterms:hasVersion .
:versionOf rdfs:subPropertyOf dcterms:isVersionOf .
:productionId rdfs:subPropertyOf dc:identifier .
:hasFormat rdfs:subPropertyOf dcterms:hasFormat .
:description rdfs:subPropertyOf dcterms:description .
:subject rdfs:subPropertyOf dcterms:subject .
:collection rdfs:subPropertyOf dcterms:partOf .
:season rdfs:subPropertyOf dc:hasPart .
:inScheme rdfs:subPropertyOf skos:inScheme .
:creator rdfs:subPropertyOf dcterms:creator .
:id rdfs:subPropertyOf dc:identifier .
:formatOf rdfs:subPropertyOf dcterms:isFormatOf .
:originalTitle rdfs:subPropertyOf dc:title .
JSON-LD Context (experimental)
JSON-LD Context, serialized in JSON format. (Please note, only existing context definitions are listed, may contain errors - there will be more soon. Work in progress!)
{
"@base" : "https://programs.api.yle.fi/v1/id/",
"@vocab" : "https://programs.api.yle.fi/v1/data-schema#",
"alternativeTitle" : {
"@container" : "@language"
},
"description" : {
"@container" : "@language"
},
"id" : "@id",
"itemTitle" : {
"@container" : "@language"
},
"originalTitle" : {
"@container" : "@language"
},
"title" : {
"@container" : "@language"
},
"type" : "@type"
}