Audioburst Web API V1

Get a Playlist Based on a Search Term

Get a playlist of bursts based on a given search term. The playlist can be filtered by date, playlist duration, burst duration, source type, trending or date and geo-location

Try it

Request URL

Request parameters

string

A query term. A single or multiple words

(optional)
dateTime

The starting date of this search query range. A timestamp in ISO 8601 format: yyyy-MM-dd

(optional)
dateTime

The ending date of this search query range. A timestamp in ISO 8601 format: yyyy-MM-dd

(optional)
string

Limit the search for specific stations. Multiple values are supported (Comma separated)

(optional)
string

Limit the search for specific type of sources: “radio”, “podcast”

(optional)
string

Define the playlist sorting type: “trending”, “latest”

(optional)
string

Limit the search to a specific geo-location of the source station by latitude and longitude. Example:latlng=40.714224,-73.961452

(optional)
string

The device type from which this request was performed: “desktop”, “mobile”, “alexa”, “googleHome”

(optional)
string

A unique user identification

(optional)
number

Max length of playlist in seconds

(optional)
number

Max size of bursts in a playlist

(optional)
number

The minimum duration of a single burst in the returned playlist

(optional)
number

The maximum duration of a single burst in the returned playlist.

(optional)
string

Limit the search for specific category. Multiple values are not supported.

Request headers

string
Subscription key which provides access to this API. Found in your Profile.

Request body

Response 200

On success, the response body contains a Response object.

Response:

Key Value Type Value Description
Type String Type of returned response or response message: “playlist”, “single”, “message”
playlistId (optional) String The playlist id
playlistName (optional) String Playlist category name
queryID long The query id that was made for this response
query String The query that was made for this response
actualQuery String The query that was used for searching
bursts Array of bursts (simplified) List of bursts that composes the playlist
imageURL String Optional playlist image, usually for curated playlist
nextPage (optional) String A url to get the next page for this query
Burst (simplified):
Key Value Type Value Description
id GUID Burst id
Title String The burst title
audioURL String Burst audio file url
score float A score between 0-10 marking match level of the burst to the query
stationName String Station name
stationID String Station id the burst came from
stationImageURL String Station Image
showName String Show name of the burst
showID String Show id of burst
date DateTime Burst air date
categories Array of Strings List of categories burst is classified for
keywords Array of Strings List of keywords in the burst
entities Array of Strings List of entities in the burst
ImageURL String Url for an image corresponding to the burst
duration float Burst length in seconds

Example

