Edit in JSFiddle

$("#productname").select2({
                placeholder: "Type in 'Helpless'",
                minimumInputLength: 8,
                query: function(options){
                    $.ajax({
                        dataType: 'json',
                        url: "http://developer.echonest.com/api/v4/song/search?api_key=FILDTEOIK2HBORODV&format=json&artist=metallica&title=" + options.term + "&bucket=id:songmeanings&limit=true",
                        success: function (data, textStatus, jqXHR) {
                        var song = [];
                        var song = [{id: "1", text: data.response.songs[0].title }];
                           results = [{ text: "Songs", children: song},
                           {text: "<a href='#'>Click Here</a>" }],
                                options.callback({ results: results });
                        },
                    });
                }
});
<input id="productname" />

              

External resources loaded into this fiddle: