I’m trying to download realtor.com data using zipcode and a lat/lon bounding box. It seems to be limiting me to only one api call per 24 hour period. It doesn’t seem like I’m downloading that many records in the calls that are working, but when I try to pass a new zip and bounding box it’s giving a 443 error. Does anyone know what the issue might be? My code is below:
url = “https://realty-in-us.p.rapidapi.com/properties/v2/list-for-sale”
querystring = {
"offset":"0",
"limit":"1000",
"postal_code":zip_code,
"sort":"relevance",
"price_max":"450000",
"is_pending":"false",
"lat_max":maxy,
"lat_min":miny,
"lng_max":maxx,
"lng_min":minx}
headers = {
'x-rapidapi-host': "realty-in-us.p.rapidapi.com",
'x-rapidapi-key': ap_key
}
response = requests.request("GET", url, headers=headers, params=querystring)
ディスカッションに参加しましょう-以下にコメントを追加してください:
Well,
If you read the parameter (lat_max, lng_max,lat_min, lng_min) description carefully, you will see
"Look for properties in bounding box, this is the max latitude of the coordinate.
Has no affect if postal_code, or city or state_code parameter has value"
That means don’t use these parameters together, use “postal_code” OR “city” with “state_code” OR bounding box (lat_max, lng_max,lat_min, lng_min)
Regards.
what’s wrong is the ‘properties’:[] is coming back empty. but if I type the same zipcode into realtor.com I get plenty of properties returned. Or if I run this same request as the first request of the day with my python code it will return plenty of values in the ‘properties’:[] list. I have the code in a for loop, it makes a request for one zip code and lat/lon box at a time, then the next. It returns values for whichever zipcode and lat/lon combination is first in the list each day, then it’s empty for the rest.
Hello,
It is not 403 status code so what is wrong? If you want to have properties in the result, you should recheck your request parameter and values. You can always recheck your requests in the back end area of RapidAPI.
Regards.
thanks, what I’m getting from response.json() is below
{‘meta’: {‘build’: ‘3.23.180’,
‘schema’: ‘core.3’,
‘tracking_params’: {‘channel’: ‘for_sale’,
‘siteSection’: ‘for_sale’,
‘city’: ‘unknown’,
‘county’: ‘unknown’,
‘neighborhood’: ‘unknown’,
‘searchCityState’: ‘unknown’,
‘state’: ‘unknown’,
‘zip’: ‘94581’,
‘srpPropertyStatus’: ‘srp:for_sale’,
‘listingActivity’: ‘hide_pending’,
‘propertyStatus’: ‘for_sale’,
‘propertyType’: ‘any’,
‘searchBathrooms’: ‘any’,
‘searchBedrooms’: ‘any’,
‘searchMaxPrice’: ‘450000’,
‘searchMinPrice’: ‘unknown’,
‘searchRadius’: ‘unknown’,
‘searchHouseSqft’: ‘any’,
‘searchLotSqft’: ‘any’,
‘searchResults’: ‘unknown’,
‘sortResults’: ‘relevance’,
‘searchCoordinates’: ‘unknown’,
‘version’: ‘1.0’},
‘tracking’: ‘type|meta|data|resource_type|property_list|query|client_id|rdc_mobile_native,14.13.0.68|prop_status|for_sale|schema|core.3|limit|offset|postal_code|94581|sort|relevance|price|(Any,450000.0)|is_pending|count|total5K|0^$0|1|2|$3|4|5|$6|7|8|9|A|B|C|N|D|O|E|F|G|H|I|J|K|-2]|8|9|L|-5|M|-5]]’,
‘returned_rows’: 0,
‘matching_rows’: 0},
‘properties’: []}
Hello,
You should manually test the endpoint with a HTTP client such as : postman.com. You then paste the response message here to get further help.
Regards.