-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't get more than 300 listings. #15
Comments
I actually have a similar problem but with only 50 listings. Has anyone found the reason why? |
50 is the maximum number for one page. to get more listings, you have to set items_offset parameter. |
But though I set items_offset to 300, it doesn't return 301th~350th listings. |
Even with "api.get_homes('toronto, ontario', items_per_grid = 50, offset = 51)", I can't seem to get more results... |
@malong204-dev You will have to iterate through each page utilizing a for loop. I would suggest utilizing a function to help get all of the listing within a single market. i.e.
|
So, I just ran with offset from 0 to 400 with increments of 50. Offsets 300, 350, and 400 all gave the same data. As explained in the readme, the maximum number of listings you can get for a particular city using get_homes() method is 306. I understood items_per_grid as items per page, but in reality the items per page is 50. You cannot get more listings than 306 no matter if you loop or adjust the offset. Does anyone have a solution around this? My goal (as likely everyone else's) is to get all the listings for a particular city. Thank you in advance if anyone has the answer and is kind enough to share! |
@tcardim My workaround was to run more localized queries using different neighborhoods within the city. If you look at the JSON output, you will find a couple neighborhood fields you can use to build up a set of distinct neighborhoods that the API might recognize (some produced no results for me). Using this strategy, I was able to find a few thousand unique listings. However, I was searching within a major US city and I cannot say if this will work elsewhere. |
When I search for listings using the get_homes() method, I can't get more than 300 listings.
Even though there are more listings and I increase the page number, it doesn't return after 300th listing.
Is there any way to get all listings?
The text was updated successfully, but these errors were encountered: