Audioburst Web API V2

3.6 Personal Playlist

Audioburst's personalized playlist API allows the creation of a personal playlist according to a user's listening identity and preferences.


Location information is required in order to include local weather, traffic, and news in the personalized playlist.
If location is not defined, these bursts will not be added to the playlist.

Try it

Request URL

Request parameters

string

Unique userId, see Register User API.

(optional)
string

Filter content by source type parameter. Default parameter is MIX.

Optional values are taken from the Get Supported Source Types API.

(optional)
string

Either a city name or a lat,long value to allow audioburst to provide the user with localized content like weather, traffic, and news.

(optional)
string

A predefined ID (obtained from Audioburst support) representing a customized playlist settings.

Request headers

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

Request body

Response 200

Example

{
  "type": "playlist",
  "queryID": 10029718,
  "query": "Personal Prefrence Playlist",
  "actualQuery": "Personal Prefrence Playlist",
  "bursts": [
    {
      "index": 0,
      "burstId": "AOyj1Lx74rZz",
      "publicationDate": "2018-11-03T14:18:42.842Z",
      "publicationDateISO": "2018-11-03T14:18:42.842Z",
      "creationDate": "2018-11-03T14:10:12.938Z",
      "creationDateISO": "2018-11-03T14:10:12.938Z",
      "title": "Supreme Court declines to stop climate change lawsuit filed by young activists",
      "quote": null,
      "score": 0,
      "playlistScore": 0,
      "text": null,
      "duration": 68.5,
      "category": "news.us",
      "keywords": [
        "Correspondent Evan Haning",
        "price information service",
        "foreigners state governments",
        "federal appeals court",
        "district court judge",
        "Trump administration",
        "President Trump",
        "text success",
        "supreme court",
        "young people",
        "constitutional ban",
        "oil production",
        "climate change",
        "Christopher cruise",
        "high court",
        "White House",
        "legal proceedings",
        "high bar",
        "federal officials",
        "stockpiles"
      ],
      "entities": [
        "US supreme court",
        "President Trump",
        "Bill Michaels",
        "Evan Haning",
        "Christopher cruise",
        "Congress",
        "White House"
      ],
      "source": {
        "sourceId": 5843,
        "sourceName": "Bloomberg Radio New York",
        "sourceType": "Radio",
        "showId": 2619,
        "showName": "Masters in Business",
        "position": 0,
        "audioURL": "https://storageaudiobursts.blob.core.windows.net/temp/5843_2018110314_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/203314a1-0750-46c0-bd87-4f3dfead58af",
        "titleSource": null,
        "location": {
          "type": "Point",
          "coordinates": [
            -74.016128,
            40.788818
          ],
          "text": "New York, New York, USA"
        },
        "episodeName": null,
        "network": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?appKey=search.audioburst&device=Alexa&burstId=AOyj1Lx74rZz",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/10029718/AOyj1Lx74rZz.mp3",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/200x200topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/600x315topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/1200x630topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/share_topstories03.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/AOyj1Lx74rZz/2018/11/03/Supreme-Court-declines-to-stop-climate-change-lawsuit-filed-by-young-activists"
      },
      "DebugTrace": null,
      "transcript": null
    },
    {
      "index": 1,
      "burstId": "oxq3e5lOeVdp",
      "publicationDate": "2018-11-04T03:29:56.427Z",
      "publicationDateISO": "2018-11-04T03:29:56.427Z",
      "creationDate": "2018-11-03T19:51:46.493Z",
      "creationDateISO": "2018-11-03T19:51:46.493Z",
      "title": "Saudi sisters likely committed suicide in New York's Hudson River: police",
      "quote": null,
      "score": 0,
      "playlistScore": 0,
      "text": null,
      "duration": 49.379999999999995,
      "category": "news.us",
      "keywords": [
        "Saudi Arabia",
        "detective Dermott shea",
        "Hudson river shoreline",
        "sister tala citizens",
        "Fairfax Virginia detectors",
        "George Washington Bridge",
        "complicated puzzle",
        "Twenty-two-year-old rotunda",
        "young ladies",
        "mother",
        "sisters",
        "duct"
      ],
      "entities": [
        "Saudi Arabia",
        "Virginia",
        "Fairfax Virginia",
        "Dermott shea",
        "Hudson river",
        "George Washington Bridge",
        "Faria",
        "Twenty-two-year",
        "sixteen year"
      ],
      "source": {
        "sourceId": 13750,
        "sourceName": "KNST AM 790",
        "sourceType": "Radio",
        "showId": 20645,
        "showName": "ÂÂ…œIt's Your Money‚ by Premiere Retirement and Wealth Planning",
        "position": 0,
        "audioURL": "https://storageaudiobursts.blob.core.windows.net/temp/13750_2018110319_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/02bccdac-49ed-48bc-8fc0-a742783984d7",
        "titleSource": null,
        "location": {
          "type": "Point",
          "coordinates": [
            -110.977877,
            32.264942
          ],
          "text": "Tucson, Arizona, USA"
        },
        "episodeName": null,
        "network": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?appKey=search.audioburst&device=Alexa&burstId=oxq3e5lOeVdp",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/10029718/oxq3e5lOeVdp.mp3",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/200x200topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/600x315topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/1200x630topstories03.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/share_topstories03.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/oxq3e5lOeVdp/2018/11/03/Saudi-sisters-likely-committed-suicide-in-New-York%27s-Hudson-River-police"
      },
      "DebugTrace": null,
      "transcript": null
    },
    {
      "index": 2,
      "burstId": "AOWr5qj0LKRL",
      "publicationDate": "2018-11-02T08:45:37.221Z",
      "publicationDateISO": "2018-11-02T08:45:37.221Z",
      "creationDate": "2018-11-02T02:30:19.95Z",
      "creationDateISO": "2018-11-02T02:30:19.95Z",
      "title": "The Watch - Reviewing 'The Bodyguard'",
      "quote": null,
      "score": 0,
      "playlistScore": 0,
      "text": null,
      "duration": 218.91,
      "category": "news.entertainment",
      "keywords": [
        "broad church",
        "spoiler inclusive episode",
        "bodyguard",
        "extra secretary secretary",
        "Dornan Gillian Anderson",
        "big romance person",
        "Brocher broad church",
        "Juliet Littman",
        "money team",
        "season homeland",
        "TV feeling",
        "great way",
        "home secretary",
        "huge spoiler",
        "amazing like return",
        "television podcast",
        "central tension",
        "home state",
        "political agenda",
        "Richard Madden"
      ],
      "entities": [
        "Julia Montague",
        "secretary",
        "Juliet Littman",
        "Cayenne",
        "Jamie Dornan Gillian Anderson",
        "Richard Madden",
        "Cheryl",
        "England",
        "Ding",
        "Afghantistan",
        "Harrington",
        "David"
      ],
      "source": {
        "sourceId": 11502,
        "sourceName": "The Watch",
        "sourceType": "Podcast",
        "showId": 16956,
        "showName": "The Watch",
        "position": 0,
        "audioURL": "https://storageaudiobursts.blob.core.windows.net/temp/11502_2018110202_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/b3f76ab7-84db-4bf3-9069-65de237d408e",
        "titleSource": null,
        "location": {
          "type": "Point",
          "coordinates": [
            0,
            0
          ],
          "text": ""
        },
        "episodeName": null,
        "network": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?appKey=search.audioburst&device=Alexa&burstId=AOWr5qj0LKRL",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/10029718/AOWr5qj0LKRL.mp3",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/200x200topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/600x315topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/1200x630topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/share_topstories02.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/AOWr5qj0LKRL/2018/11/02/The-Watch-Reviewing-%27The-Bodyguard%27"
      },
      "DebugTrace": null,
      "transcript": null
    },
    {
      "index": 3,
      "burstId": "pr2Me5zp3yyd",
      "publicationDate": "2018-11-02T02:14:44.201Z",
      "publicationDateISO": "2018-11-02T02:14:44.201Z",
      "creationDate": "2018-11-01T23:04:53.52Z",
      "creationDateISO": "2018-11-01T23:04:53.52Z",
      "title": "Netflix cracks a window",
      "quote": null,
      "score": 0,
      "playlistScore": 0,
      "text": null,
      "duration": 292.74,
      "category": "news.entertainment",
      "keywords": [
        "net flicks",
        "theaters",
        "michael bay",
        "best picture",
        "Orson Welles life",
        "Kim masters",
        "Hollywood breakdown",
        "Hollywood reporter",
        "art house film",
        "net looks movies",
        "KCRW dot com",
        "felony aditorial director",
        "public radio station",
        "Sandra Bullock movie",
        "Guillermo del Toro",
        "huge global audience",
        "Netflix",
        "certain theaters",
        "KCRW sponsors",
        "big concession"
      ],
      "entities": [
        "netflix",
        "KCRW",
        "Hollywood",
        "Kim masters",
        "Michael bay",
        "Orson Welles",
        "Matt",
        "reporter",
        "Warren",
        "Morgan Neville",
        "Kane",
        "Romans",
        "Guillermo del Toro",
        "quirones Roma",
        "Cuaron",
        "Sandra Bullock",
        "Oscar",
        "Bellamy",
        "US",
        "director"
      ],
      "source": {
        "sourceId": 11522,
        "sourceName": "KCRW's Hollywood Breakdown",
        "sourceType": "Podcast",
        "showId": 16960,
        "showName": "KCRW's Hollywood Breakdown",
        "position": 0,
        "audioURL": "https://storageaudiobursts.blob.core.windows.net/temp/11522_2018110123_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/6ef8c38d-6168-4aa4-a3fb-05a0a69e2278",
        "titleSource": null,
        "location": {
          "type": "Point",
          "coordinates": [
            0,
            0
          ],
          "text": ""
        },
        "episodeName": null,
        "network": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?appKey=search.audioburst&device=Alexa&burstId=pr2Me5zp3yyd",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/10029718/pr2Me5zp3yyd.mp3",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/200x200topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/600x315topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/1200x630topstories02.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/share_topstories02.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/pr2Me5zp3yyd/2018/11/01/Netflix-cracks-a-window"
      },
      "DebugTrace": null,
      "transcript": null
    },
    {
      "index": 4,
      "burstId": "64nZ4kz4Ojj6",
      "publicationDate": "2018-10-07T07:25:47.585Z",
      "publicationDateISO": "2018-10-07T07:25:47.585Z",
      "creationDate": "2018-10-07T02:17:23.3Z",
      "creationDateISO": "2018-10-07T02:17:23.3Z",
      "title": "Holy Moly Donut Shop tied to federal marijuana, money laundering case",
      "quote": null,
      "score": 0,
      "playlistScore": 0,
      "text": null,
      "duration": -58.245171,
      "category": "news.us",
      "keywords": [],
      "entities": [],
      "source": {
        "sourceId": 12152,
        "sourceName": "Newsradio 950 WWJ",
        "sourceType": "Radio",
        "showId": 43,
        "showName": "24 Hour News",
        "position": 0,
        "audioURL": "https://storageaudiobursts.blob.core.windows.net/temp/12152_2018100702_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/64752db3-7dc8-4479-a15d-9b2e90b4f1aa",
        "titleSource": null,
        "location": {
          "type": "Point",
          "coordinates": [
            -83.239722,
            42.019167
          ],
          "text": "Michigan, US"
        },
        "episodeName": null,
        "network": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?appKey=search.audioburst&device=Alexa&burstId=64nZ4kz4Ojj6",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/10029718/64nZ4kz4Ojj6.mp3",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/200x200topstories01.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/600x315topstories01.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/1200x630topstories01.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/share_topstories01.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/64nZ4kz4Ojj6/2018/10/07/Holy-Moly-Donut-Shop-tied-to-federal-marijuana-money-laundering-case"
      },
      "DebugTrace": null,
      "transcript": null
    }
  ],
  "message": null,
  "imageURL": "",
  "nextPage": null
}

Code samples

@ECHO OFF

curl -v -X GET "https://developersapi.audioburst.com/v2/personal?userId={userId}?sourceType={string}&location={string}&settingsId={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["sourceType"] = "{string}";
            queryString["location"] = "{string}";
            queryString["settingsId"] = "{string}";
            var uri = "https://developersapi.audioburst.com/v2/personal?userId={userId}&" + 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/v2/personal?userId={userId}");

            builder.setParameter("sourceType", "{string}");
            builder.setParameter("location", "{string}");
            builder.setParameter("settingsId", "{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
            "sourceType": "{string}",
            "location": "{string}",
            "settingsId": "{string}",
        };
      
        $.ajax({
            url: "https://developersapi.audioburst.com/v2/personal?userId={userId}&" + $.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/v2/personal?userId={userId}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"sourceType={string}",
                         @"location={string}",
                         @"settingsId={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/v2/personal?userId={userId}');
$url = $request->getUrl();

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

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'sourceType' => '{string}',
    'location' => '{string}',
    'settingsId' => '{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
    'sourceType': '{string}',
    'location': '{string}',
    'settingsId': '{string}',
})

try:
    conn = httplib.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v2/personal?userId={userId}&%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
    'sourceType': '{string}',
    'location': '{string}',
    'settingsId': '{string}',
})

try:
    conn = http.client.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v2/personal?userId={userId}&%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/v2/personal?userId={userId}')

query = URI.encode_www_form({
    # Request parameters
    'sourceType' => '{string}',
    'location' => '{string}',
    'settingsId' => '{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