Reach Content API

Overview

The Beachfront Reach Catalog API can be used for obtaining metadata and associated data for assets within the Beachfront Reach content catalog. This document provides instructions regarding parsing the catalog for asset ids and how to inject those values into the Beachfront Reach Player video embed code.

Catalog Link

The link below is the link to the catalog API. This link includes your API key (XXXXX), which is linked to your Beachfront Reach account.


						http://api.beachfrontreach.com/reach/client/contentapi/search?key=XXXXX
					

You can find your API key by navigating to Settings in the side menu:

Reach settings

Then from the settings section, navigate to the Settings sub-section at the top:

Reach settings submenu

Scroll down to the API Key field and click the arrows to generate an API key:

Reach settings submenu

Basic API Search Guidelines

To add query arguments to the query string, and thereby execute specific searches, add query arguments to the catalog API URL following the API key. Use an ampersand (&) between each operand of the argument. So for example, if you want to find videos that include the word “fun”:

http://api.beachfrontreach.com/reach/client/contentapi/search?key=XXXXX&keywords=fun

Let’s say you only want videos with the word fun, but only in the “travel” category (integer value for business category = 19):

http://api.beachfrontreach.com/reach/client/contentapi/search?key=XXXXX&keywords=fun&categories=19

Let’s say you only want videos with the word fun, but only in travel (integer value for business category = 19), but don’t want videos from Time (integer value for Time category = 9):

http://api.beachfrontreach.com/reach/client/contentapi/search?key=XXXXX&keywords=fun&categories=19&providers_not=9

Search parameters

Below is a listing of the search arguments, as well as the sorting arguments that can be added.

Name Description Type Default
keywords Keyword list separated by comma. Return videos contains at least ONE of this keywords. query
keywords_and Keyword list separated by comma. Return videos contains ALL of this keywords. query
keywords_not Keyword list separated by comma. Return videos NOT contains ALL of this keywords. query
keywords_phrase Keyword phrases separated by comma. Return videos contains ONE of this keywords phrase. query
categories Category id list separated by comma. Return videos from this category list. query
categories_not Category id list separated by comma. Skip video by this category list. query
providers Provider id list separated by comma. Return videos created by this providers query
providers_not Provider id list separated by comma. Return videos created NOT by this providers query
publishDateSince Returns all videos with equal or greater publishDate field. ISO date format. Ex. "2015-06-19T00:00:00Z". query
addedSince Returns all videos with equal or greater addedDate field. ISO date format. Ex. "2015-06-19T00:00:00Z". query
pn Page number query 1
rpp Result per page query 20
orderBy Sort field. (publishDate | added) query publishDate
asc true | false query false
format Response format: xml | json query json
key API key query

Category and Provider Index resources

Providers (listing of all active content provider Ids in the catalog):

http://api.beachfrontreach.com/reach/client/contentapi/providers?key=XXXXX

Categories (all current Categories in the catalog):

http://api.beachfrontreach.com/reach/client/contentapi/categories?key=XXXXX

Example Responses

XML


<item>
<media:category>234</media:category>
<contributor>132</contributor>
<description>
Kids say the darnedest things! Find out what these little ones think of weddings and what they're planning for their future "I do."
</description>
<duration>102</duration>
<feed>203</feed>
<geo_restricted>false</geo_restricted>
<guid>55d72e12e4b003a4e5bd5be6</guid>
<media:keywords>
bridal, brides magazine, series: brides live wedding, Brides, weddings, brides live wedding, brides.com, Brides Feed, season: 2015
</media:keywords>
<macro>
<entry>
<key>BFM_VIDEO_CUSTOM_CONTENT_ID</key>
<value>5591612661646d068d010000</value>
</entry>
</macro>
<provider>81</provider>
<pubDate>2015-06-29T15:15:50Z</pubDate>
<site_restricted>false</site_restricted>
<media:thumbnail width="640" height="360" url="http://media-cdn.beachfrontreach.com/acct_81/reachthumb/81/t640x360/55d72e12e4b003a4e5bd5be6_1440165417.jpg"/>
<media:thumbnail width="640" height="480" url="http://media-cdn.beachfrontreach.com/acct_81/reachthumb/81/t640x480/55d72e12e4b003a4e5bd5be6_1440165417.jpg"/>
<media:thumbnail width="428" height="240" url="http://media-cdn.beachfrontreach.com/acct_81/reachthumb/81/t428x240/55d72e12e4b003a4e5bd5be6_1440165417.jpg"/>
<media:thumbnail width="320" height="240" url="http://media-cdn.beachfrontreach.com/acct_81/reachthumb/81/t320x240/55d72e12e4b003a4e5bd5be6_1440165418.jpg"/>
<media:thumbnail width="200" height="112" url="http://media-cdn.beachfrontreach.com/acct_81/reachthumb/81/t200x112/55d72e12e4b003a4e5bd5be6_1440165418.jpg"/>
<title>
Brides Live Wedding - Kids Tell the Truth About Love and Weddings
</title>
<media:content duration="102" type="video/mp4" bitrate="628" height="480" url="http://media-cdn.beachfrontreach.com/acct_81/video/h264_480p/55d72e12e4b003a4e5bd5be6.mp4" format="H264_480P" medium="video" isDefault="true"/>
<media:content duration="102" type="video/mp4" bitrate="256" height="240" url="http://media-cdn.beachfrontreach.com/acct_81/video/h264_240p/55d72e12e4b003a4e5bd5be6.mp4" format="H264_240P" medium="video"/>
<media:content duration="102" type="video/mp4" bitrate="1200" height="720" url="http://media-cdn.beachfrontreach.com/acct_81/video/h264_720p/55d72e12e4b003a4e5bd5be6.mp4" format="H264_720P" medium="video"/>
</item>

JSON


