VRT MAX API - add-ons/plugin.video.vrt.nu GitHub Wiki
VRT MAX API documentation
The original discussion leading up to this is available in PR #57.
The VRT MAX API is using an ElasticSearch instance running on Amazon Cloudfront. The public API seems limited, like shown here: https://www.vrt.be/etc.clientlibs/vrtvideo/clientlibs/clientlib-webcomponents.js
Domains
The VRT MAX API is using the following domains:
- search7.vrt.be
Search API
The Search API gives access to all program info, e.g. https://search7.vrt.be/search?q=waes
The Search API only accepts GET requests and returns JSON information using content-type application/json.
Category listing
Program listing
- List specific item by programName: https://search7.vrt.be/search?size=150&facets[programName]=winteruur
- List specific item by programUrl: https://search7.vrt.be/search?size=150&facets[programUrl]=//www.vrt.be/vrtnu/a-z/winteruur/
Recent listing
- List 50 most recent episodes from ketnet: https://search7.vrt.be/search?i=video&size=50&facets[transcodingStatus]=AVAILABLE&facets[brands]=ketnet
Last chance
- List of videos that disappear soon: https://search7.vrt.be/search?size=150&facets[assetOffTime]=2021-09-09
This opens up the possibility list items that will disappear soon. We can have the same list filtered by programName for the "My programs" section. We can also list multiple dates:
- List multiple days: https://search7.vrt.be/search?size=150&facets[assetOffTime]=[2019-05-18,2019-05-19]&order=asc
The order will list programs based on broadcast date by default (newest first), or ascending (oldest first). If you list more than one date, it will sort first by date of removal, and then by broadcast date (which is highly inconvenient for us).
- Date format: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html
Everything
Dotted notation
You can use dot notation in facets to navigate a level deeper in the JSON data:
Suggest API
The Suggest API gives access to short program info, e.g. https://search7.vrt.be/suggest?q=waes
The Suggest API only accepts GET requests and returns JSON information using content-type application/json.
A-Z listing
- Example A-Z listing: https://search7.vrt.be/suggest?facets[transcodingStatus]=AVAILABLE
Category listing
- List all items for docu: https://search7.vrt.be/suggest?facets[categories]=docu
Episode listing
- Detect multiple seasons by facets/buckets in episode list: https://search7.vrt.be/search?i=video&size=150&facets[programUrl]=//www.vrt.be/vrtnu/a-z/fc-de-kampioenen/
- List episodes by season: https://search7.vrt.be/search?i=video&size=150&facets[programUrl]=//www.vrt.be/vrtnu/a-z/fc-de-kampioenen/&facets[seasonTitle]=2
VRT API parameters
This is a limited list, there are more parameters to be used. Check https://www.vrt.be/etc/clientlibs/components/search.js for more details.
i
- value: video or corporate
- index, select which index to search, to search VRT NU this value is always video, to search corporate vrt.be website, use corporate
- Defaults to
video
.
q
- query: keywords for your search query
size
- value: integer between 1 and 300
- size, number of results per page, maximum value is 300.
- Defaults to
10
.
from
- value: integer between 1 and ...
- from, the starting index of the hits to return, combined with parameter size you can browse all results.
- Defaults to
0
.
order
- value: desc or asc
- order: sort search results descending or ascending.
- Defaults to
desc
.
orderBy
- value: any key from the api
- sort search results by key
facets[key]=[values]
- value: keys and values from the api
- facets, narrow down results by providing keys and values, it is possible combine multiple "facets" in one query
- examples:
facets[brands]=[radio1,stubru]
facets[brands]=[een]&facets[formattedBroadcastShortDate]=18/02
highlight
- value: true or false
- Highlight query string in result. We use this for the search implementation in the plugin.
start
- value: date
- The start date for the results.
end
- value: date
- The end date for the results.
type
- value: types
- The type of content.
tags
- value: tags
- A list of tags.
available
- value: true or false
Facets
- allowedRegion
- one of: BE, WORLD
- assettOffTime
- assetStatus
- one of: AVAILABLE, NOT_AVAILABLE_YET
- brands or programBrands
- one of: een, canvas, ketnet, ketnet-jr, vrtnws, radio1, radio2, klara, stubru, mnm
- categories
- one of: audiodescriptie, cultuur, docu, entertainment, films, human-interest, humor, koken, lifestyle, met-gebarentaal, muziek, nieuw-en-actua, series, sport, talkshows, voor-kinderen, wetenschap-en-natuur
- formattedBroadcastShortDate
- programs
- programName
- programTags
- programTags.title
- programType
- one of: daily, oneoff, reeksaflopend, reeksoplopend
- programUrl
- seasons
- seasonTitle
- transcodingStatus
- one of: AVAILABLE
- whatsonId
- not a unique identifier, correspondends to a timeslot in a broadcast schedule: https://en.wikipedia.org/wiki/WHATS%27On_(Software)
- episodes with multiple versions (for audio description or Flemish Sign Language) have the same whatsonId
Restrictions
- Returned items are limited to a maximum of
150300 entries. - Maximum length of a raw HTTP Request URL is 8192 characters, you get a
HTTP Error 413
if you exceed this restriction. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html - Maximum items in a facet parameter: 1024 for instance
facet[duration]=[1,2,3,...,1024]
- Long API URLs with lots of query paramaters can result in an HTTP 400 Bad Request error, this still needs to be investigated
Screenshot API
- Eén: https://www.vrt.be/vrtnu-static/screenshots/een.jpg
- Canvas: https://www.vrt.be/vrtnu-static/screenshots/canvas.jpg
- Ketnet: https://www.vrt.be/vrtnu-static/screenshots/ketnet.jpg
EPG API
- EPG information: https://www.vrt.be/bin/epg/schedule.2021-09-09.json
Services API
This API is accessible through: https://services.vrt.be/
VideoPlayer live streams
Channel listing
These are the internal channel codes (e.g. as used for EPG):
- Eén: O8
- Canvas: 1H
- Ketnet: O9
Favorites API
- https://video-user-data.vrt.be/favorites
- https://video-user-data.vrt.be/favorites/vrtnuazbaptiste
- Payload:
{
"isFavorite": true,
"programUrl": "/vrtnu/a-z/baptiste/",
"title": "Baptiste",
"whatsonId": "696683115527",
"adobeCloudId": "8f5c5681-5caa-46a8-8d6b-a194a0c46e6b"
}
AEM JSON Exporter
You can get all VRT NU Website content as a json file.
Examples:
- Full VRT NU Homepage: https://www.vrt.be/vrtnu/jcr:content/par.model.json
- Popular on VRT NU item list: https://www.vrt.be/vrtnu/jcr:content/par/list.model.json
- VRT NU A-Z Catalog: https://www.vrt.be/vrtnu/a-z/jcr:content/par/glossary.model.json
- VRT NU Categorieën: https://www.vrt.be/vrtnu/categorieen/jcr:content/par/categories.model.json
- VRT NU Thuis program listing: https://www.vrt.be/vrtnu/a-z/thuis.model.json
Various other links
- Production release information: https://tms.vrt.be/launch-EN0e9fa5f66610469ebf0ca80ecefbc63f.min.js
- Search API information: https://www.vrt.be/etc.clientlibs/vrtvideo/clientlibs/clientlib-webcomponents.js
- Ad config: https://services.vrt.be/videoplayer/r/ad_config.json
- Manifest: https://www.vrt.be/etc.clientlibs/vrtvideo/clientlibs/clientlib-site/resources/manifest.json
Interesting errors
- https://search7.vrt.be/search?i=video&size=150&facets%5BbroadcastDate%5D=2019-04-25
- https://search7.vrt.be/search?facets%5BprogramUrl%5D=test&facets%5BprogramUrl%5D=test
- https://search7.vrt.be/search?i=video&facets%5Bx%5D%5Bx%5
- https://search7.vrt.be/search?facets[allowedRegion]=[BE,WORLD]&size=300&from=9901