I am trying to get URL using zillow api in angular JS.
angular.module('account.settings').controller('AccountSettingsCtrl', ['$scope', '$http', '$sce',
function($scope, $http, $sce) {
var getZillowURL = function() {
var url = "http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=X1-ZWz1ft20wfj30r_94p25&address=2114+Bigelow+Ave&citystatezip=Seattle%2C+WA";
var trustedUrl = $sce.trustAsResourceUrl(url);
$http.jsonp(trustedUrl, {
jsonpCallbackParam: 'callback'
})
.success(function(result) {
$scope.mortgageLocation = result;
console.log('success!');
console.log(result);
})
.error(function(data, status) {
console.log('error!');
console.log(data);
});
};
getZillowURL();
}
]);
But JSONP returns error. When I access with the URL which is used as JSONP parameter, webbrowser shows correctly. This zillow API returns XML data. How can I get this as a JSON type data?