You cannot retrieve data from another host using AJAX because of the same-origin policy.
It may be possible to use jsonp
if the other host supports it. It is explained how to use jsonp
with jQuery in the jQuery manual. In the specific case of Flickr there is a blogpost explaining how to use jsonp with flickr.