I am trying to search images on Wikimedia Commons, using MediaWiki API. Here is my requested URL with search params:
https://commons.wikimedia.org/w/api.php?action=query&list=allimages&format=json&aifrom=Dada
I am succeed to get response in JSON format, but I could not read it programmatically because:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Any advice?
UPDATE:
I have added one more param to the url: callback=JSON_CALLBACK
, which transforms response to jsonp format. Now it possible to use angular $http.jsonp()
method also.