Audioburst Web API V2

2.5 Search for Bursts

Search Audioburst’s database to get relevant bursts related to a specific search phrase, sorted by relevancy.

Input search terms and other optional parameters to narrow your search query.

Use this API call to enhance your application with bursts on a specific topic. For example, get bursts about the NFL’s Denver Broncos from a specific location and specific radio shows.

Try it

Request URL

Request parameters

string

The user's device.

Optional values are taken from the Get Supported Devices API.

(optional)
string

search term.

(optional)
string

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

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

(optional)
number

Source id to filter by.

(optional)
string

Show name to filter by.

(optional)
string

Earliest time and date to get show by in iso8601.

(optional)
string

Source geo location to filter by

(optional)
number

Distance from source geo location to filter by.

(optional)
string

Category to filter by.

Optional values are taken from the Get Supported Categories API.

(optional)
string

sort method

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 object null
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": "playlist",
  "queryID": 0,
  "query": "donald trump",
  "actualQuery": "",
  "bursts": [
    {
      "index": 0,
      "burstId": "lG2aedjB3qew",
      "creationDate": "2017-11-21T03:42:15.241Z",
      "creationDateISO": "2017-11-21T03:42:15.241Z",
      "title": "NFL Sunday Week 11 - Fauria thinking the Raiders need a lot of luck today; Of course there would be a Donald Trump v. Lavar Ball feud growing 11-19-17",
      "quote": "If the creation party is branded the party of trump",
      "score": 0,
      "text": "Two six were keeping the conversation going here about roy more we'll get into the low our ball versus that's eight seven.",
      "duration": 75.7800000000002,
      "category": "US News",
      "keywords": [
        "hand donald trump",
        "sessions establishment folks",
        "hot mic moment",
        "jet flight blood",
        "republican party",
        "jeff flake",
        "exact fight",
        "shocking revelation",
        "low our ball",
        "party arroyo",
        "similar things"
      ],
      "entities": [
        "Donald Trump",
        "Alabama",
        "Senate",
        "Jeff Flake",
        "Republican Party",
        "Arroyo",
        "ROY",
        "Twitter"
      ],
      "source": {
        "sourceId": 11561,
        "sourceName": "WCTC",
        "sourceType": "Radio",
        "showId": 352,
        "showName": "WCTC",
        "position": 2140.02,
        "audioURL": "http://storageaudiobursts.blob.core.windows.net/temp/11561_2017112022_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/01bebf6c-d5af-4592-9390-255234658dec",
        "titleSource": "http://www.weei.com/media/audio-channel/nfl-sunday-week-11-fauria-thinking-raiders-need-lot-luck-today-course-there",
        "location": {
          "type": "Point",
          "coordinates": [
            -74.444414,
            40.486678
          ],
          "text": null
        },
        "episodeName": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?burstId=lG2aedjB3qew&appKey=58e9a502bf634610b033081935d39c85&device=web",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/web/lG2aedjB3qew.mp3?userId=unknown&appName=58e9a502bf634610b033081935d39c85",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_200x200.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_600x315.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_1200x630.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/lG2aedjB3qew/2017/11/21/NFL-Sunday-Week-11-Fauria-thinking-the-Raiders-need-a-lot-of-luck-today%3b-Of-course-there-would-be-a-Donald-Trump-v.-Lavar-Ball-feud-growing-11-19-17"
      },
      "DebugTrace": null,
      "transcript": null
    },
    {
      "index": 0,
      "burstId": "o5lL0gV40RRR",
      "creationDate": "2017-11-21T02:19:39.08Z",
      "creationDateISO": "2017-11-21T02:19:39.08Z",
      "title": "FS1's Sharpe Sides with Trump, Slams LaVar Ball for Being Ungrateful",
      "quote": "If not for president trump those three ucla",
      "score": 0,
      "text": "The mexico anthem in trump went after him a day after he went after the father of these you seen skip ball  dominated the weekend and all of.",
      "duration": 159.15999999999997,
      "category": "US News",
      "keywords": [
        "president trump",
        "donald trump",
        "skip ball players",
        "oakland raiders",
        "ucla basketball player",
        "ucla basketball players",
        "shoplifting",
        "somebody",
        "debating",
        "everybody",
        "guys",
        "polony",
        "point",
        "buddy"
      ],
      "entities": [
        "China",
        "Ucla",
        "President Trump",
        "Shoplifting",
        "Donald Trump",
        "Oakland Raiders",
        "Charlie",
        "Mexico",
        "Basketball"
      ],
      "source": {
        "sourceId": 2953,
        "sourceName": "Super Station 101",
        "sourceType": "Radio",
        "showId": 239,
        "showName": "The Joe Walsh Show",
        "position": 691.87,
        "audioURL": "http://storageaudiobursts.blob.core.windows.net/temp/2953_2017112021_t.mp3",
        "imageURL": "https://sapi.audioburst.com/burst/stationimage/691c4cfe-2b54-4f7c-a863-7fd46677377f",
        "titleSource": "http://www.breitbart.com/video/2017/11/20/fs1s-sharpe-sides-with-trump-slams-lavar-ball-for-being-ungrateful/",
        "location": {
          "type": "Point",
          "coordinates": [
            -86.833407,
            33.466558
          ],
          "text": null
        },
        "episodeName": null
      },
      "contentURLs": {
        "burstURL": "https://sapi.audioburst.com/v2/burst?burstId=o5lL0gV40RRR&appKey=58e9a502bf634610b033081935d39c85&device=web",
        "audioURL": "https://sapi.audioburst.com/audio/repo/play/web/o5lL0gV40RRR.mp3?userId=unknown&appName=58e9a502bf634610b033081935d39c85",
        "imageURL": [
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_200x200.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_600x315.png",
          "https://storageaudiobursts.blob.core.windows.net/site/images/CategoryIcons/AB_API_US_01_1200x630.png"
        ],
        "searchSiteURL": "https://search.audioburst.com/burst/o5lL0gV40RRR/2017/11/21/FS1%27s-Sharpe-Sides-with-Trump-Slams-LaVar-Ball-for-Being-Ungrateful"
      },
      "DebugTrace": null,
      "transcript": null
    }
  ],
  "message": null,
  "imageURL": null,
  "nextPage": null
}

