Skip to content

XML feed reference

The XML feed is a daily list of all MEGOGO video objects that are open in one region. Use the feed to build and update your catalog. Use the Content API to get the stream and the data for one user.

Schema: megogo-catalog-feed.xsd (XML Schema 1.1).

Feed files

MEGOGO makes a separate feed for each partner. Your feed contains only the objects that you can show. The URL has this form:

https://xml.megogo.net/assets/files/{region}/{partner_number}/{file}
  • {region}: the code of your region (see the table below).
  • {partner_number}: the number of your partner account. It is the same value as partner_id in the /configuration response. MEGOGO gives you the full URL.

Use only the file all_mgg.xml. It contains all objects of your feed, except TV channels, music clips and news. MEGOGO can also remove some groups of objects from your feed with the settings of your partner account, for example live broadcasts or exclusive objects. Ask your MEGOGO manager which settings apply to you.

WARNING

Do not use the feed of the region without {partner_number}, for example …/files/ua/all_mgg.xml. It contains objects that your keys cannot play. Exception: Poland (see the note below the table of regions).

File Language of the text
all_mgg.xml Russian
all_mgg_ua.xml Ukrainian (region ua only)
all_mgg_pl.xml Polish (region pl only)

Regions ({region}), currencies and test feeds of the test partner accounts testprod_{region}:

Region Code Currency Test feed
Armenia am amd https://xml.megogo.net/assets/files/am/6206/all_mgg.xml
Azerbaijan az azn https://xml.megogo.net/assets/files/az/1841/all_mgg.xml
Estonia ee eur https://xml.megogo.net/assets/files/ee/3101/all_mgg.xml
Georgia ge gel https://xml.megogo.net/assets/files/ge/6286/all_mgg.xml
Kazakhstan kz kzt https://xml.megogo.net/assets/files/kz/1761/all_mgg.xml
Kyrgyzstan kg kgs https://xml.megogo.net/assets/files/kg/1661/all_mgg.xml
Latvia lv eur https://xml.megogo.net/assets/files/lv/5835/all_mgg.xml
Lithuania lt eur https://xml.megogo.net/assets/files/lt/3175/all_mgg.xml
Moldova md mdl https://xml.megogo.net/assets/files/md/3225/all_mgg.xml
Poland pl pln https://xml.megogo.net/assets/files/pl/all_mgg.xml (the region feed, see the note below)
Tajikistan tj tjs https://xml.megogo.net/assets/files/tj/2181/all_mgg.xml
Ukraine ua uah https://xml.megogo.net/assets/files/ua/2331/all_mgg.xml, in Ukrainian: https://xml.megogo.net/assets/files/ua/2331/all_mgg_ua.xml
Uzbekistan uz uzs https://xml.megogo.net/assets/files/uz/2591/all_mgg.xml
Other countries ww — https://xml.megogo.net/assets/files/ww/5745/all_mgg.xml

Update schedule

  • MEGOGO makes new files one time each day. Download the feed after 05:00 UTC. Until the new file is ready, the old file is available. All times in the feed are UTC.
  • Each new file replaces the full catalog. Objects can be added, removed or changed. Any field can change.
  • The first line after the XML declaration is a comment with the time of generation (UTC): ``.
  • Sometimes a new file is ready some hours later than usual. If the date in the comment is not the current date, keep your catalog as it is and download the feed again later, for example after one hour.
  • Update your catalog each day from the latest feed. Do not hide objects by closing_date: the next feed tells you which objects to remove.

Warning

Do not show an object that is not in the latest feed. The video of this object does not play.

Feed language

The text in the feed (titles, descriptions, category and language names) is in Russian. For Ukraine and Poland, there is also a feed in the local language (see Feed files).

Rules for the client

  • Ignore elements and attributes that this page does not describe. MEGOGO can add new elements and attributes. MEGOGO does not remove documented items without notice.
  • Ignore objects with a type value that your application does not support.
  • Use <distributions> to find how a user can get an object. Do not use only object@vod.
  • Use duration_sec for the duration. info@duration is free text.
  • The feed can be large (up to about 200 MB). Use a streaming XML parser.

Structure

<?xml version="1.0" encoding="UTF-8"?><objects>
  <object id="..." title="..." type="FILM" serial="false" vod="svod" ...>
    <qualities>...</qualities>
    <info .../>
    ...
    <distributions>...</distributions>
  </object>
  <object id="..." type="SERIAL" serial="true" ...>
    ...
    <season id="..." title="...">
      <seria id="..." index="1" .../>
    </season>
  </object>
</objects>

The order of child elements is not fixed.

object attributes

Attribute Required Description
id Yes Object ID. The same ID as id in the Content API
title Yes Title in the feed language
title_en No Original or international title. Can be empty
type Yes Object type: FILM, SERIAL, SHOW, SHOWFILM, MULTFILM, MULTSERIAL, FILMSERIAL. Other values can occur
serial Yes true: the object has seasons and episodes (<season>). false: the object is one video
vod Yes Main delivery rule: svod, tvod, dto, fvod, advod. See <distributions> for all rules
categories Yes Category names, separated by commas. The same names as in <categories>
genres Yes Genre names, separated by commas
page No Link to the object page on megogo.net

object child elements

Element Required Description
qualities/quality@value Yes Available video quality: SD, HD, Full HD, UHD. @hdr="true": HDR is available
info@year, @country, @duration Yes Year of release, countries (text), duration (free text)
categories/category Yes Category: @id and name
actors/actor, directors/director No Person: @id and name
like, dislike, comments_num No MEGOGO user counters
ratings@imdb, @imdb_id, @megogo No IMDb rating and ID. MEGOGO user rating from 0 to 10. 0 or empty: no rating
story Yes Description in the feed language (CDATA)
poster Yes Image URLs. See Images
gallery-image@url No Frames from the video. 0 or more elements
trailer No Trailer. See Trailers
age_limit No Minimum viewer age: 0, 6, 12, 16, 18
ios_allowed Yes 1: the rights let you show the object on mobile devices (all mobile platforms, not only iOS)
smart_tv_allowed Yes 1: the rights let you show the object on large screens (Smart TV, set-top boxes)
web_allowed Yes 1: the rights let you show the object on the web
protection Yes 0: no DRM. Any other value: the object has DRM. PMF = PlayReady, Modular (Widevine), FairPlay
closing_date Yes Planned end of the rights, UTC, ISO 8601. For information only: do not hide the object at this time
contract_id No ID of the rights contract. Use it only if MEGOGO tells you that some DRM objects are available to you only under specified contracts. Then show only the objects with these contract_id values
duration_sec Yes Duration in seconds. For series: sum of episodes or empty
finger_language No 1: sign language is available
audio_description No 1: an audio description track is available
audio_list/audio_lang No Audio tracks. Text: track name. @index: the same value as audio_tracks[].index in /stream
subtitles/subtitle_lang No Subtitle languages (names)
distributions Yes Delivery rules and prices. See Distributions
season For serial="true" Season. See Series

Images

poster attributes:

Attribute Always present Description
url, original Yes Vertical poster, proportion about 1 : 1.41. The size changes (500 × 706 to 2500 × 3525 px)
thumbnail, small Yes Vertical poster, 162 × 228 px
big Almost always Vertical poster, 300 × 423 px
fullscreen, original_wide Almost always Horizontal image 16 : 9 (1920 × 1080 to 3840 × 2160 px)
type215x120, type470x270 No Horizontal image, 215 × 120 and 470 × 270 px

The sizes can change. Do not make your layout depend on the exact pixel size.

Fit images in the frame and keep the proportions. Cut the edges if necessary.

Trailers

trailer attributes: id, title, duration_sec, age_limit, priority. An object has 0 or 1 trailer.

To play a trailer, send the trailer id to the Content API:

GET /v1/stream?video_id={trailer_id}&sign={sign}

You do not need a user access_token for a trailer.

Distributions

distributions has one distribution element for each delivery rule. For SVOD, there can be one distribution for each subscription (in the ua feed, up to 8).

distribution@vod_type Meaning price elements
svod In a subscription One for each subscription period
tvod Rent for a limited time One for each quality (HD, SD)
dto Purchase without a time limit. Show it to the user as "forever". watch_period is 5 or 10 years One for each quality (HD, SD)
fvod, advod Free in MEGOGO applications. In your application: part of the subscription None

price attributes:

Attribute Description
price Price in the currency of the region
currency Currency code (ISO 4217, lower case)
watch_period Access period in seconds
tariff_id Tariff ID
service_id The ID of the MEGOGO service. It can be different from your service IDs and from the IDs in /video/info
service_name Subscription name. SVOD only
quality Maximum quality for this price. TVOD and DTO only

Warning

The Content API gives the stream of an fvod or advod object without a user and without a subscription. Your subscription contains svod, fvod and advod objects. You must check the access of the user in your application before you request the stream.

CAUTION

The prices, tariff_id and service_id in the feed are MEGOGO tariffs. The tariffs of your partner services can have other IDs and prices. For example, the feed and the API gave the same TVOD price with different tariff IDs. Do not show these prices to your users and do not use these IDs in buyMovie. Get the prices and the tariff_id for buyMovie from /video/info.

Typical watch_period values:

watch_period (seconds) Period
172 800 48 hours
2 592 000 30 days
7 776 000 90 days
15 552 000 180 days
31 104 000 360 days
157 680 000 5 years (DTO)
315 360 000 10 years (DTO)

For DTO, show "forever".

Series

Objects with serial="true" have one or more season elements.

Element Attributes Description
season id, title Season
season/seria id, index, title, poster, duration_sec Episode. index is the episode number in the season
season/seria/qualities — Available quality of the episode

Only seria has a video. Use seria@id as video_id in /stream.

A season can have no seria elements. Do not show a season without episodes.