Audioburst Web API V2

3.2 Get Burst Data

Use the burst ID to get more information about a single burst. For example, burst transcription, burst title, related news category, keywords and more.

Use this API call to add more information about each audio item on your application.

Try it

Request URL

Request parameters

string

Id of burst to return data for.

(optional)
integer

Response queryId.

(optional)
string

Unique userId, see Register User API.

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”
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 List of bursts that composes the response
imageURL String Url for an image corresponding to the query
nextPage String Url to get the next page of the query
Burst:
Key Value Type Value Description
index Short index of burst in the array
burstId String Burst id
creationDate DateTime Burst creation date in epoch
creationDateISO DateTime Burst creation date in iso8601
title String The burst title
quote String A significant quote from the burst text
score Float A score between 0-10 marking match level of the burst to the query
text String Burst transcript text
duration Float Burst length in seconds
category String 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
source Source object Burst source information
contentURLs contentURLs object URLs of burst
debugTrace DebugTrace object Debug data
transcript Transcript object Transcript data of burst
Source Object:
Key Value Type Value Description
sourceId Short Id of burst source
sourceName String Source name
sourceType String Source Type: Radio or Podcast
showID String Show id of burst
showName String Show name of the burst
position Float Burst start time in source
audioURL String source audio file url
imageURL String Url for an image corresponding to the source
titleSource String Url of page title was taken from
location Location object Geolocation of to the source
episodeName String Name of episode burst was taken from
contentURLs:
Key Value Type Value Description
burstURL String Url to get more data on the burst
audioURL String burst audio file url
imageURL Array of String Array of Urls for an image corresponding to the burst
searchSiteURL String Url of burst in AudioBurst search web site
Location:
Key Value Type Value Description
type String Location type
coordinates float pair location coordinates
text String Name of location
TranscriptItem:
Key Value Type Value Description
type number Type of item optional value (1=, 2=, 3=...)
text String Text of item
startTime float Start time of item inside burst
duration float duration of item inside burst
confidence float confidence of item transcription

Example

{
  "type": null,
  "queryID": 0,
  "query": null,
  "actualQuery": null,
  "bursts": [
    {
      "index": 0,
      "burstId": "oz2BG639ApRR",
      "creationDate": "2017-10-23T19:45:41.968Z",
      "creationDateISO": "2017-10-23T19:45:41.968Z",
      "title": "Why Essential dropped its phone price",
      "quote": "Want surprises only three or four days do you have a contact that samsung",
      "score": 0.14,
      "text": "The fifteen times your body do any kind of but then there are but then there is a point at which you have to throw in the towel so they said they will do anything is farce fixing it what did they say ultimately they would do it they could take by the way we still have lines open three three seven one three talked you can get right through so what do they say denny all they told us is that they're gonna keep sending out a technician and kill to repair the problem now i'd had to go laundromat regret this this is ridiculous deal have not reimburse any crime they were well they're not gonna reimburse time what is it doing what is hitches doesn't go through the cycle so here's it it just stops midcycle danny what's the latest are they going to come out or not well again technician out morning and thirty and he said well the wiring harnett that i brought it does not work either so then we have to reschedule for him order more park take three to port for that but gift heart want surprises only three or four days do you have a contact that samsung i i have always i haven't their direct eight hundred number on the back of a man and tell evert at that wait a minute that's all you have yes sir yes suzanne ship put def deputy daf on this yeah you know why because samsung you'll woodpecker of death this she's good at they know now she's good at the manufacturer thing she really is so listen here's what we're gonna do we're gonna we're gonna go and start at samsung but i wanna also talked to your repair guy okay can we call the repair shop and see what they say the ones who subcontract they don't have a dog in this fight other than they're just fixing it they get paid from samsung let's try to get them on the line meanwhile we have lines open there's nothing more frustrating than.",
      "duration": 105.07025146484376,
      "category": "Tech",
      "keywords": [
        "def deputy daf",
        "repair guy okay",
        "samsung let",
        "laundromat regret",
        "wiring harnett",
        "ridiculous deal",
        "midcycle danny",
        "gift heart",
        "manufacturer thing",
        "repair shop",
        "technician",
        "lines"
      ],
      "entities": [
        "Technician",
        "Samsung",
        "Denny",
        "Evert",
        "Four Days"
      ],
      "source": {
        "sourceId": 11740,
        "sourceName": "TalkRadio 630 KHOW",
        "sourceType": "Radio",
        "showId": 31,
        "showName": "The Troubleshooter",
        "position": 838.28985595703125,
        "audioURL": "http://storageaudiobursts.blob.core.windows.net/temp/11740_2017102312_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/d4c2e507-e323-44e3-a048-0d8f7daa8f2f",
        "titleSource": "http://www.businessinsider.com/why-essential-dropped-its-phone-price-2017-10",
        "location": {
          "type": "Point",
          "coordinates": [
            -104.913889,
            39.91
          ],
          "text": null
        },
        "episodeName": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?burstId=oz2BG639ApRR&appKey=web&device=Alexa",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/Alexa/oz2BG639ApRR.mp3?userId=unknown&appName=web",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_tech_01_200x200.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_tech_01_600x315.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_tech_01_1200x630.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/oz2BG639ApRR/2017/10/23/Why-Essential-dropped-its-phone-price"
      },
      "DebugTrace": null,
      "transcript": "[{\"type\":1,\"text\":\"the\",\"start_time\":0.0,\"duration\":0.1199951171875,\"confidence\":0.81556957960128784},{\"type\":1,\"text\":\"than\",\"start_time\":103.89013671875,\"duration\":1.18011474609375,\"confidence\":1.0}]"
    }
  ],
  "message": null,
  "imageURL": null,
  "nextPage": null
}

Code samples

@ECHO OFF

curl -v -X GET "https://developersapi.audioburst.com/v2/burst?burstId={burstId}?queryId={integer}&userid={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["queryId"] = "{integer}";
            queryString["userid"] = "{string}";
            var uri = "https://developersapi.audioburst.com/v2/burst?burstId={burstId}&" + 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/burst?burstId={burstId}");

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

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

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'queryId' => '{integer}',
    'userid' => '{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
    'queryId': '{integer}',
    'userid': '{string}',
})

try:
    conn = httplib.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v2/burst?burstId={burstId}&%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
    'queryId': '{integer}',
    'userid': '{string}',
})

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

query = URI.encode_www_form({
    # Request parameters
    'queryId' => '{integer}',
    'userid' => '{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