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

Feed API

Introduction

The glomex Feed 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 Feed 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 Feed API is rate-limited to protect our services from abuse. Please contact us if you need higher limits.
  • Do not share your API key with others.
  • Cache responses when appropriate to reduce load on our servers.

API Description

The Feed API provides several endpoints to retrieve video content:

  • Get feed by dates
  • Get 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 which were recently added or changed. This is implemented by the API route “Get feed by dates” which is described in this chapter.

Request

You’re 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. As an indication that more objects follow on the next page and to enable page retrieval, the API will return a next_page_token.

Request Parameters

  • api_key (string, mandatory)

    • Your customer-specific API key
    • Example: api_key=GHZj9hgs8....
  • from (UnixTime)

    • Beginning of the time window the videos were created or modified
    • Default is to deliver all videos
    • Example: from=1479362157
  • to (UnixTime)

    • End of the time window the videos were created or modified
    • Default is “now” if no date is given
    • Example: to=1479375572
  • q (string)

    • Restricts the result set by executing a full text search for the given phrase within video titles and descriptions
    • Search phrase needs to be URL-encoded
    • Example: q=stars or q=champions%20league
  • limit (number)

    • Limits the maximum number of results per result page
    • Example: limit=200
  • integration_id (string)

    • Integration ID (player configuration ID) that will be used to generate oembed links
    • Example: integration_id=aj12san5ppst
  • next_page_token (string)

    • Needs to be taken from the previous result page and tells the API to retrieve the next result page
    • Example: next_page_token=cGbsj451a...

Endpoint:

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

Example:

https://content-api-prod-eu-west-1.mes.glomex.cloud/feed?api_key=GHZj9hgs8...&from=1479362157&to=1479375572&limit=200

Response

The API returns a JSON document with the following structure:

{ "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", "en": "Green forest" }, "descriptions": { "de": "Im Restaurant ...", "en": "Within the restaurant ..." }, "clip_duration": 151640.0, "midroll_offsets": [], "language": "de", "keywords": [ { "keyword": "Mein Lokal" }, { "keyword": "Bombay Lounge" } ], "images": [ { "id": "i-bdqd1veugaw9", "titles": { "de": "Mein Lokal, Dein Lokal" }, "url": "https://imageservice.glomex.com/..." } ], "taxonomies": { "video_types": [ { "id": "tx-b5mnxofejxyx", "titles": { "de": "Clip" } } ], "channel": [ { "id": "tx-b5ncjmdyz5jd", "titles": { "de": "kabel eins" } } ], "categories": [ { "id": "tx-b5mmqcp0vy35", "titles": { "de": "Lifestyle & Dokutainment" } } ], "format": [ { "id": "tx-b6qhmj5r6osp", "titles": { "de": "Café Puls" } } ], "genre": [ { "id": "tx-bb4yrrq2lv4x", "titles": { "de": "Show" } } ], "images": { "player_logo": { "id": "i-bc3ntn15sca9", "titles": { "de": "kabel eins" }, "url": "https://..." }, "channel_logo": { "id": "i-b6a9hajc1nx5", "titles": { "de": "kabel eins" }, "url": "https://..." } } }, "oembed_url": "https://embed.mes.glomex.cloud/oembed.json?url=..." } ], "limit": 50, "total": 4, "next_page_token": "cGbsj451a..." }

Response Fields

  • videos (array)

    • List of video objects (see below for details)
    • Example: "videos": [ { ... }, { ... }, ... ]
  • limit (number)

    • Requested page limit
    • Example: 50
  • total (number)

    • Total number of video objects contained within the result (can be larger than “limit” due to paging)
    • Example: 4
  • next_page_token (string)

    • Needs to be provided to the subsequent API call to retrieve the next result page
    • Example: "cGbsj451a..."

Video Objects

Each video object in the videos array consists of:

  • clip_id (string)

    • Unique ID of this video clip
    • Example: "v-bdpo8embs3uh"
  • tenant_id (string)

    • Content Owner ID
    • Example: "t-ru"
  • start_date (Unixtime)

    • Beginning of the time window where the clip may be viewed
    • Example: 1498449600
  • end_date (Unixtime)

    • End of the time window where the clip may be viewed (null means “not limited”)
    • Example: null
  • modified_at (Unixtime)

    • Last modification timestamp
    • Example: 1498046330
  • created_at (Unixtime)

    • Creation timestamp
    • Example: 1498038182
  • titles (Object)

    • Video title(s), might be given in multiple languages
    • Example: "titles": { "de": "Zum grĂĽnen Wald", "en": "Green forest" }
  • descriptions (Object)

    • Video description, might be given in multiple languages
    • Example: "descriptions": { "de": "Im Restaurant ...", "en": "Within the restaurant ..." }
  • clip_duration (Number)

    • Clip duration in ms
    • Example: 151640.0
  • midroll_offsets (Object)

    • Midroll offset timestamps
    • Example: []
  • language (string)

    • Language of the video audio track
    • Example: "de"
  • keywords (Object)

    • List of keywords
    • Example: "keywords": [ {"keyword": "Mein Lokal"}, {"keyword": "Bombay Lounge"} ]
  • images (Object)

    • List of related images. Each containing a unique id, titles and a url
    • Example: "images": [ { "id": "i-bdqd1veugaw9", "titles": {"de": "Mein Lokal, Dein Lokal" }, "url": "https://imageservice.glomex.com/..." } ]
  • taxonomies (Object)

    • See below for more details
    • Example: "taxonomies": { ... }
  • oembed_url (string)

    • Oembed url to embed player (available only when integration_id is preconfigured for feed or provided with request)
    • Example: "https://embed.mes.glomex.cloud/oembed.json?url=..."

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.

Taxonomy Types
  • channel (Channels in MES)

    • Examples: AFP, dpa, Copa90, neuwagen.de, Promiflash, ProSieben, Puls4, …
    • Format: "channel": [ { "id": "tx-b5ncjmdyz5jd", "titles": {"de": "kabel eins"} }]
  • categories (Categories in MES)

    • Examples: Cars & Motor, Celebrities, Cinema & TV, Fashion & Beauty, Food & Drink, Health & Fitness, Lifestyle & Docutainment, News, Social & Fun, Sport, Travel & Adventure
    • Format: "categories": [ { "id": "tx-b5mmqcp0vy35", "titles": {"de": "Lifestyle & Dokutainment"} }]
  • format (Shows in MES)

    • Examples: Abenteuer Leben, AKTE, Galileo, Germany’s next Topmodel, The Voice of Germany, …
    • Format: "format": [ { "id": "tx-b6qhmj5r6osp", "titles": {"de": "CafĂ© Puls"} }]
  • genre (N/A in MES)

    • Examples: Action, Children & Family, Comedy, Documentary, Drama, Fantasy, Food, Infotainment, News, Reality, Science fiction, Series, Show, Sports, Thriller, Weather, …
    • Format: "genre": [ { "id": "tx-bb4yrrq2lv4x", "titles": {"de": "Show"} }]
    • For a complete list, please refer to MES Onboarding Guide - Appendix
  • video_types (N/A in MES)

    • Examples: Bonus Material, Clip (default), Deleted Scenes, Full Episode, Main Film, Livestream, Preview, Trailer
    • Format: "video_types": [{ "id": "tx-b5mnxofejxyx", "titles": {"de": "Clip"} }]
    • For a complete list, please refer to MES Onboarding Guide - Appendix
  • images (related to taxonomies)

    • Format: "images": { "player_logo": {"id": "i-bc3ntn15sca9", "titles": { "de": "kabel eins"}, "url": "https:..." }, "channel_logo": { "id": "i-b6a9hajc1nx5", "titles": {"de": "kabel eins"}, "url": "https:..." } }
    • Contains:
      • player_logo: to be displayed within the player along with the video (Content Owner logo)
      • channel_logo: indicates the MES channel

The values of the taxonomies will change over time, e.g., when we introduce new categories or channels. For the most current values, please refer to either:

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.

Errors

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

{ "error": { "code": 400, "message": "Invalid API key" } }

Get Single Video by ID

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

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...

Request Parameters

  • api_key (string, mandatory)

    • Your customer-specific API key
    • Example: api_key=GHZj9hgs8....
  • integration_id (string)

    • Integration ID (player configuration ID) that will be used to generate oembed links
    • Example: integration_id=aj12san5ppst

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

Endpoint:

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

Example:

https://content-api-prod-eu-west-1.mes.glomex.cloud/playlists/p-bfkj5oi3wnkx/videos?api_key=GHZj9hgs8...

Request Parameters

  • api_key (string, mandatory)

    • Your customer-specific API key
    • Example: api_key=GHZj9hgs8....
  • limit (number)

    • Limits the maximum number of results per result page
    • Example: limit=200
  • integration_id (string)

    • Integration ID (player configuration ID) that will be used to generate oembed links
    • Example: integration_id=aj12san5ppst
  • next_page_token (string)

    • Needs to be taken from the previous result page and tells the API to retrieve the next result page
    • Example: next_page_token=cGbsj451a...

Response

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

Contact

If you have any questions or need assistance, please contact us at publisher-support@glomex.com.

Last updated on