Craigslist programming API on rentrent.org (Alpha)

API documentation has a new home on:

http://www.rentrent.org/RENT/API/index.html


41 comments:

Anonymous said...

Nice site. Can you add Ventura County? I would love to see data near my house.

Keep up the good work.

Anita Kale said...

Very useful application.

Jen said...

Love it!!!!

usriv said...

Great work with the site! Is craigslist crawled everyday or queries on demand. E.g, I could find something through craigslist that didnt show up on your website.

e.g.,
http://sfbay.craigslist.org/sby/apa/850398982.html

Joe Irvine said...

Craigslist is crawled approximately every couple of hours. Also the crawling is not threaded.

Craigslist provide such a great service for free and I didn't want to overload their servers with too many requests and cause them problems.

Joe.

Moshe said...

Hi, I tried to use it in actionscript 3 project but I got a parsing error. The problem is that the format of your output throw error in flash. everything should be with quotation marks. for example:
{'Status':'Success', Data:{'862458010':{'AdPostingId':'862458010',

Can you add the quotation marks. if not can I have access to your script?

Thanks
- Moshe

Joe Irvine said...

I have never tested this on actionscript. Are you sure even numbers need to be in quotes?
I will support an extra parameter called 'output=actionscript'.

Send your email address to rentrentorg@gmail.com. I want to use your help in make this API flash compatible.

Thanks,
Joe

ashoon said...

This is fantastic. Only suggestion would be to produce more specific urls. Here's hoping craiglist lets this develop!

Brittany said...

This is great info to know.

T.C. said...

I'm looking to use this API to aggregate data and process it (once per day, once I have the code done). Any chance you would allow me to use a special key or some such that would simply dump all of the postings in the database? It's currently giving me "Too many properties to show on the map." from Ads.aspx

I'm trying to avoid doing a screen scrape of craigslist for my sanity.

RentRent.Org said...

By default API caps at 200 ads per request.
You can use a parameter 'maxrecords' to fetch upto 2000 listings.

I was thinking of adding a feature that will allow you download all the listings for a county using one request. I will let you know as soon as I have that feature ready.

Anonymous said...

Dude - your site rocks. You are the Muhammad Ali of Awesome Website Creators.

Shawn said...

Hi, Thanks for a great tool. It seems to actually include all of the data that is on craigslist for the day, which is good-- not all of them do for some reason.

I would LOVE, LOVE, LOVE it if in rental mode it used showed the price instead of the number of rooms (which is not accurate anyway in that mode) and if it used the color to show if there is a picture or not.

Also, it would be way cool to filter by listings that have pictures

Finally, sometimes I want to filter for places less than $650, forcing $700 is an entirely different price point in rental markets, so maybe better to make it an editable dropdown.

Have I told you that you are awesome today? Because you are-- this tool has already saved me a lot of time-- and I haven't gotten you anything, so thanks. I owe you one!

Kindly,

-s

RentRent.Org said...

Thanks Shawn for the great suggestions.
I will try to add the features your requested during next update.

royce said...

Hey there, I am checking out your API, I sent you an email about some JSON issues in PHP. I was able to hack together some code to resolve most of them. But you can still take a look at it if you wish.

I wasn't able to get the output=actionscript command to work.

Also, do you plan to scrape any of the other CL categories such as sale/wanted?

Ashwani said...

Great job!!

The API throws error when there are too many properties fetched and does not display anything. Is there a possibility to let user specify max. no. of records? The maxrecords is not working.

Is there any API for fetching 'properties on sale'?

RentRent.Org said...

Ashwani,
By default the Ads.aspx does not return you more than 300 records. If you pass maxRecords=1000, you can retrieve bulk data using one request.

Try following:
http://www.rentrent.org/RENT/Ads.aspx?xmin=-118.01925659179687&ymin=33.71948521132481&xmax=-117.68142700195314&ymax=33.85644642218431&bd=&ba=&pets=-1&type=2&callback=xxx&maxRecords=2000

Hope this helps.
Joe

Ashwani said...

Joe,

Many thanks for the solution and quick reply, it worked.

Please can you tell me API to fetch 'Properties on Sale'?

Regards.

Steve said...

Nice site! Do you have any plans to make the API opensource / commercial? I want to use it but I have a serious question. If you move on to something else then what will happen to the sites using your API? Sorry if that sounds harsh.

RentRent.Org said...

Dear Ashwani,
I don't mine the sales data anymore. It was costing me too much to run extra servers for that.

I am looking to make the service commercial. Once I get atleast couple of paid customers I will add the sales listings for the same set of counties.

The rentals API will always stay free.

Joe

RentRent.Org said...

Dear Steve,
My preference will be to go commercial for the high volume customers.

I am looking for paid customers. Are you the one?

In case I don't get any paid customers and I lose my job, or go broke, I will open source the craigslist crawling code. (I warn you though! The code is very stable but since it evolved over time, it is ugly to look at.).

But since I use the paid third party address parsing and Geocoding service for getting the quality location, the open source code will only have the crawling and indexing the code. I believe that the Craigslist RSS feed essentially do the same thing only better.

The third party service burns a big hole through my pocket every month. But they provide high quality locations. Even with the Craigslist addresses which can only be categorized as 'Very-Poor', RentRent does a pretty good job.

The RentRent.org servers have been very reliable even with the high load. I have maintained 99.99% uptime since last two years.

Joe

Vishal said...

Joe,

You've saved me countless hours of frustration trying to find a place to live. I've been waiting for something like this for quite some time. Excellent work! If you can put up a donation link on rentrent.org or e-mail me, I would gladly help out for the servers and time!

Thanks again!

Vishal

Ashwani said...

Hi, How can I get rent ad listings for a particular city/ town. I'm finding the user's (who is browsing the site) location using Google geo-location api and based on the location I want to show the properties on rent, how can I do that? I don't have map to calculate the min and max lat / lng, I have only user's lat/lng only.

Please can you help. Regards.

royce said...

There are several algorithms available that will do that. Try googling something like "php bounding box lat lon" if you use PHP or change it to whatever language you are familiar with.

RentRent.Org said...

Royce is right.

For a medium sized city, level 13 should work.
you can just grab the coordinates for level 13 and add the buffer around your geocoded point.

For example, for a california city, following are the coordinates for level 13.
-117.84879684448242, 33.63720340625724, -117.67696380615236, 33.71548722249546

And lets assume that you got GX and GY as your location.
Then the bounding box will be:

var xbuffer = (-117.67696380615236 + 117.84879684448242)/2;
var ybuffer = (33.71548722249546 + 33.63720340625724)/2;

var xmin = GX - xbuffer;
var xmax = GX + xbuffer;
var ymin = GY - ybuffer;
var ymax = GY + ybuffer;


I hope this helps.

RentRent.Org said...

Remember
x is Longitude
y is Latitude

Libraries such as Google Maps try to mess it up by putting Latitude before Longitude.

RentRent.Org said...

There was a mistake in my previous post. It should be:

var ybuffer = (33.71548722249546 - 33.63720340625724)/2;

Ashwani said...

Thank you Royce and RentRent.org. But I'm not able to find any example using which I can calculate the min lat/lng and max lat/lng for a given lat/lng (and radius of say X miles).

Please can you point to some specific example.

RentRent.Org said...

Dear Ashwani,
Google Maps API has a GLatLng.distanceFrom() function that returns a distance between two points in Meters. You can grab any two points on the screen in lat/lon then get their distance in Meters. Then use this value to find one mile value in the lat/lon in your current context.

Src: http://code.google.com/apis/maps/documentation/reference.html#GLatLng.distanceFrom


Lemme know if this works.
Joe

Matthew Fincher said...

I would like to help you complete the API documentation?

Anonymous said...

Great Service! Am using it as an example web service in a senior design project at my university. Keep up the good work!

Anonymous said...

Cool! I like your idea.

Anonymous said...

[url=http://www.adulthostedblogs.com/?u=videoseamice3]illumi Xbox Converter Tools[/url] [url=http://lecturer.elektrounesa.org/?u=videoseabigail5]A-one Video Convertor 6.30[/url]
General Video Encoder A-Z RealPlayer Video Converter 3.86
http://www.drawingboard.org/blogs/?u=videoseannis1 Torrent Avi Video Cutter
[url=http://lecturer.elektrounesa.org/?u=videosearchie6]Okoker All Video ConverterBurner Pro 6.1[/url] [url=http://www.blogsplosion.com/?u=videoseanneka2]Vital Desktop Video 1.3.8[/url]
Proxy Codec64 DivX Pro including DivX Player 6.7.0.18
http://www.answerbag.com/profile/1238531 SeptemSoft Video Converter
Media Player Classic 6.4.9.1 Revision 2008-01-27
my icq:858499940385

Chris said...

I am looking for an address parsing and geocoding service. Any recommendations?

Anonymous said...

Chris,
You have several choices. You can use Google Maps, Bing Maps, Yahoo maps, or MapQuest API for that.

You can write your own.
Or you can reuse the opensource SRC geocoder.

Sam

Chris said...

Love the site. I would like to incorporate this functionality within my website servicing Vancouver BC Canada. Any thoughts and/or issues?

Chris

Anonymous said...

I am already at my bandwidth limit on the servers where I run the craigslist crawler.
I don't mind running it on your server.
Do you have any windows server where I can run the Canada data?

Rent-Rent

Saurman162 said...

There is a JSON output problem, looks like response isnt valid. Try validating it through any online json validator services.

Anonymous said...

I love rentrentorg.blogspot.com! Here I always find a lot of helpful information for myself. Thanks you for your work.
Webmaster of http://loveepicentre.com and http://movieszone.eu
Best regards

Anonymous said...

add keywords
removed expired ads

Spencer said...

What did you use to do this? I would like to do something like this, any help would be appreciated.