Code samples

@ECHO OFF

curl -v -X GET "https://developersapi.audioburst.com/v2/topstories/search?device={device}?q={string}&sourceType={string}&sourceId={number}&show={string}&fromDate={string}&location={string}&distance={number}&category={string}&sort={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["sourceType"] = "{string}";
            queryString["sourceId"] = "{number}";
            queryString["show"] = "{string}";
            queryString["fromDate"] = "{string}";
            queryString["location"] = "{string}";
            queryString["distance"] = "{number}";
            queryString["category"] = "{string}";
            queryString["sort"] = "{string}";
            var uri = "https://developersapi.audioburst.com/v2/topstories/search?device={device}&" + 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/topstories/search?device={device}");

            builder.setParameter("q", "{string}");
            builder.setParameter("sourceType", "{string}");
            builder.setParameter("sourceId", "{number}");
            builder.setParameter("show", "{string}");
            builder.setParameter("fromDate", "{string}");
            builder.setParameter("location", "{string}");
            builder.setParameter("distance", "{number}");
            builder.setParameter("category", "{string}");
            builder.setParameter("sort", "{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}",
            "sourceType": "{string}",
            "sourceId": "{number}",
            "show": "{string}",
            "fromDate": "{string}",
            "location": "{string}",
            "distance": "{number}",
            "category": "{string}",
            "sort": "{string}",
        };
      
        $.ajax({
            url: "https://developersapi.audioburst.com/v2/topstories/search?device={device}&" + $.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/topstories/search?device={device}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"q={string}",
                         @"sourceType={string}",
                         @"sourceId={number}",
                         @"show={string}",
                         @"fromDate={string}",
                         @"location={string}",
                         @"distance={number}",
                         @"category={string}",
                         @"sort={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/topstories/search?device={device}');
$url = $request->getUrl();

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

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'q' => '{string}',
    'sourceType' => '{string}',
    'sourceId' => '{number}',
    'show' => '{string}',
    'fromDate' => '{string}',
    'location' => '{string}',
    'distance' => '{number}',
    'category' => '{string}',
    'sort' => '{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}',
    'sourceType': '{string}',
    'sourceId': '{number}',
    'show': '{string}',
    'fromDate': '{string}',
    'location': '{string}',
    'distance': '{number}',
    'category': '{string}',
    'sort': '{string}',
})

try:
    conn = httplib.HTTPSConnection('developersapi.audioburst.com')
    conn.request("GET", "/v2/topstories/search?device={device}&%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}',
    'sourceType': '{string}',
    'sourceId': '{number}',
    'show': '{string}',
    'fromDate': '{string}',
    'location': '{string}',
    'distance': '{number}',
    'category': '{string}',
    'sort': '{string}',
})

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

query = URI.encode_www_form({
    # Request parameters
    'q' => '{string}',
    'sourceType' => '{string}',
    'sourceId' => '{number}',
    'show' => '{string}',
    'fromDate' => '{string}',
    'location' => '{string}',
    'distance' => '{number}',
    'category' => '{string}',
    'sort' => '{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