java developer
java developer

Reputation: 403

Unable to get the xml response from zillow api webservice which is called from angularjs

I'm trying to call the zillow api webservice url from angular js.

The following is my source code :

$http.get('http://www.zillow.com/webservice/GetZestimate.htm?zws-id=<ZWSID>&zpid=48749425').success(function(response) {
                                alert(response) ;
                                console.log(response);
                            });

It is giving the following error :

XMLHttpRequest cannot load http://www.zillow.com/webservice/GetZestimate.htm?zws-id=<ZWSID>&zpid=48749425.No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8080' is therefore not allowed access

Please anyone help me. Thanks in advance.!

Upvotes: 0

Views: 667

Answers (1)

java developer
java developer

Reputation: 403

From this Link : Zillow API Error:"No 'Access-Control-Allow-Origin' header is present"

Zillow doesn't support a JavaScript API so we would need to create own server-side service that queries it (forwards the query) and sits on the same domain as our HTML page.

The following post gives the full code using java

How to send data to an API call and get it back, using zillow.com API

Upvotes: 1

Related Questions