Skip to content
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

Question: is it possible to pull data by municipality name, property type and land size? #5

Open
DanWismer opened this issue May 12, 2023 · 1 comment

Comments

@DanWismer
Copy link

As I was looking for a way to access realtor.ca data, I stumbled upon this awesome repo! I work for the Nature Conservancy of Canada where one of our goals is to purchase private land for conservation. Apologies for the specific question, but with this scraper you built, is it possible to pull data by municipality name, property type and land size? This API has serious potential to help us improve how we prioritize available private lands.

Thanks!

@harry-s-grewal
Copy link
Owner

harry-s-grewal commented May 18, 2023

Hey Dan! Thanks for the feedback and the awesome question. Happy to help

See this screenshot - this is the payload sent to realtor.ca's PropertySearch_Post API endpoint.

image

As you can see, there's two fields that can provide the information you need.

Firstly, LandSizeRange. I've mapped out the following values for the land-size so you can find what you need.

Land Size Range LandSizeRange
0 - 1/4 Acre LandSizeRange: 0-0.25
1/4 - 1/2 Acre LandSizeRange: 0.25-0.5
1/2 - 1 Acre LandSizeRange: 0.5-1
1+ Acre LandSizeRange: 1-0
2+ Acre LandSizeRange: 2-0

Secondly, PropertySearchTypeId will give you the property type you want.

Property Type PropertySearchTypeId
Any commercial PropertySearchTypeId: 0
Residential PropertySearchTypeId: 1
Recreational PropertySearchTypeId: 2
Condo PropertySearchTypeId: 3
Vacant land PropertySearchTypeId: 6
Multi-Family PropertySearchTypeId: 8

I've tested both of these additions to the query, and they work.

As for your final question, you should be able to specify the municipality as an argument to get_property_list_by_city(). Is that what you mean, or did I misunderstand?

I'm happy to hear this library is helping the NCC! Please don't hesitate if you have any more questions.

Also, if you need some help with this project, feel free to reach out to me on LinkedIn at linkedin.com/in/harry-s-grewal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants