Method: Artist Search

Conducts an artist search using a search term (or album ID, genre ID, etc.) Provides paginated results.

Request URL

The object is artist and the action is search. The base request URL is:

http://api.emusic.com/artist/search?apiKey=myKey&term=search+term

Request Parameters

Following is a list of required and optional query string parameters for the Artist Search method. For more information about individual request parameters, see request parameters.

Name Required Default Description
apiKey YES none The developer API key. This is required for all methods.
term depends none A URL-encoded search term with which to search artists. One of term, albumId, artistId, genreId, labelId or styleId must be provided.
albumId
artistId
genreId
labelId
styleId
depends none A related search ID. One of term, albumId, artistId, genreId, labelId or styleId must be provided.
page no 1 The starting page index of returned artists. (Used for paginating through longer result lists.)
perPage no 20 The number of artists to return per page.
format no XML The format of the response (XML, JSON, JSONP).
callback depends none The name of the JavaScript callback method for the JSONP format. (Required for JSONP responses only.)
fref no none The eMusic partner tag. If provided, the FREF value is automatically added to all appropriate eMusic links.
Example Requests

// Returns the first 20 artists that contain the string "bob marley".
http://api.emusic.com/artist/search?apiKey=myKey&term=bob+marley

// Returns the third page of 10 artists.
http://api.emusic.com/artist/search?apiKey=myKey&term=bob+marley&page=3&perPage=10

// Returns the first 20 artists with album ID 11002212.
http://api.emusic.com/artist/search?apiKey=myKey&albumId=11002212

// Returns the first 20 artists in JSON.
http://api.emusic.com/artist/search?apiKey=myKey&term=bob+marley&
format=JSON

// Returns the third page of 10 artists in JSONP using a callback of
// someMethod() and an FREF value of 400060.

http://api.emusic.com/artist/search?apiKey=myKey&term=bob+marley&page=3&perPage=10&
format=JSONP&callback=someMethod&fref=400060

Response Format

Following is a list of returned elements for the Artist Search method. For more information about individual response elements, see Response Elements.

Name Type Returned Description
status status always Contains a result code.
messages list on error Contains one or more messages.
options options on ok Contains a list of method options.
search search on ok Contains the search term.
view view on ok Contains the paginate result counts.
artists list on ok Contains a paged list of artists that meet the search criteria. See the example response below for typical artist elements.
Example Response

<?xml version="1.0" encoding="UTF-8"?>
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status code="200">ok</status>
    <options format="xml"/>
    <search term="bob marley"/>
    <view page="1" pages="9" perPage="3" total="25"/>
    <artists list="true" size="3">
        <artist id="10559083" name="Bob Marley" url="http://www.emusic.com/artist/Bob-Marley-MP3-Download/10559083.html"/>
        <artist id="10559248" name="Bob Marley and the Wailers" url="http://www.emusic.com/artist/Bob-Marley-and-the-Wailers-MP3-Download/10559248.html"/>
        <artist id="11650684" name="Bob Marley &amp; Lee Scratch Perry" url="http://www.emusic.com/artist/Bob-Marley-Lee-Scratch-Perry-MP3-Download/11650684.html"/>
    </artists>
</response>