Petter Holt Juliussen • Mail | Mastodon | GitHub | Letterboxd

for later reference.

NRK

2019-04-04

Channels

List of available channels including EPG.

http://tvapi.nrk.no/v1/channels

Request must include header app-version-android (e.g. set to "999").

session = requests.Session()
session.headers['User-Agent'] = 'kodi.tv'
session.headers['app-version-android'] = '999'
r = session.get('http://tvapi.nrk.no/v1' + path)
[
    {
        "hasEpg": true,
        "isDistrictChannel": false,
        "mediaUrl": "https://httpcache...0.dna.qbrick.com/.../hls/nrk1/playlist.m3u8?bw_high=2000",
        "channelId": "nrk1",
        "imageId": "_IPfKxIl8dcL17topl0WZw0ESFU2ehg5UydOtgAFEyJg",
        "priority": 1,
        "epg": {...},
        "isLive": true,
        "title": "NRK1"
    },
    ...
]

Categories

List of possible categories with available filters.

http://tvapi.nrk.no/v1/categories

[
    {
        "displayValue": "Anbefalt",
        "categoryId": "all-programs",
        "availableFilters": [
            "POPULAR",
            "RECOMMENDED",
            "RECENT"
        ]
    },
    {
        "displayValue": "Dokumentar",
        "categoryId": "dokumentar",
        "availableFilters": [
            "POPULAR",
            "RECOMMENDED",
            "RECENT"
        ]
    },
    ...
]

Programs

List programs by category.

http://tvapi.nrk.no/v1/categories/natur/programs

List all elements by character in category.

https://tv.nrk.no/listobjects/indexelements/barn/page/0

Element details

http://v7.psapi.nrk.no/mediaelement/koid35003414
http://v7.psapi.nrk.no/mediaelement/KOIF41008605

All categories

http://tvapi.nrk.no/v1/categories/all-programs/recentlysentprograms
http://tvapi.nrk.no/v1/categories/all-programs/popularprograms
http://tvapi.nrk.no/v1/categories/all-programs/recommendedprograms

Specific category

http://tvapi.nrk.no/v1/categories/barn/recentlysentprograms
http://tvapi.nrk.no/v1/categories/barn/popularprograms
http://tvapi.nrk.no/v1/categories/barn/recommendedprograms