Method: Book Search

Conducts a book search using a search term. Provides paginated results.

Request URL

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

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

Request Parameters

Following is a list of required and optional query string parameters for the Book 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 YES none A URL-encoded search term with which to search books.
page no 1 The starting page index of returned books. (Used for paginating through longer result lists.)
perPage no 20 The number of books 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 books that contain the string "galaxy".
http://api.emusic.com/book/search?apiKey=myKey&term=balaxy

// Returns the third page of 10 books.
http://api.emusic.com/book/search?apiKey=myKey&term=galaxy&page=3&perPage=10

// Returns the first 20 books in JSON.
http://api.emusic.com/book/search?apiKey=myKey&term=galaxy&format=JSON

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

http://api.emusic.com/book/search?apiKey=myKey&term=galaxy&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.
books list on ok Contains a paged list of books that meet the search criteria. See the example response below for typical book 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="galaxy"/>
    <view page="1" pages="1" perPage="20" total="3"/>
    <books list="true" size="3">
        <book abridged="false" added="2007-09-17" bookLength="21071" downloadsThisMonth="134" downloadsThisWeek="25" downloadsToday="1" editorsPick="1" exclusive="false" fiction="true" id="10001009" image="http://images.emusic.com/books/images/book/0/100/010/10001009/300x300.jpg" length="21071" name="The Hitchhiker's Guide To The Galaxy" sample="http://www.emusic.com/samples/m3u/book/10001009/0.m3u" url="http://www.emusic.com/audiobooks/book/Douglas-Adams-The-Hitchhiker-s-Guide-To-The-Galaxy-MP3-Download/10001009.html">
            <genre id="1036" name="Humor" url="http://www.emusic.com/genre/1036.html"/>
            <author id="11826661" name="Douglas Adams" url="http://www.emusic.com/audiobooks/author/Douglas-Adams-MP3-Download/11826661.html"/>
            <narrator id="11826835" name="Stephen Fry" url="http://www.emusic.com/audiobooks/narrator/Stephen-Fry-MP3-Download/11826835.html"/>
            <publisher id="41" name="Random House Inc.">
                <imprint id="41" name="Random House Audio"/>
            </publisher>
        </book>
        <book abridged="false" added="2008-08-22" bookLength="28857" downloadsThisMonth="5" downloadsThisWeek="1" downloadsToday="0" editorsPick="0" exclusive="false" fiction="true" id="10021919" image="http://images.emusic.com/books/images/book/0/100/219/10021919/300x300.jpg" length="28857" name="The Salmon of Doubt" sample="http://www.emusic.com/samples/m3u/book/10021919/0.m3u" url="http://www.emusic.com/audiobooks/book/Douglas-Adams-The-Salmon-of-Doubt-MP3-Download/10021919.html">
            <genre id="1036" name="Humor" url="http://www.emusic.com/genre/1036.html"/>
            <author id="11826661" name="Douglas Adams" url="http://www.emusic.com/audiobooks/author/Douglas-Adams-MP3-Download/11826661.html"/>
            <narrator id="12059758" name="Christopher Cerf" url="http://www.emusic.com/audiobooks/narrator/Christopher-Cerf-MP3-Download/12059758.html"/>
            <publisher id="181" name="Phoenix Books, Inc">
                <imprint id="421" name="Phoenix Audio"/>
            </publisher>
        </book>
        <book abridged="true" added="2008-07-01" bookLength="5814" downloadsThisMonth="1" downloadsThisWeek="0" downloadsToday="0" editorsPick="0" exclusive="false" fiction="true" id="10017702" image="http://images.emusic.com/books/images/book/0/100/177/10017702/300x300.jpg" length="5814" name="Doctor Who: Galaxy 4" sample="http://www.emusic.com/samples/m3u/book/10017702/0.m3u" url="http://www.emusic.com/audiobooks/book/BBC-Audiobooks-Doctor-Who-Galaxy-4-MP3-Download/10017702.html">
            <genre id="1058" name="Performing Arts" url="http://www.emusic.com/genre/1058.html"/>
            <author id="11980977" name="BBC Audiobooks" url="http://www.emusic.com/audiobooks/author/BBC-Audiobooks-MP3-Download/11980977.html"/>
            <narrator id="12110881" name="William Hartnell" url="http://www.emusic.com/audiobooks/narrator/William-Hartnell-MP3-Download/12110881.html"/>
            <publisher id="241" name="BBC Audiobooks Ltd">
                <imprint id="501" name="BBC Audio"/>
            </publisher>
        </book>
    </books>
</response>