WARNING: This API has been deprecated and should not be used for new projects. Support for write methods were discontinued on June 30, 2017, and read methods will be discontinued on December 31, 2017. Click here for more information.
Media API Sample: find_related_videos
This example uses the Media API
find_related_videos() READ method, which allows you to retrieve data for videos related to the video you specify by id or reference id.
Note: this method searches for videos that have common words in the title or short description. The Media API
search_videos() method provides a much more powerful way of finding related videos based on any standard or custom field, and allows you to exclude videos from the results by using the
none argument. Brightcove recommends that you use the
search_videos() method rather than the
Note: making this call from the client side exposes your read token, which could allow a developer to access all video data from your account. If you use the READ token with URL access, that developer could even download copies of all your video files. Brightcove recommends making all Media API calls from a server-side application if possible.
At least one of the two next fields must have a value.
ID of the video you want to find related videos for:
Reference ID of the video you want to find related videos for:
Page size: Page number:
Only the first page is available until you make a search; then the available pages are recalculated.
Video fields to return:
For details about the video fields, refer to the Video object in the Media API Reference document.
You must use a read token with URL access to return
The following fields are not returned unless they are explicityly included in the
Media API Request
Below is the request sent to the Media API service:
Below is the JSON data returned by the request:
Below is simple HTML output of the video names using the Handlebars templating system: