Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
646 lines (612 sloc) 21.5 KB

Muzooka API v2

Changelog

  • 2018.11.27 v2 of API released
  • 2018.11.30 imageSource added to artist response

Artist Lookup Endpoint

To lookup an artist, use their name or a portion of it for a fuzzy match. Use following endpoint: GET https://devapi.muzooka.com/v2/artists

Supported query parameters are:

  • name: Will perform a search the name.
  • limit: Will paginate the result in pages of given size. Maximum page limit is 100, default limit is 25.
  • offset: To select certain page of results, set an offset. This will skip given number of records from the top of the list.

Result would contain two top-level fileds: data and pages. data is an array of results, pages is the information about pagination.

Example Response

{
    "data": [
        {
            "id": "5678046685",
            "name": "U2",
            "image": [
                {
                    "width": 1548,
                    "height": 1024,
                    "ratio": null,
                    "name": "original",
                    "url": "https://media.muzooka.com/images/109150/original.jpg"
                },
                {
                    "width": 320,
                    "height": 240,
                    "ratio": "4x3",
                    "name": "small1",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/small1.jpg"
                },
                {
                    "width": 320,
                    "height": 180,
                    "ratio": "16x9",
                    "name": "small1",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/small1.jpg"
                },
                {
                    "width": 320,
                    "height": 135,
                    "ratio": "21x9",
                    "name": "small1",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/small1.jpg"
                },
                {
                    "width": 768,
                    "height": 576,
                    "ratio": "4x3",
                    "name": "small2",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/small2.jpg"
                },
                {
                    "width": 768,
                    "height": 432,
                    "ratio": "16x9",
                    "name": "small2",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/small2.jpg"
                },
                {
                    "width": 768,
                    "height": 324,
                    "ratio": "21x9",
                    "name": "small2",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/small2.jpg"
                },
                {
                    "width": 1280,
                    "height": 960,
                    "ratio": "4x3",
                    "name": "medium1",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/medium1.jpg"
                },
                {
                    "width": 1280,
                    "height": 720,
                    "ratio": "16x9",
                    "name": "medium1",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/medium1.jpg"
                },
                {
                    "width": 1280,
                    "height": 540,
                    "ratio": "21x9",
                    "name": "medium1",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/medium1.jpg"
                },
                {
                    "width": 1920,
                    "height": 1440,
                    "ratio": "4x3",
                    "name": "medium2",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/medium2.jpg"
                },
                {
                    "width": 1920,
                    "height": 1080,
                    "ratio": "16x9",
                    "name": "medium2",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/medium2.jpg"
                },
                {
                    "width": 1920,
                    "height": 810,
                    "ratio": "21x9",
                    "name": "medium2",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/medium2.jpg"
                },
                {
                    "width": 2560,
                    "height": 1920,
                    "ratio": "4x3",
                    "name": "large1",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/large1.jpg"
                },
                {
                    "width": 2560,
                    "height": 1440,
                    "ratio": "16x9",
                    "name": "large1",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/large1.jpg"
                },
                {
                    "width": 2560,
                    "height": 1080,
                    "ratio": "21x9",
                    "name": "large1",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/large1.jpg"
                },
                {
                    "width": 3840,
                    "height": 2880,
                    "ratio": "4x3",
                    "name": "large2",
                    "url": "https://media.muzooka.com/images/109150/landscape/4x3/large2.jpg"
                },
                {
                    "width": 3840,
                    "height": 2160,
                    "ratio": "16x9",
                    "name": "large2",
                    "url": "https://media.muzooka.com/images/109150/landscape/16x9/large2.jpg"
                },
                {
                    "width": 3840,
                    "height": 1620,
                    "ratio": "21x9",
                    "name": "large2",
                    "url": "https://media.muzooka.com/images/109150/landscape/21x9/large2.jpg"
                },
                {
                    "width": 320,
                    "height": 320,
                    "ratio": "1x1",
                    "name": "small1",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/small1.jpg"
                },
                {
                    "width": 768,
                    "height": 768,
                    "ratio": "1x1",
                    "name": "small2",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/small2.jpg"
                },
                {
                    "width": 1280,
                    "height": 1280,
                    "ratio": "1x1",
                    "name": "medium1",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/medium1.jpg"
                },
                {
                    "width": 1920,
                    "height": 1920,
                    "ratio": "1x1",
                    "name": "medium2",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/medium2.jpg"
                },
                {
                    "width": 2560,
                    "height": 2560,
                    "ratio": "1x1",
                    "name": "large1",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/large1.jpg"
                },
                {
                    "width": 3840,
                    "height": 3840,
                    "ratio": "1x1",
                    "name": "large2",
                    "url": "https://media.muzooka.com/images/109150/landscape/1x1/large2.jpg"
                }
            ],
            "imageSource": "upload",
            "city": "Dublin",
            "province": "County Dublin",
            "country": "Ireland",
            "website": "http://www.u2.com/",
            "bio": "U2 are an Irish rock band from Dublin formed in 1976. The group consists of Bono (lead vocals and rhythm guitar), the Edge (lead guitar, keyboards, and backing vocals), Adam Clayton (bass guitar), and Larry Mullen Jr. (drums and percussion). Initially rooted in post-punk, U2's musical style has evolved throughout their career, yet has maintained an anthemic sound built on Bono's expressive vocals and the Edge's effects-based guitar textures. Their lyrics, often embellished with spiritual imagery, focus on personal and sociopolitical themes. Popular for their live performances, the group have staged several ambitious and elaborate tours over their career.",
            "socialLinks": [
                {
                    "type": "twitter",
                    "id": "u2",
                    "url": "https://twitter.com/u2"
                },
                {
                    "type": "facebook",
                    "id": "u2",
                    "url": "https://www.facebook.com/u2"
                },
                {
                    "type": "instagram",
                    "id": "u2",
                    "url": "https://www.instagram.com/u2"
                },
                {
                    "type": "spotify",
                    "id": null,
                    "url": "https://open.spotify.com/artist/51Blml2LZPmy7TTiAg47vQ"
                },
                {
                    "type": "youtube",
                    "id": "u2official",
                    "url": "https://www.youtube.com/channel/u2official"
                },
                {
                    "type": "iheartradio",
                    "id": "u2-970/",
                    "url": "https://www.iheart.com/artist/u2-970/"
                },
                {
                    "type": "bandsintown",
                    "id": "U2",
                    "url": "https://www.bandsintown.com/U2"
                },
                {
                    "type": "soundcloud",
                    "id": "u2",
                    "url": "https://www.soundcloud.com/u2"
                }
            ],
            "links": {
                "self": "https://devapi.muzooka.com/v2/artists/u2",
                "images": "https://devapi.muzooka.com/v2/artists/u2/images",
                "videos": "https://devapi.muzooka.com/v2/artists/u2/videos",
                "muzookaUrl": "https://app.muzooka.com/u2"
            }
        }
    ],
    "pages": {
        "limit": 25,
        "offset": 0,
        "total": 1,
        "totalPages": 1
    }
}

