Chapter API Methods. API Methods

API Methods.1. Artist(s) Methods
API Methods.1.1. artist/top
API Methods.1.2. artist/byId
API Methods.1.3. artist/byLetter
API Methods.1.4. artist/byName
API Methods.1.5. artist/topTracks
API Methods.2. Release(s) Methods
API Methods.2.1. release/byId
API Methods.2.2. release/byType
API Methods.2.3. release/byArtist
API Methods.2.4. release/byGenre
API Methods.2.5. release/bySeries
API Methods.2.6. release/byAddedDate
API Methods.3. Genre(s) Methods
API Methods.3.1. genre/byId
API Methods.3.2. genre/byArtist
API Methods.3.3. genre/all
API Methods.4. Series Methods
API Methods.4.1. series/root
API Methods.4.2. series/byId
API Methods.5. Search Methods
API Methods.5.1. search/artist
API Methods.5.2. search/track
API Methods.5.3. search/release
API Methods.6. search
API Methods.7. chart

API Methods.1. Artist(s) Methods

API Methods.1.1. artist/top

Description

Get list of top artists.

Endpoint

http://api.mp3caprice.com/1.0/artist/top

Method Parameters

No parameters.

Result Structure

List of Artists or Error

Result sorting order

Artists sorted from most popular to less popular.

Possible Errors

Common Errors

Method Example

Example API Methods.1. Get artist by id

http://api.mp3caprice.com/1.0/artist/top.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <artists>
  <artist>
   <artistId>182</artistId>
   <artistName>Eminem</artistName>
   <releasesCount>20</releasesCount>
   <tracksCount>322</tracksCount>
   <artistUrl>
    http://mp3caprice.com/artist/eminem-182?pid=P_00101
   </artistUrl>
   <artistLargeCoverUrl>
    http://cvr.mp3caprice.com/covers/artists/000/182/230.jpg
   </artistLargeCoverUrl>
   <artistSmallCoverUrl>
    http://cvr.mp3caprice.com/covers/artists/000/182/90.jpg
   </artistSmallCoverUrl>
  </artist>
  ...
 </artists>
</apiResponse>
[Note]

To get top artists in json format use url like

http://api.mp3caprice.com/1.0/artist/top.json?api_key={API Key}&sub_account={sub_account}
                  

API Methods.1.2. artist/byId

Description

Get artist by id

Endpoint

http://api.mp3caprice.com/1.0/artist/byId/{artistId}

Method Parameters

artistId

positive integer value; specifies the artist's id.

Result Structure

Artist or Error

Result sorting order

Single artist structure returned

Method Example

Example API Methods.2. Get artist by id

http://api.mp3caprice.com/1.0/artist/byId/1.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <artistId>1</artistId>
 <artistName>Aerosmith</artistName>
 <releasesCount>28</releasesCount>
 <tracksCount>237</tracksCount>
 <artistUrl>
  http://mp3caprice.com/artist/aerosmith-1?pid=P_00101
 </artistUrl>
 <artistLargeCoverUrl>
  http://cvr.mp3caprice.com/covers/artists/000/001/230.jpg
 </artistLargeCoverUrl>
 <artistSmallCoverUrl>
  http://cvr.mp3caprice.com/covers/artists/000/001/90.jpg
 </artistSmallCoverUrl>
</apiResponse>
[Note]

To get artist by id in json format use url like

http://api.mp3caprice.com/1.0/artist/byId/1.json?api_key={API Key}&sub_account={sub_account}
                  

API Methods.1.3. artist/byLetter

Description

Get page of artists beginning with specified letter. To get artist starting with special symbols/digits use zero character - "0".

Results sorted in alphabetical order. Result contains artist who have at least one album, own compilation or live. Artists that appear only in VA compilations or soundtracks will not be included in the results list.

Endpoint

http://api.mp3caprice.com/1.0/artist/byLetter/{pageSize}/{pageNumber}/{letter}

Method Parameters

pageSize

positive integer value; specified the page size to be returned. Maximum allowed value is 50 .

pageNumber

positive integer value; specified the page number to be returned.

letter

character value, specified the first letter of artists name to be returned.

[Note]

pageSize and pageNumber are pagination parameters.

Result Structure

Table API Methods.1. Artist by letter result structure

Attribute Type Required Details
letter char yes The specified letter artists were retrieved by
Paginator attributes Paginator yes Paginated artists beginning with specified letter.

or Error

Result sorting order

Paginated artist structures ordered by:

  • artist.artistName

Method Example

Example API Methods.3. Get first page of artists beginning with ‘T' letter

http://api.mp3caprice.com/1.0/artist/byLetter/10/1/T.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <letter>T</letter>
 <paginator>
  <pageNumber>1</pageNumber>
  <pageSize>10</pageSize>
  <pageCount>12</pageCount>
  <pageItems>
   <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="artist">
    <artistId>439</artistId>
    <artistName>Take That</artistName>
    <releasesCount>6</releasesCount>
    <tracksCount>82</tracksCount>
    <artistUrl>
     http://mp3caprice.com/artist/take-that-439?pid=P_00101
    </artistUrl>
    <artistLargeCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/000/439/230.jpg
    </artistLargeCoverUrl>
    <artistSmallCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/000/439/90.jpg
    </artistSmallCoverUrl>
   </item>
   ...
  </pageItems>
 </paginator>
