hanneshapke / pyzillow

pyzillow is a python library to access the Zillow APIs
MIT License
98 stars 68 forks source link

HTTP Error on example in docs #68

Open MorganWeiss opened 3 years ago

MorganWeiss commented 3 years ago

I tried running the following code

from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults
zillow_data = ZillowWrapper(ZWSID)
deep_search_response = zillow_data.get_deep_search_results('2114 Bigelow Ave','98109',True)
result = GetDeepSearchResults(deep_search_response)
result

I get this error message

HTTPError                                 Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/pyzillow/pyzillow.py in get_data(self, url, params)
    121         try:
--> 122             request.raise_for_status()
    123         except requests.exceptions.HTTPError:

~/anaconda3/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
    940         if http_error_msg:
--> 941             raise HTTPError(http_error_msg, response=self)
    942 

HTTPError: 410 Client Error: Gone for url: http://www.zillow.com/webservice/GetDeepSearchResults.htm?address=2114+Bigelow+Ave&citystatezip=98109&rentzestimate=true&zws-id=my_api_key
During handling of the above exception, another exception occurred:

ZillowFail                                Traceback (most recent call last)
<ipython-input-3-2a260800eda7> in <module>
      1 from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults
      2 zillow_data = ZillowWrapper(ZWSID)
----> 3 deep_search_response = zillow_data.get_deep_search_results('2114 Bigelow Ave','98109',True)
      4 result = GetDeepSearchResults(deep_search_response)
      5 result

~/anaconda3/lib/python3.7/site-packages/pyzillow/pyzillow.py in get_deep_search_results(self, address, zipcode, rentzestimate)
     75             "zws-id": self.api_key,
     76         }
---> 77         return self.get_data(url, params)
     78 
     79     def get_updated_property_details(self, zpid: str):

~/anaconda3/lib/python3.7/site-packages/pyzillow/pyzillow.py in get_data(self, url, params)
    122             request.raise_for_status()
    123         except requests.exceptions.HTTPError:
--> 124             raise ZillowFail
    125 
    126         try:

ZillowFail: 
clkwrkunvrs commented 3 years ago

I 2nd this

clkwrkunvrs commented 3 years ago

@MorganWeiss Looks like zillow passed their API on to Bridge interactive and this has codebase has not been updated to reflect that. https://bridgedataoutput.com/docs/explorer/mls-data#listZestimates

https://estated.com/blog/what-happened-to-zillows-api

alexmlopez commented 3 years ago

@MorganWeiss I've been testing it, and works just fine. from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults ...: zillow_data = ZillowWrapper('my_id' ) ...: deep_search_response = zillow_data.get_deep_search_results('2114 Bigelow Ave','98109',True) ...: result = GetDeepSearchResults(deep_search_response)

In [20]: print(result.zillow_id)
48749425

In [21]: print(result.map_this_home_link)
http://www.zillow.com/homes/48749425_zpid/

samshipengs commented 2 years ago

any update on this? also got the ZillowFail error

espressobeanies commented 2 years ago

Same error here. Both API types aren't working: GetDeepSearchResults, GetUpdatedPropertyDetails

My output:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyzillow/pyzillow.py", line 122, in get_data
    request.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: Gone for url: http://www.zillow.com/webservice/GetDeepSearchResults.htm?address=<sanitized>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dave/Documents/scripts/realtor_apis/./zillow_test.py", line 5, in <module>
    result = GetDeepSearchResults(zillow_data.get_deep_search_results('<example property street address>', '<example zipcode>', False))
  File "/usr/local/lib/python3.9/dist-packages/pyzillow/pyzillow.py", line 77, in get_deep_search_results
    return self.get_data(url, params)
  File "/usr/local/lib/python3.9/dist-packages/pyzillow/pyzillow.py", line 124, in get_data
    raise ZillowFail
pyzillow.pyzillowerrors.ZillowFail

Note I had to sanitize my API key and street address I was searching by.

valankar commented 2 years ago

I'm getting this error as well. Does this library work?

valankar commented 2 years ago

According to these posts, this API doesn't exist anymore:

https://stackoverflow.com/questions/66394686/zillow-api-returning-410-response

https://twitter.com/zillow/status/1365418247949058048

clkwrkunvrs commented 2 years ago

I Did end up getting it working a few years ago after I posted my comment but I can’t remember the solution. Keep googling and don’t lose hope. post the solution if you find it. If the API no longer exists though …

On Aug 20, 2022, at 4:45 AM, valankar @.***> wrote: . Don’t lose hope. Keep googling and post solution when you find it

According to this post, this API doesn't exist anymore:

https://stackoverflow.com/questions/66394686/zillow-api-returning-410-responsehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F66394686%2Fzillow-api-returning-410-response&data=05%7C01%7C%7Ca542d86d3079480292ab08da82a18169%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637965927427336896%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XUkX6x93CkF1IW7bHyejLc8O17DNnd2TKc2%2FvtvM2SU%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhanneshapke%2Fpyzillow%2Fissues%2F68%23issuecomment-1221299911&data=05%7C01%7C%7Ca542d86d3079480292ab08da82a18169%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637965927427336896%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MiVQctLHFFjizYtFIBFJllw6dwZwaCnlg3ykXgEJA7M%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADM56CGADVCKIDA7EJLEKHLV2DAOFANCNFSM4Y7NPJCQ&data=05%7C01%7C%7Ca542d86d3079480292ab08da82a18169%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637965927427336896%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AOtwJFOw1iKR9YvKnFcLsCdoMm7BtNADr%2Bax6JbF3b8%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

valankar commented 2 years ago

The only thing I found was a Rapid API:

https://rapidapi.com/s.mahmoud97/api/zillow56/

which is unfortunately not free.