Skip to Content
The new glomex player is released! 🎉View upgrade guide
PublisherFeed API

Feed API

Introduction

The glomex Content API is a RESTful API that allows you to retrieve video content from the glomex Media Exchange Service (MES). This API is designed for publishers who want to integrate glomex video content into their websites or applications.

Authentication

To access the Content API, you need an API key. This key is provided to you by glomex when you register as a publisher. The API key must be included in all requests to the API.

Usage Policies

  • The Content API is a backend service that can be connected to any customer’s middleware or backoffice systems. Direct access by end-user applications (e.g., apps, players, etc.) is not allowed.
  • Keep the API key secret and well-protected. This especially means that you must not ship it to any end-user applications (e.g., apps, players, binaries, etc.).
  • All media content (e.g., teaser images, channel logos, etc.) must be served over links provided via the API and cannot be copied to customer systems.

API Description

The Content API provides several endpoints to retrieve video content:

  • Get feed by dates
  • Get a single video by ID
  • Get playlist or taxonomy videos

Get Feed by Dates

As the name indicates, the glomex Content API implements a content feed. The standard use case is to call it periodically and retrieve all video objects that were recently added or changed. This is implemented by the API route “Get feed by dates,” which is described in this chapter.

Request

You are free to specify the required time interval as needed by adding from and to timestamps to the request.

For proper handling of large result sets, the Content API implements paging. This means that the number of video objects contained in the JSON result will be limited to a reasonable number of objects. To indicate that more objects follow on the next page and to enable page retrieval, the API will return a next_page_token.

The following parameters can be appended as URL GET parameters:

ParameterTypeExampleDescription
api_keystringapi_key=GHZj9hgs8....customer specific APIkey (mandatory!)
fromUnixTimefrom=1479362157beginning of the time window the videos were created or modified. Default is to deliver all videos.
toUnixTimeend=1479375572end of the time window the videos were created or modified. If no date is given the default is “now”.
qstringq=starsRestricts the result set by executing a full text search for the given phrase within video titles and descriptions. Search phrase needs to be URLencoded. e.g. champions%20league
limitnumberlimit=200Limits the maximum number of results per result page
integration_idstringaj12san5ppstIntegration id (player configuration id) that will be used to generate oembed links.
next_page_tokenstringnext_page_token=cGbsj451a...Needs to be taken from the previous result page and tells the API to retrieve the next result page

Endpoint:

https://content-api-prod-eu-west-1.mes.glomex.cloud/feed?api_key=<APIkey>

Example:

Here’s an example of a complete API call, retrieving all video metadata which was added or changed since 06/28/2017 2:53pm (UTC) (equals to 1498661580 unix time stamp) with a page size of 50 videos:

GET https://content-api-prod-eu-west-1.mes.glomex.cloud/feed?api_key=xyz1y73v3g&limit=50&from=1479362157

Response

The API returns a JSON document with the following structure:

{ "generated_at": 1498492487, "limit": 50, "total": 4, "videos": [ { "clip_id": "v-bdpo8embs3uh", "tenant_id": "t-ru", "start_date": 1498449600, "end_date": null, "modified_at": 1498046330, "created_at": 1498038182, "titles": { "de": "Zum grünen Wald" }, "descriptions": { "de": "Im Restaurant \"Zum grünen Wald\" trifft gehobene französische Küche auf gutbürgerliche Speisen. Früher wurde noch vor Ort ein hauseigener Apfelwein hergestellt, heute wird er aus der Region bezogen. Hier ist für jeden etwas dabei." }, "clip_duration": 151640.0, "midroll_offsets": [ ], "language": "de", "keywords": [ { "keyword": "Mein Lokal" }, { "keyword": "Bombay Lounge" }, { "keyword": "Frankfurt" } ], "images": [ { "id": "i-bdqd1veugaw9", "titles": { "de": "Mein Lokal, Dein Lokal" }, "url": "https://imageservice.glomex.com/pis/glomex/6d64DVNXwntjQJEqED1IIp3sZ3lTlPudnEo084NJwCinTD2uZlJ70ZZC8fd1C3TpeFkuhW5t8_zwzEuhyVe5N0sFR3Ack3K_MQeAN2tFaGOmxhzqUxqsZD81pCpAZbjlYByqCyK_VGEUVaCs2vLzAKM/profile:original" } ], "taxonomies": { "categories": [ { "id": "tx-b5mmqcm19f29", "titles": { "de": "Auto & Motor", "en": "Cars & Motor" }, "images": { "category_image": { "id": "i-b6ljwqfbustd", "titles": { "de": "Cars & Motor", "en": "Cars & Motor" }, "url": "https://i3.glomex.com/pis/glomex/2981DVNXwntjQJE-bbaCWZwbsyE9wqZKNNnvAnGB7lo8ndHRDVVFGqujUdiDng8WIHUPhbP7PwszCD58a-6quq7Cw_ShbxvEdmLYH5N3o1skrajGfVkV_0DkVYTES2i5RRwdAZnY8darYVXZrBZkhaI/profile:original" } } } ], "format": [ { "id": "tx-b6qhmj5r6osp", "titles": { "de": "Café Puls", "en": "Café Puls" }, "images": { } } ], "genres": [ { "id": "tx-bb4yrrq2lv4x", "titles": { "de": "Show", "en": "Show" }, "images": { } } ], "video_types": [ { "id": "tx-b5mnxofejxyx", "titles": { "de": "Clip", "en": "Clip" } } ], "channel": [ { "id": "tx-b5ncjmdyz5jd", "titles": { "de": "kabel eins", "en": "kabel eins" }, "images": { "player_logo": { "id": "i-bc3ntn15sca9", "titles": { "de": "kabel eins", "en": "kabel eins" }, "url": "https://i2.glomex.com/pis/glomex/608eDVNXwntjQJE-bbaCWZwbsyE9wqZKNNnvAnGB7lo8ndHRDVVFGqujUdiDng8WIHUPhbP7PwszCD58a-6quq7Cw_ShbxvEdmLZ0KBc9jDLsCdK0CckWdljzVwn_vb-8NyVVFxo-SDTogzpACYk_jU/profile:original" }, "channel_logo": { "id": "i-b6a9hajc1nx5", "titles": { "de": "kabel eins", "en": "kabel eins" }, "url": "https://i3.glomex.com/pis/glomex/9c36DVNXwntjQJE-bbaCWZwbsyE9wqZKNNnvAnGB7lo8ndHRDVVFGqujUdiDng8WIHUPhbP7PwszCD58a-6quq7Cw_ShbxvEdmLZ0KBc9jHZHArYJHX8LOoTjzTb1wPkL-ov-mgMrM5mgL0jA0EU_bc/profile:original" } } } ] }, "oembed_url": "https://embed.mes.glomex.cloud/oembed.json?url=https%3A%2F%2Fexchange.glomex.com%2Fvideos%2Fv-bdpo8embs3uh%3FintegrationId%3Daj12san5ppst" } ] }

Video objects

videos field store an object list:

FieldTypeExampleDescription
videolist of objects"videos": [ { ... }, { ... }, ... ]List of video objects (see below for details)

Each video object consists of:

FieldTypeExampleDescription
clip_idstring"clip_id": "v-bdpo8embs3uh"Unique ID of this video clip
tenant_idstring"tenant_id": "t-ru"Content Owner ID
start_dateUnixtime"start_date": 1498449600Beginning of the time window where the clip may be viewed
end_dateUnixtime"end_date": nullEnd of the time window where the clip may be viewed (null means “not limited”
modified_atUnixtime"modified_at": 1498046330Last modification timestamp
created_atUnixtime"created_at": 1498038182Creation timestamp
titlesObject"titles": { "de": "Zum grĂĽnen Wald", "en": "Green forest" } Video title(s), might be given in multiple languages
descriptionsObject"descriptions": { "de": "Im Restaurant ...", "en": "Within the restaurant ..." }Video description, might be given in multiple languages
clip_durationNumber"clip_duration": 151640.0Clip duration in ms
midroll_offsetsObject"midroll_offsets": [ ]Midroll offest timestamps
languagestring"language": "de"Language of the video audio track
keywordsObject"keywords": [ {"keyword": "Mein Lokal"}, {"keyword": "Bombay Lounge"} ]List of keywords
imagesObject"images": [ { "id": "i-bdqd1veugaw9", "titles": {"de": "Mein Lokal, Dein Lokal" }, "url": "https://imageservice.glomex.com/..." } ]List of related images. Each containing a unique id, titles and a url
taxonomiesObject"taxonomies": { ... }See below for more details
oembed_urlstring"oembed_url": "https..."Oembed url to embed player (available only when integration_id is preconfigured for feed or provided with request).

Taxonomies

Taxonomies are used to classify the video. Depending on the data provided by the Content Owner, taxonomies may contain several objects describing the categorization of the video.

Object nameName in MESExamples
channelChannelsAFP, dpa, Copa90, neuwagen.de, Promiflash, ProSieben, Puls4, …
categoriesCategoriesCars & Motor, Celebrities, Cinema & TV, Fashion & Beauty, Food & Drink, Health & Fitness, Lifestyle & Docutainment, News, Social & Fun, Sport, Travel & Adventure
formatShowsAbenteuer Leben, AKTE, Galileo, Germany’s next Topmodel, The Voice of Germany, …
genresN/Ae.g. Action, Children & Family, Comedy, Documentary, Drama, Fantasy, Food, Infotainment, News, Reality, Science fiction, Series, Show, Sports, Thriller, Weather, …
video_typesN/ABonus Material, Clip (default), Deleted Scenes, Full Episode, Main Film, Livestream, Preview, Trailer

Each taxonomy is represented as a list of objects, meaning that a video could belong to e.g., two genres. Each of those objects consists of a unique id, titles in different languages, and optional images.

FieldTypeExampleDescription
video_typesObject"video_types": [ { "id": "tx-b5mnxofejxyx", "titles": {"de": "Clip"}}]Classification of Video type
channelObject"channel": [ { "id": "tx-b5ncjmdyz5jd", "titles": {"de": "kabel eins"} } ]MES channel
categoriesObject"categories": [ { "id": "tx-b5mmqcp0vy35", "titles": {"de": "Lifestyle & Dokutainment"} } ]MES Category
formatObject"format": [ { "id": "tx-b6qhmj5r6osp", "titles": {"de": "Café Puls"} } ]MES Show
genreObject"genre": [ { "id": "tx-bb4yrrq2lv4x", "titles": {"de": "Show"} } ]MES Genre
imagesObject"images": { "player_logo": {"id": "i-bc3ntn15sca9", "titles": { "de": "kabel eins"}, "url": "https:..." } }, "channel_logo": { "id": "i-b6a9hajc1nx5", "titles": {"de": "kabel eins"}, "url": "https:..." } }}List of related images, each containing Id, title and URL. player_logo is to be displayed within the player along with the video (Content Owner logo). channel_logo indicates the MES channel

Errors

In case of an error, the API will return a JSON document with the following structure:

{ "errors": { "api_key": [ "Invalid API key" ] }

Get a single video by id

If you already know the ID of a video, you can retrieve it directly using this endpoint.

Request

ParameterTypeExampleDescription
api_keystringapi_key=GHZj9hgs8....customer specific APIkey (mandatory!)
ClipIdstringv-123456Id of the Video Clip you want to request

Endpoint:

https://content-api-prod-eu-west-1.mes.glomex.cloud/videos/<clip_id>?api_key=<APIkey>

Example:

https://content-api-prod-eu-west-1.mes.glomex.cloud/videos/v-bdpo8embs3uh?api_key=GHZj9hgs8...

Response

The response format is the same as for the “Get feed by dates” endpoint, but it will only contain a single video object.

Get playlist or taxonomy videos

This endpoint allows you to retrieve videos that belong to a specific playlist or taxonomy.

Request

ParameterTypeExampleDescription
ContentIdstringpl-123456 or tx-123456Id of the playlist or taxonomy
api_keystringapi_key=GHZj9hgs8....customer specific APIkey (mandatory!)
fromUnixTimefrom=1479362157beginning of the time window the videos were created or modified. Default is to deliver all videos.
toUnixTimeend=1479375572end of the time window the videos were created or modified. If no date is given the default is “now”.
qstringq=starsRestricts the result set by executing a full text search for the given phrase within video titles and descriptions. Search phrase needs to be URLencoded. e.g. champions%20league
limitnumberlimit=200Limits the maximum number of results per result page
next_page_tokenstringnext_page_token=cGbsj451a...Needs to be taken from the previous result page and tells the API to retrieve the next result page

Endpoint:

https://content-api-prod-eu-west-1.mes.glomex.cloud/playlists/<playlist_id>/videos?api_key=<APIkey>

Examples:

GET https://content-api-prod-eu-west-1.mes.glomex.cloud/content/pl-123456?api_key=GHZj9hgs8... GET https://content-api-prod-eu-west-1.mes.glomex.cloud/content/tx-123456?api_key=GHZj9hgs8...

Response

The response format is the same as for the “Get feed by dates” endpoint.

Feed as Media RSS XML

We also support the output as a Media RSS XML. For more information, please contact us via service@glomex.com

Pre-filtered feeds

If you wish, glomex can prefilter your feed. The following filters are supported:

  • Language (e.g. “en”, “de”)
  • Channel (e.g. “ProSieben”)
  • Categories (e.g. “Celebrities”)
  • Show (e.g. “Germany’s Next Top Model”):
  • Keywords (e.g. “Meghan”, “Brexit” )

Please contact service@glomex.com or your glomex contact person for more information.

Last updated on