</apiResponse>
[Note]

To get first page of artists beginning with ‘T' letter in json format use url like

http://api.mp3caprice.com/1.0/artist/byLetter/10/1/T.json?api_key={API Key}&sub_account={sub_account}
                  

Example API Methods.4. Get first page of artists beginning not ‘A' -'Z' symbols

http://api.mp3caprice.com/1.0/artist/byLetter/10/1/0.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <letter>0</letter>
 <paginator>
  <pageNumber>1</pageNumber>
  <pageSize>10</pageSize>
  <pageCount>2</pageCount>
  <pageItems>
   <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="artist">
    <artistId>3286</artistId>
    <artistName>:wumpscut:</artistName>
    <releasesCount>1</releasesCount>
    <tracksCount>11</tracksCount>
    <artistUrl>
     http://mp3caprice.com/artist/-wumpscut--3286?pid=P_00101
    </artistUrl>
    <artistLargeCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/003/286/230.jpg
    </artistLargeCoverUrl>
    <artistSmallCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/003/286/90.jpg
    </artistSmallCoverUrl>
   </item>
   <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="artist">
    <artistId>49</artistId>
    <artistName>1200 Micrograms</artistName>
    <releasesCount>1</releasesCount>
    <tracksCount>7</tracksCount>
    <artistUrl>
     http://mp3caprice.com/artist/1200-micrograms-49?pid=P_00101
    </artistUrl>
    <artistLargeCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/000/049/230.jpg
    </artistLargeCoverUrl>
    <artistSmallCoverUrl>
     http://cvr.mp3caprice.com/covers/artists/000/049/90.jpg
    </artistSmallCoverUrl>
   </item>
   ...
  </pageItems>
 </paginator>
</apiResponse>
[Note]

To get first page of artists beginning with special characters/digits in json format use url like

http://api.mp3caprice.com/1.0/artist/byLetter/10/1/0.json?api_key={API Key}&sub_account={sub_account}
                  

API Methods.1.4. artist/byName

Description

Get artist by name. Case insentitive.

Endpoint

http://api.mp3caprice.com/1.0/artist/byName/{artistName}

Method Parameters

artistName

string value; Case insensitive and Url encoded artist name.

Result Structure

Artist or Error

Result sorting order

Single artist structure returned.

Method Example

Example API Methods.5. Get artist by name

http://api.mp3caprice.com/1.0/artist/byName/Die+Fantastischen+Vier.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <artistId>3729</artistId>
 <artistName>Die Fantastischen Vier</artistName>
 <releasesCount>2</releasesCount>
 <tracksCount>2</tracksCount>
 <artistUrl>
  http://mp3caprice.com/artist/die-fantastischen-vier-3729?pid=P_00101
 </artistUrl>
 <artistLargeCoverUrl>
  http://cvr.mp3caprice.com/covers/artists/003/729/230.jpg
 </artistLargeCoverUrl>
 <artistSmallCoverUrl>
  http://cvr.mp3caprice.com/covers/artists/003/729/90.jpg
 </artistSmallCoverUrl>
</apiResponse>
[Note]

To get artist by name in json format use url like

http://api.mp3caprice.com/1.0/artist/byName/Die+Fantastischen+Vier.json?api_key={API Key}&sub_account={sub_account}
                  

API Methods.1.5. artist/topTracks

Description

Get artist's top tracks.

Endpoint

http://api.mp3caprice.com/1.0/artist/topTracks/{maxSize}/{artistId}

Method Parameters

maxSize

integer value; specifies the maximum number of results to be returned. Maximum allowed value is 25.

artistId

positive integer value; specifies the artist's id.

Result Structure

Table API Methods.2. Artist's top tracks result structure

Attribute Type Required Details
artistId integer yes Mp3Caprice Artist’s id
topTracks List of Tracks yes Artist's top tracks.

or Error

Result sorting order

Tracks are sorted by their popularity.

Method Example

Example API Methods.6. Get artist's top tracks

http://api.mp3caprice.com/1.0/artist/topTracks/10/2.xml?api_key={API Key}&sub_account={sub_account}
                  

<apiResponse>
 <artistId>2</artistId>
 <topTracks>
  <track>
   <releaseId>4</releaseId>
   <artistId>2</artistId>
   <artistName>Alizée</artistName>
   <trackName>Intralizée</trackName>
   <trackPosition>1</trackPosition>
   <discNumber>0</discNumber>
   <trackPrice>0.12</trackPrice>
   <trackLength>109</trackLength>
   <trackSize>4357744</trackSize>
   <trackBitrate>320</trackBitrate>
   <trackPreview>
    http://prv.mp3caprice.com/preview/000/004/0-32.mp3
   </trackPreview>
  </track>
  ...
 </topTracks>
</apiResponse>
[Note]

To get artist's top tracks in json format use url like

http://api.mp3caprice.com/1.0/artist/topTracks/10/2.json?api_key={API Key}&sub_account={sub_account}