"category": [
93
]
},
{
"title": "Nina Agdal Has Fun in a Funky Fashion Photo Shoot",
"description": "<div style=\"color: #000000;font-family: Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; width: 555px;\"> <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody> <tr><td width=\"180\" valign=\"top\" rowspan=\"2\"> <div style=\"margin: 0px 10px 5px 0px;\"> <img src=\"https://splashrss.mainstreamdata.com/store/SPL1115182/cjtcYcpNGFdN/jpg/SPL1115182.jpg\" border=\"0\" width=\"160\" height=\"120\"/> </div> </td> <td width=\"256\" valign=\"top\"><div style=\"font-size: 12px; margin: 3px 0px;\"> <span>We spotted 23-year-old Sports Illustrated Swimsuit model Nina Agdal on the set of a fashion photo shoot in New York City. Nina dressed in a variety of funky and colorful outfits, and even had on some crazy pink hair extensions for her day at work. Ref: SPL1115182 020915 Video by: Splashnews TV / Splash News</span> </div> </td> <td style=\"font-size: 11px; line-height: 1.4em; padding-left: 20px; padding-top: 10px;\" width=\"350\" valign=\"top\"> <div><span style=\"color: #666666; font-size: 11px;\">Time:</span> 01:03</div> <div><span style=\"color: #666666; font-size: 11px;\">Splash News TV: English</span></div> <div><span style=\"color: #666666; font-size: 11px;\">Country:</span> USA</div> <div><span style=\"color: #666666; font-size: 11px;\">Rights:</span> World Rights</div> <div><span style=\"color: #666666; font-size: 11px;\">Photo Set:</span> </div> <div><span style=\"color: #666666; font-size: 11px;\">© www.splashnews.com</span></div> </td> </tr> </tbody> </table> </div>",
"guid": "55e72cfbe4b0d6e0a94f6f16",
"pubDate": "2015-09-02 16:56:51 +0000",
"keywords": "sports illustrated swimsuit model, model, fashion, pink hair, photo shoot, rumors, hollywood, Splash XML, weird hair, celebrity, gossip, nina agdal, style, splash news, sntv, red carpet, high fashion, new york city, hair extensions",
"duration": 63,
"geo_restricted": false,
"site_restricted": false,
"provider": 5,
"feed": 58,
"contributor": null,
"macro": null,
"thumbnail": [
{
"width": 640,
"height": 360,
"url": "http://media-cdn.beachfrontreach.com/acct_5/reachthumb/5/t640x360/55e72cfbe4b0d6e0a94f6f16_1441213703.jpg"
},
{
"width": 428,
"height": 240,
"url": "http://media-cdn.beachfrontreach.com/acct_5/reachthumb/5/t428x240/55e72cfbe4b0d6e0a94f6f16_1441213703.jpg"
},
{
"width": 640,
"height": 480,
"url": "http://media-cdn.beachfrontreach.com/acct_5/reachthumb/5/t640x480/55e72cfbe4b0d6e0a94f6f16_1441213703.jpg"
},
{
"width": 200,
"height": 112,
"url": "http://media-cdn.beachfrontreach.com/acct_5/reachthumb/5/t200x112/55e72cfbe4b0d6e0a94f6f16_1441213703.jpg"
},
{
"width": 320,
"height": 240,
"url": "http://media-cdn.beachfrontreach.com/acct_5/reachthumb/5/t320x240/55e72cfbe4b0d6e0a94f6f16_1441213703.jpg"
}
]

Returned Fields:

Field Description
media:category Numerical Reach category id of the content's category.
Contributor Numerical Reach contributor id of the content's contributor.
Description A written overview of the video's content.
Duration Length of video content in seconds.
Feed Numerical Reach feed id of the content's contributor.
geo_restricted Whether the content is restricted based on your location.
guid Unique content identifier. This is the value you pass in an embed to play a video.
media:keywords List of video tags separated by commas.
pubDate Publication date of the video.
site_restricted Whether content is restricted based on site.
media:thumbnail Thumbnail of the video content. Available in several sizes.

GUID ID

The GUID is a unique identifier used by the Beachfront Reach video player to determine which piece of content to play. You will parse for the GUID ID in the feed for each asset from the feed; and insert the GUID ID into our embed code. The GUID is identified by tag:

GUID ID.

Using an example in of an asset in our catalog, for the “Terrified Skiers Appear to Encounter Giant Mountain Lion on Slopes” video, the GUID ID is:

552d167ce4b041672068dcb0

Video Embed Code

A sample video object code is below. The “XXXXXXXXXXXXXXXXXXXXXXXX” represents the video GUID ID.


<div id='my_reach_player'></div>
<script>
	var tag = document.createElement('script');
	tag.src = '//api.beachfrontreach.com/reach/client/loader/player.js';

	var firstScriptTag = document.getElementsByTagName('script')[0];
	firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

	function onReachAPIReady() {

    ReachAPI.Player('my_reach_player', {

        id:   '040ea67a-bc40-44a4-fd7c-615908cb8836', // Needs to be an embed from one of your Reach players
        width: 500, // can be only numeric by default from player config (optional)
		height: 300, // can be only numeric by default from player config (optional)
		guid : ' XXXXXXXXXXXXXXXXXXXXXXXX  ' // video id from the content api (optional)

    });
}
<script>
	

You would insert the GUID ID as indicated above. Using the example above, you would format the script like this:


<div id='my_reach_player'></div>
<script>
	var tag = document.createElement('script');
	tag.src = '//api.beachfrontreach.com/reach/client/loader/player.js';

	var firstScriptTag = document.getElementsByTagName('script')[0];
	firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

	function onReachAPIReady() {

    ReachAPI.Player('my_reach_player', {

        id:   '040ea67a-bc40-44a4-fd7c-615908cb8836', // Needs to be an embed from one of your Reach players
        width: 500, // can be only numeric by default from player config (optional)
		height: 300, // can be only numeric by default from player config (optional)
		guid : ' 552d167ce4b041672068dcb0 ' // video id from the content api (optional)

    });
}
<script>
	

The player can be manually configured for size simply by adjusting the H/W parameters in the embed code. As for the companion banner, we can configure server side an appropriate <div> to target the pre-roll ad companion banner (300x250 unit). We will work with you to determine the appropriate div target.

Support or Contact

Having trouble with the Content API? Contact support@beachfrontmedia.com and we’ll help you sort it out.

Find out more about Beachfront Media’s products. Here