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

API Documentation? #4

Closed
nickelcitymario opened this issue Oct 5, 2018 · 13 comments
Closed

API Documentation? #4

nickelcitymario opened this issue Oct 5, 2018 · 13 comments

Comments

@nickelcitymario
Copy link

Do we know where there is documentation for the API itself? How did you find all the options? Was it by trial and error? I can't find anything for their API anywhere, but would love to build on this project.

@Froren
Copy link
Owner

Froren commented Oct 5, 2018

For Hacktoberfest right? :) Contributions are very welcome.

There really is no documentation. Most of this information I pulled from the DOM nodes of the realtor.ca website (since the elements actually correspond highly to what's passed in API requests, a la retro form submissions).

If you want to flesh or test things out, you should open up the network tab in a browser and play with searches on the realtor.ca website. You can see the request details and derive which API parameters correspond to which UI filters you used. (So yes, trial and error. Though you're not blindly making calls obviously.)

Interestingly enough most web APIs wouldn't be so easy to port to external usage as this one is. We're indebted to the fact that the token parameter isn't correctly secured, since that's the usual practice to protect your API against usage like this.

@Froren
Copy link
Owner

Froren commented Oct 5, 2018

In fact, I think the value of this repo comes from the documentation in the README rather than the actual API call that's being wrapped. It's no work at all to send a POST request in node.

@nickelcitymario
Copy link
Author

Yea, I actually tried to reach out to them (mistakenly thinking that their unsecured API meant they wanted developers to use it), and they shot me down, saying "this kind of use is not permitted". Hopefully the API continues to be available.

I'm going to play around with the network tab, as you recommend. I definitely have some ideas on things I'd like to develop on top of the API.

@Froren
Copy link
Owner

Froren commented Oct 5, 2018

Haha dear god I hope you didn't clue them into the illegal usage. Everyday's a gift with this API.

Yeah go nuts! Even if you don't build on top of this API directly, I've had a lot of fun making projects with maps + this API.

@HexagonStudio
Copy link

lol... always read their terms of use.... we are free to use their APIs as long as it is for personal usage
https://www.realtor.ca/Legal.aspx

This website/database is a copyright-protected work which is owned by CREA. Part of the contents of this website/database, including all real estate listings and related information, images and photographs (collectively, "Listing Content"), are also protected by copyright, which is owned by the CREA members who supplied the content and/or by third parties, and is reproduced in this website/database under license. The contents of this website/database, including the Listing Content, are intended for the private, non-commercial use by individuals. Any commercial use of the website/database, including the Listing Content, in whole or in part, directly or indirectly, is specifically forbidden except with the prior written authority of the owner of the copyright.

Users may, subject to these Terms of Use, print or otherwise save individual pages for private use. However, the contents of this website/database, including the Listing Content, may not be modified or altered in any respect, merged with other data or published in any form, in whole or in part. The prohibited uses include "screen scraping", "database scraping" and any other activity intended to collect, store, reorganize or manipulate data on the pages produced by, or displayed on the CREA websites.

@CreaDevteam
Copy link

I am the head developer who developed the API for realtor.ca along with the documentation. There's a reason that it's not available online and that's because it's NOT meant for public use. Your interpretation of our terms of use is also not correct.

@nickelcitymario
Copy link
Author

Duly noted. It's a publicly queryable API, though, regardless of intention. We haven't had to do any circumvention to access it. There's no security implemented. I'm sure there are good reasons for that, but I don't think there's any legal ground to prevent its private use.

@CreaDevteam
Copy link

Ok, No problem I've reported you to our legal department. I'm sure they'll want to have a word with you.

@nickelcitymario
Copy link
Author

Sure thing. Be sure to tell them you failed to implement the most basic security measures and relied on "The Internet" never noticing. And also that you're treating home buyers as criminals for accessing the very data you make available through your website. I can't see this backfiring in any way.

@Froren
Copy link
Owner

Froren commented Oct 24, 2018

I am the head developer who developed the API for realtor.ca along with the documentation. There's a reason that it's not available online and that's because it's NOT meant for public use. Your interpretation of our terms of use is also not correct.

Big fan of your work! Nice to meet you 😄

@CreaDevteam
Copy link

This is a message to all the other developers. If you're interested in our data we have other means of accessing it.

@nickelcitymario
Copy link
Author

This is a message to all the other developers. If you're interested in our data we have other means of accessing it.

Any chance you can be more specific? Obviously if there is an official/preferred way of accessing the data, that's the way to go. I'm not sure why you didn't open with that rather than jump to vague (and unfounded) legal threats. I can't speak for @Froren (who created this awesome project), but personally I'm just trying to more efficiently shop for a house from your realtor members. I'm your customers' customer.

@Froren
Copy link
Owner

Froren commented Oct 30, 2018

Closing now, it's been a week and a wild ride. Feel free to re-open when there are more things to say.

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

4 participants