Artist Endpoint

The following endpoint returns the artists data GET https://devapi.muzooka.com/v2/artists/:muzookaId

Response Structure

  • id: Muzooka artist id
  • name: Artist name
  • image: The artist's image as an array of various sizes and ratios
  • imageSource: The source of the image, facebook or upload, images with a source of upload were set by the artists management team
  • city: City the artist resides in
  • province: Province or state the artist resides in
  • country: Country the artist resides in
  • website: Artist website
  • bio: A biographical summary about the artist
  • socialLinks: An array of social media links, only existing social links for the given artist will be included
    • type: Type of social media link (for example, twitter)
    • id: Social media id, username or profile
    • url: Direct link to social media account
  • links
    • self: Endpoint for artist
    • videos: Endpoint for artist videos
    • images: Endpoint for images the artist have uploaded
    • muzookaUrl: The artist page on Muzooka.com

Example Response

{
    "id": "5678046685",
    "name": "U2",
    "image": [
        {
            "width": 1548,
            "height": 1024,
            "ratio": null,
            "name": "original",
            "url": "https://media.muzooka.com/images/109150/original.jpg"
        },
        {
            "width": 320,
            "height": 240,
            "ratio": "4x3",
            "name": "small1",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/small1.jpg"
        },
        {
            "width": 320,
            "height": 180,
            "ratio": "16x9",
            "name": "small1",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/small1.jpg"
        },
        {
            "width": 320,
            "height": 135,
            "ratio": "21x9",
            "name": "small1",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/small1.jpg"
        },
        {
            "width": 768,
            "height": 576,
            "ratio": "4x3",
            "name": "small2",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/small2.jpg"
        },
        {
            "width": 768,
            "height": 432,
            "ratio": "16x9",
            "name": "small2",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/small2.jpg"
        },
        {
            "width": 768,
            "height": 324,
            "ratio": "21x9",
            "name": "small2",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/small2.jpg"
        },
        {
            "width": 1280,
            "height": 960,
            "ratio": "4x3",
            "name": "medium1",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/medium1.jpg"
        },
        {
            "width": 1280,
            "height": 720,
            "ratio": "16x9",
            "name": "medium1",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/medium1.jpg"
        },
        {
            "width": 1280,
            "height": 540,
            "ratio": "21x9",
            "name": "medium1",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/medium1.jpg"
        },
        {
            "width": 1920,
            "height": 1440,
            "ratio": "4x3",
            "name": "medium2",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/medium2.jpg"
        },
        {
            "width": 1920,
            "height": 1080,
            "ratio": "16x9",
            "name": "medium2",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/medium2.jpg"
        },
        {
            "width": 1920,
            "height": 810,
            "ratio": "21x9",
            "name": "medium2",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/medium2.jpg"
        },
        {
            "width": 2560,
            "height": 1920,
            "ratio": "4x3",
            "name": "large1",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/large1.jpg"
        },
        {
            "width": 2560,
            "height": 1440,
            "ratio": "16x9",
            "name": "large1",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/large1.jpg"
        },
        {
            "width": 2560,
            "height": 1080,
            "ratio": "21x9",
            "name": "large1",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/large1.jpg"
        },
        {
            "width": 3840,
            "height": 2880,
            "ratio": "4x3",
            "name": "large2",
            "url": "https://media.muzooka.com/images/109150/landscape/4x3/large2.jpg"
        },
        {
            "width": 3840,
            "height": 2160,
            "ratio": "16x9",
            "name": "large2",
            "url": "https://media.muzooka.com/images/109150/landscape/16x9/large2.jpg"
        },
        {
            "width": 3840,
            "height": 1620,
            "ratio": "21x9",
            "name": "large2",
            "url": "https://media.muzooka.com/images/109150/landscape/21x9/large2.jpg"
        },
        {
            "width": 320,
            "height": 320,
            "ratio": "1x1",
            "name": "small1",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/small1.jpg"
        },
        {
            "width": 768,
            "height": 768,
            "ratio": "1x1",
            "name": "small2",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/small2.jpg"
        },
        {
            "width": 1280,
            "height": 1280,
            "ratio": "1x1",
            "name": "medium1",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/medium1.jpg"
        },
        {
            "width": 1920,
            "height": 1920,
            "ratio": "1x1",
            "name": "medium2",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/medium2.jpg"
        },
        {
            "width": 2560,
            "height": 2560,
            "ratio": "1x1",
            "name": "large1",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/large1.jpg"
        },
        {
            "width": 3840,
            "height": 3840,
            "ratio": "1x1",
            "name": "large2",
            "url": "https://media.muzooka.com/images/109150/landscape/1x1/large2.jpg"
        }
    ],
    "city": "Dublin",
    "province": "County Dublin",
    "country": "Ireland",
    "website": "http://www.u2.com/",
    "bio": "U2 are an Irish rock band from Dublin formed in 1976. The group consists of Bono (lead vocals and rhythm guitar), the Edge (lead guitar, keyboards, and backing vocals), Adam Clayton (bass guitar), and Larry Mullen Jr. (drums and percussion). Initially rooted in post-punk, U2's musical style has evolved throughout their career, yet has maintained an anthemic sound built on Bono's expressive vocals and the Edge's effects-based guitar textures. Their lyrics, often embellished with spiritual imagery, focus on personal and sociopolitical themes. Popular for their live performances, the group have staged several ambitious and elaborate tours over their career.",
    "socialLinks": [
        {
            "type": "twitter",
            "id": "u2",
            "url": "https://twitter.com/u2"
        },
        {
            "type": "facebook",
            "id": "u2",
            "url": "https://www.facebook.com/u2"
        },
        {
            "type": "instagram",
            "id": "u2",
            "url": "https://www.instagram.com/u2"
        },
        {
            "type": "spotify",
            "id": null,
            "url": "https://open.spotify.com/artist/51Blml2LZPmy7TTiAg47vQ"
        },
        {
            "type": "youtube",
            "id": "u2official",
            "url": "https://www.youtube.com/channel/u2official"
        },
        {
            "type": "iheartradio",
            "id": "u2-970/",
            "url": "https://www.iheart.com/artist/u2-970/"
        },
        {
            "type": "bandsintown",
            "id": "U2",
            "url": "https://www.bandsintown.com/U2"
        },
        {
            "type": "soundcloud",
            "id": "u2",
            "url": "https://www.soundcloud.com/u2"
        }
    ],
    "links": {
        "self": "https://devapi.muzooka.com/v2/artists/u2",
        "images": "https://devapi.muzooka.com/v2/artists/u2/images",
        "videos": "https://devapi.muzooka.com/v2/artists/u2/videos",
        "muzookaUrl": "https://app.muzooka.com/u2"
    }
}

Social Links

Currently, socialLinks field can have following types:

- twitter
- facebook
- instagram
- spotify
- youtube
- bandsintown
- soundcloud
- iheartradio
- mixcloud
- homepage
- ticketmaster
- lastfm
- itunes
- wiki
- vevo

Image Sizes/Ratios

Muzooka offers images in the following ratios and sizes

Ratios:

  • 1x1
  • 4x3
  • 16x9
  • 21x9

Sizes:

  • Small 1 (320px width)
  • Small 2 (768px width)
  • Medium 1 (1280px width)
  • Medium 2 (1920px width)
  • Large 1 (2560px width)
  • Large 2 (3840px width)

Example – NODE.JS

const axios = require('axios');

const muzookaAPIKey = 'EXTSyU^BAxK#ukJ$@aS5mj3z';
const config = {
  baseURL: 'https://devapi.muzooka.com/v2/',
  headers: {
    'X-api-key': muzookaAPIKey,
  },
};

const getArtist = muzookaId =>
  axios.get(`artists/${muzookaId}`, config)
    .then(({ data }) => data);

Example – PHP

The following example uses PHP and the library Httpful installed with Phar

<?php
include('./httpful.phar');

$response = \Httpful\Request::get('https://devapi.muzooka.com/v2/artists/U2')
    ->addHeader('X-api-key', 'EXTSyU^BAxK#ukJ$@aS5mj3z')
    ->expectsJson()
    ->send();

echo($response->body->name); //U2
?>

Artist Video Endpoint

The following endpoint returns the videos for the artist

GET https://devapi.muzooka.com/v2/artists/:muzookaId/videos

Response Structure

Array of:

  • id: Muzooka video id
  • name: Video name
  • url: The url of the video
  • isFeatured: Is set to true for a featured video, otherwise if false
  • videoId: The YouTube id of the video
  • embed: The embed url of the video

Example Response

[
  {
    "id": "123",
    "name": "U2 - Song For Someone (Directed by Matt Mahurin)",
    "url": "https://youtu.be/RFjcd_d2PhY",
    "isFeatured": false,
    "videoId": "RFjcd_d2PhY",
    "embed": "https://www.youtube.com/embed/RFjcd_d2PhY"
  },
  {
    "id": "456",
    "name": "U2 - I Still Haven't Found What I'm Looking For",
    "url": "https://youtu.be/e3-5YC_oHjE",
    "isFeatured": true,
    "videoId": "e3-5YC_oHjE",
    "embed": "https://www.youtube.com/embed/e3-5YC_oHjE"
  }
]

Artist Images Endpoint

The following endpoint returns the images for the artist

GET https://devapi.muzooka.com/v2/artists/:muzookaId/images

This endpoint returns an array of all images uploaded for an artist in the same format as the image is returned on the artists endpoint.