Search samples

Description

Returns a list of voice samples from voice actors that can then be booked using the projects/addBooking method (see quickstart and flowchart).

Arguments

= required
= only one of these is required
NameTypeDescriptionDefault value
language
stringLanguage (and regional accent) of the samples wanted. Valid values can be obtained with the /languages operation.
size20
pageintegerThe number of projects posted by the user is more than itemsPerPage, this argument allows you to get subsequent pages.1
genderAndAgestringGender and age of the samples wanted. Valid values can be obtained with the /genderAndAges operation.
purposestringPurpose of the samples wanted. Valid values can be obtained with the /purposes operation.
unitsintegerUse this argument if you want to get price quotes for each talent returned. This sets the length of the project being quoted.

Errors

  • 7008: The "language" argument is not valid. You can get the list of available languages and accents using the API operation /languages.
  • 7009: The "genderAndAge" argument is not valid. You can get the list of available gender and ages using the API operation /genderAndAges.
  • 7016: The "purpose" argument is not valid. You can get the list of available read purposes using the API operation /purposes.

Code example

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )
import groovyx.net.http.*
import groovy.json.*
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
data = [
    language: 'eng-us',
    genderAndAge: 'youngAdultAnyGender',
    purpose: 'corporate',
    size: '30',
    page: '2'
]
http = new HTTPBuilder('https://api.voicebunny.com')
http.handler.success = {response, json -> return json}
http.handler.failure = {response, json -> throw new RuntimeException(json.error.code + ' ' + json.error.message)}
def voicebunnyUser = 'xxXXxx'
def voicebunnyToken = 'xxxxXXXXxxxxXXXX'
http.auth.basic voicebunnyUser, voicebunnyToken
def samples = http.post(path: 'samples/search', body: data, requestContentType: URLENC)
import requests
import simplejson
from requests.auth import HTTPBasicAuth
url = 'https://api.voicebunny.com'
api_id = 'XX'
api_key = 'xxxxXXXXxxxxXXXX'
req = requests.post(url+'/samples/search',
    data={
        'language': 'eng-us',
        'genderAndAge': 'youngAdultAnyGender',
        'purpose': 'corporate',
        'size': '30',
        'page': '2',
    },
    auth=HTTPBasicAuth(api_id, api_key),verify=False)
data = simplejson.loads(req.text)
response = data['samples']
'require 'faraday'
require 'faraday_middleware'
@conn = nil
@api_id = 'XX'
@api_key = 'xxxxXXXXxxxxXXXX'
resp = nil
@conn = Faraday.new(:url =>('https://'+ @api_id+':'+@api_key +'@api.voicebunny.com'),:ssl => {:verify => false}) do |builder|
    builder.use Faraday::Request::Multipart
    builder.use Faraday::Request::UrlEncoded
    builder.use Faraday::Response::ParseJson
    builder.use Faraday::Adapter::NetHttp
end
resp = @conn.post '/samples/search.json', {
    language: 'eng-us',
    genderAndAge: 'youngAdultAnyGender',
    purpose: 'corporate',
    size: '30',
    page: '2'
}
resp.body