{
  "type": "playlist",
  "queryID": 389983,
  "query": "donald trump",
  "actualQuery": "donald trump",
  "bursts": [
    {
      "burstID": "b86b7617-7773-43bc-8b8c-08386fd9394a",
      "title": "I found the following 5 bursts on: donald trump. Aired 11 minutes ago, On WLOB.",
      "audioURL": "https://sapi.audioburst.com/audio/play/389983/temp/b86b7617-7773-43bc-8b8c-08386fd9394a/47314b92-5d95-4c24-8cb4-aa1a966f0562_48.mp3",
      "score": 6.0823064001016087,
      "stationName": "WLOB",
      "stationID": "11547",
      "stationImageURL": "",
      "showName": "Healthtalk with Dr. Bob Martin Live",
      "showID": "11547_2017031914",
      "date": "2017-03-19 14:06",
      "categories": "news.tech",
      "imageURL": "http://media.gettyimages.com/photos/general-views-from-the-production-facility-as-staff-members-and-work-picture-id541749004?b=1&k=6&m=541749004&s=594x594&w=0&h=9hnk6OAm_a4eWwFHexHgBNaVGwfWAT6MaXYHDGK5eFo=",
      "duration": 30.67431640625
    },
    {
      "burstID": "293e4bfa-3625-40ec-8a71-1bbd8a79226a",
      "title": "Aired 15 minutes ago, On WSB-AM.",
      "audioURL": "https://sapi.audioburst.com/audio/play/389983/temp/293e4bfa-3625-40ec-8a71-1bbd8a79226a/8283c8ef-ef4a-4c95-b76e-b916baff7779_48.mp3",
      "score": 3.8251356217333612,
      "stationName": "WSB-AM",
      "stationID": "11432",
      "stationImageURL": "",
      "showName": "11432 Show",
      "showID": "11432_2017031914",
      "date": "2017-03-19 14:02",
      "categories": "news.us.politics",
      "imageURL": "http://media.gettyimages.com/photos/house-minority-leader-nancy-pelosi-r-speaks-as-us-rep-brad-sherman-picture-id634027952?b=1&k=6&m=634027952&s=594x594&w=0&h=M2Hk3v8s-f_trDQkEWEtB9KFUnOxCTyUoc19sjQrY1M=",
      "duration": 45.368408203125
    },
    {
      "burstID": "d3836159-72fd-4e31-9476-598f51463aea",
      "title": "Aired 49 minutes ago, On KVNT Valley News Talk.",
      "audioURL": "https://sapi.audioburst.com/audio/play/389983/temp/d3836159-72fd-4e31-9476-598f51463aea/765f15d5-eb23-4eea-835b-4ae2c2ffb85b_48.mp3",
      "score": 4.3549871065656314,
      "stationName": "KVNT Valley News Talk",
      "stationID": "1020",
      "stationImageURL": "",
      "showName": "At Home with Gary Sullivan",
      "showID": "1020_2017031913",
      "date": "2017-03-19 13:28",
      "categories": "news.us.politics",
      "imageURL": "http://cache4.asset-cache.net/gc/497107180-journalists-and-members-of-the-media-gather-gettyimages.jpg?v=1&c=IWSAsset&k=2&d=X7WJLa88Cweo9HktRLaNXuT9X0QTRRSOGKErlJNnfpMzFRN7fdOkptQz4GtcwyhA&b=NzE=",
      "duration": 127.455322265625
    },
    {
      "burstID": "dd1868f7-6f88-4dae-b836-d2e7e36f29de",
      "title": "Aired one hour ago, On KYW Newsradio 1060.",
      "audioURL": "https://sapi.audioburst.com/audio/play/389983/audio/dd1868f7-6f88-4dae-b836-d2e7e36f29de/dd1868f7-6f88-4dae-b836-d2e7e36f29de_48.mp3",
      "score": 7.0529208455598527,
      "stationName": "KYW Newsradio 1060",
      "stationID": "11140",
      "stationImageURL": "",
      "showName": "24 hour News",
      "showID": "11140_2017031912",
      "date": "2017-03-19 12:56",
      "categories": "news.us",
      "imageURL": "http://media.gettyimages.com/photos/mary-burney-of-colorado-springs-cheers-during-a-rally-for-republican-picture-id615467300?b=1&k=6&m=615467300&s=594x594&w=0&h=hLGGgoOlhKRuEahG7tUepKdQHtaw5wq-oWODizSALbg=",
      "duration": 34.95703125
    },
    {
      "burstID": "7a7f7e5e-94b5-4986-b2b5-df53873e7504",
      "title": "Aired one hour ago, On KMJ NOW.",
      "audioURL": "https://sapi.audioburst.com/audio/play/389983/temp/7a7f7e5e-94b5-4986-b2b5-df53873e7504/0cd0da7d-5a07-4fb7-a220-f1588edbbc28_48.mp3",
      "score": 4.0078629580901852,
      "stationName": "KMJ NOW",
      "stationID": "11103",
      "stationImageURL": "",
      "showName": "Commonwealth Club",
      "showID": "11103_2017031912",
      "date": "2017-03-19 12:42",
      "categories": "news.us",
      "imageURL": "http://media.gettyimages.com/photos/former-hollinger-international-ceo-conrad-black-leaves-court-after-a-picture-id73675571?b=1&k=6&m=73675571&s=594x594&w=0&h=DKbz1V1N9MjlPYQYeSzwY6z4CnQdvYzV0mxjSXGfopg=",
      "duration": 134.6259765625
    }
  ],
  "imageURL": "",
  "nextPage": null
}

Code samples

@ECHO OFF

curl -v -X GET "https://developersapi.audioburst.com/v1/search??q={string}&fromDate={dateTime}&toDate={dateTime}&stationId={string}&sourceType={string}&sortBy={string}&latlng={string}&device={string}&userID={string}&maxPlayListDuration={number}&maxPlayListSize={number}&minBurstDuration={number}&maxBurstDuration={number}&category={string}"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            // Request parameters
            queryString["q"] = "{string}";
            queryString["fromDate"] = "{dateTime}";
            queryString["toDate"] = "{dateTime}";
            queryString["stationId"] = "{string}";
            queryString["sourceType"] = "{string}";
            queryString["sortBy"] = "{string}";
            queryString["latlng"] = "{string}";
            queryString["device"] = "{string}";
            queryString["userID"] = "{string}";
            queryString["maxPlayListDuration"] = "{number}";
            queryString["maxPlayListSize"] = "{number}";
            queryString["minBurstDuration"] = "{number}";
            queryString["maxBurstDuration"] = "{number}";
            queryString["category"] = "{string}";
            var uri = "https://developersapi.audioburst.com/v1/search?&" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://developersapi.audioburst.com/v1/search?");

            builder.setParameter("q", "{string}");
            builder.setParameter("fromDate", "{dateTime}");
            builder.setParameter("toDate", "{dateTime}");
            builder.setParameter("stationId", "{string}");
            builder.setParameter("sourceType", "{string}");
            builder.setParameter("sortBy", "{string}");
            builder.setParameter("latlng", "{string}");
            builder.setParameter("device", "{string}");
            builder.setParameter("userID", "{string}");
            builder.setParameter("maxPlayListDuration", "{number}");
            builder.setParameter("maxPlayListSize", "{number}");
            builder.setParameter("minBurstDuration", "{number}");
            builder.setParameter("maxBurstDuration", "{number}");
            builder.setParameter("category", "{string}");

            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
            "q": "{string}",
            "fromDate": "{dateTime}",
            "toDate": "{dateTime}",
            "stationId": "{string}",
            "sourceType": "{string}",
            "sortBy": "{string}",
            "latlng": "{string}",
            "device": "{string}",
            "userID": "{string}",
            "maxPlayListDuration": "{number}",
            "maxPlayListSize": "{number}",
            "minBurstDuration": "{number}",
            "maxBurstDuration": "{number}",
            "category": "{string}",
        };
      
        $.ajax({
            url: "https://developersapi.audioburst.com/v1/search?&" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://developersapi.audioburst.com/v1/search?";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"q={string}",
                         @"fromDate={dateTime}",
                         @"toDate={dateTime}",
                         @"stationId={string}",
                         @"sourceType={string}",
                         @"sortBy={string}",
                         @"latlng={string}",
                         @"device={string}",
                         @"userID={string}",
                         @"maxPlayListDuration={number}",
                         @"maxPlayListSize={number}",
                         @"minBurstDuration={number}",
                         @"maxBurstDuration={number}",
                         @"category={string}",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://developersapi.audioburst.com/v1/search?');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'q' => '{string}',
    'fromDate' => '{dateTime}',
    'toDate' => '{dateTime}',
    'stationId' => '{string}',
    'sourceType' => '{string}',
    'sortBy' => '{string}',
    'latlng' => '{string}',
    'device' => '{string}',
    'userID' => '{string}',
    'maxPlayListDuration' => '{number}',
    'maxPlayListSize' => '{number}',
    'minBurstDuration' => '{number}',
    'maxBurstDuration' => '{number}',
    'category' => '{string}',
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
    # Request parameters
    'q': '{string}',
    'fromDate': '{dateTime}',
    'toDate': '{dateTime}',
    'stationId': '{string}',
    'sourceType': '{string}',
    'sortBy': '{string}',
    'latlng': '{string}',
    'device': '{string}',
    'userID': '{string}',
    'maxPlayListDuration': '{number}',
    'maxPlayListSize': '{number}',
    'minBurstDuration': '{number}',
    'maxBurstDuration': '{number}',
    'category': '{string}',
})

try:
    conn = httplib.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v1/search?&%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
    # Request parameters
    'q': '{string}',
    'fromDate': '{dateTime}',
    'toDate': '{dateTime}',
    'stationId': '{string}',
    'sourceType': '{string}',
    'sortBy': '{string}',
    'latlng': '{string}',
    'device': '{string}',
    'userID': '{string}',
    'maxPlayListDuration': '{number}',
    'maxPlayListSize': '{number}',
    'minBurstDuration': '{number}',
    'maxBurstDuration': '{number}',
    'category': '{string}',
})

try:
    conn = http.client.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v1/search?&%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://developersapi.audioburst.com/v1/search?')

query = URI.encode_www_form({
    # Request parameters
    'q' => '{string}',
    'fromDate' => '{dateTime}',
    'toDate' => '{dateTime}',
    'stationId' => '{string}',
    'sourceType' => '{string}',
    'sortBy' => '{string}',
    'latlng' => '{string}',
    'device' => '{string}',
    'userID' => '{string}',
    'maxPlayListDuration' => '{number}',
    'maxPlayListSize' => '{number}',
    'minBurstDuration' => '{number}',
    'maxBurstDuration' => '{number}',
    'category' => '{string}'
})
if query.length > 0
  if uri.query && uri.query.length > 0
    uri.query += '&' + query
  else
    uri.query = query
  end
end

request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body