Skip to content

Instantly share code, notes, and snippets.

@timschneeb
Last active October 18, 2021 20:36
Show Gist options
  • Save timschneeb/06be7123047cc8a5c2ee53e34f9dbc74 to your computer and use it in GitHub Desktop.
Save timschneeb/06be7123047cc8a5c2ee53e34f9dbc74 to your computer and use it in GitHub Desktop.
MTV API Unofficial Documentation (Reverse Engineering)

API Reverse Engineering (MTV/South Park)

Base URL

Production Server:

https://api.mtvnn.com/v2/

Staging Server:

https://staging.sensei.mtvnn.com/v2/

URL Scheme:

https://api.mtvnn.com/v2/site/<APIKEY>/<COUNTRYID>/...
API Keys
Country ID API Key
BE/NL/LU w3ap440ada
DE/AT/CH z9pce5mcsm
SE/DK wzni63gbjz
PL ejn2gf7esh

Operations

Get single episode

GET /{Language}/episodes/{EpisodeID}.json

Get episodes

GET /{Language}/franchises/{FranchiseID}/episodes.json?page=0&per=10000

Get info page

GET /{Language}/content_blocks/{InfoType}{Language}.json

Get next episode release data

GET /{Language}/content_blocks/wla_upcoming_content_{Language}.json

Get playlist

GET /{Language}/local_playlists/{PlaylistID}.json?video_format=m3u8

Get season by ID

GET {Language}/franchises/{FranchiseID}/shows/seasons/{SeasonID}/episodes.json

Get seasons

GET /{Language}/franchises/{FranchiseID}/shows/seasons.json?page=0&per=100

Get teaser collection

GET /{Language}/teaser_collections.json?details=true&language_fallback=true

URL Parts

  • {Franchise ID}: 471 (-> South Park)

  • {Language}:

    Country ID {Language}
    SE/DK en
    BE/NL/LU nl
    DE/AT/CH de
    PL pl
  • {SeasonID}: You can get this ID by requesting for example seasons.json using the appropriate Season ID.

  • {PlaylistID}: You can get this ID by requesting an API call which returns episode details.

  • {InfoType}: Type of the info page

    Description Value
    Behavioral Ad Delivery Policy wla_oba_
    Imprint and Support wla_imprint_
    Copyright wla_copyright_
    Privacy Policy wla_privacy_
    Terms and Conditions wla_tcs_

Get M3U8 playlist

We need to get a link to the playlist file, but to do that we also need the Playlist ID of the episode.

You can get this id by calling for example:

GET /{Language}/episodes/{EpisodeID}.json

Look in the JSON response for a local_playlist object. The value of the key id is in this case the playlist id. Next, we can call another api function to get the url to the m3u8 file:

GET /{Language}/local_playlists/{PlaylistID}.json?video_format=m3u8

This time, you can find the value in the local_playlist_videos object, next to the key url.

However, this is not the actual playlist file we want. This file contains several links to the 'real' m3u8 files, every link should point to a playlist/hls-stream with a different resolution/quality factor.

Follow one of these links (preferably the most highest quality one) and you have the m3u8 playlist file of the requested episode.


Written by ThePBone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment