Ask HN: How Much Can I Scrape?
I am working on a financial software project. I have written code in Python to get all of the historical price data for each stock in the S&P 500. I have tested the code using an input file of five ticker symbols and the code runs perfectly. I would like to get data for all 500 stocks in the S&P 500, however, I don't know if collecting this much data would go well with Yahoo. I have implemented my program so that it only sends out one request per minute, but I am still worried about turning my system loose.
Has anyone else done something similar? For the people who own their own sites, how do you view scraping? Should I contact someone at Yahoo first?
24 comments
[ 2.6 ms ] story [ 79.8 ms ] threadYou should at least try to email them and see if your restrictions can be loosened.
From the business side, I could see them getting a bit grumpy about it, but if it's publicly available information, and there's nothing in their TOS about it, I don't see how they could do anything about it - again, unless you're being a dick with your scraper.
Does anyone know off the top of their head if there are any relevant court cases dealing with scraping?
From experience, I would not recommend getting your data from Yahoo. I looked at them first, but their data is just not as good as the source.
If you would like more information or my notes on how I reverse-engineered the nasdaq.com URL scheme please send me an email.
The problem with financial data is that Yahoo (like most other sites where you might find this data) doesn't generate this data themselves. They license it from other companies, and the licensing agreement typically prohibits or greatly restricts Yahoo's ability to provide the data to third parties.
That said, if Yahoo is not aware that you are scraping them, they cannot stop you. They certainly do have anti-scraper algorithms (you will start getting http 999 errors) but they will not kick in until you cross some invisible threshold. You can probably use Tor with no problem.
Although, if you get large enough that someone notices, you will probably get some sort of cease & desist letter. Depending on your goals that might not be a problem for you.
Search 'yahoo 999' for details.
If they give out csv exports as they do there is no reason why someone wouldn't download them and use them for personal use.
I guess you already know about the CSV download but if you don't, here is a link about it: http://www.diytraders.com/content/view/25/43/
I would however never ever use them in commercial product if that's what you are asking.
We now have a formal agreement with Yahoo, but during the process Yahoo indicated they had an informal open policy on scraping. Note that they have an initiative to open up all services within the next year or so (google Yahoo Open Strategy to read more about timelines).
Trespass to chattels is an old roman law which dictates what should be done if you tresspass on my land and hurt one of my cattle, and it is used as the core of most cases involving scraping in unauthenticated environments (like Y! finance). They can come get you, not for taking data, but for costing them money to support the response volumes you demand. The magic number is $5,000, at which time it becomes a felony (or at least that was the threatening rhetoric, which is a different story altogether). You scrape, hurt their cow for 5k, and it is not a question of restitution, but of punishment. And in each case the scraper is typically viewed as a "thief"... not a label that inspires lighter punishments. see:www.biddersedge.com, yeah, exactly. nuked from orbit... and there, in a nutshell, is the risk inherent in scraping. All a scrapee has to do is wait for you to pass $5k... while they consider the pr ramifications of the whole thing... how much bandwidth and resources need to be used before the public will sympathize? 10k? 20k? 30k before they are lauded as a hero for removing the thieving vermin?
Insidious really, scraping and scrapers are being "set up the bomb" here... to not be viewed as enabling the liberation of data, but rather as thieves of the resources necessary to deliver that data to the general public. Using trespass to chattels as a precedent is therefore a brilliant stroke... apparently, they can be taught. Or, to put it another way, scrapers aren't napster users in dorm rooms, they are felony thieves of public resources.
Yeah, we all know that cease and desist and all other legal remedies are jurisdictionally challenged - the net doesn’t stop at international borders. And, historically, it seems that other countries turn a deaf ear to most cyber crime excepting, of course, for credit card fraud.
Also, limit scraping via tor. Tor has a legitimate use which scraper volumes would impact. Of course, there are tor nets set up for "illegitimate" use... and they let anybody in, including folks like me, who then map all tor exit nodes used by scrapers and interdict em all...
And, don't forget steganography... you take data (even through tor or rotating proxies) and redisplay it, google can find it and I can ask google to tell me where it is. Scrapers, even as very clever data middlemen, will get the squeeze from both sides as scrapees discover where their data is being displayed and utilize legal means to go after those storefronts, who will of course first provide name, rank and serial number of the scraper that provided them the data...
And what about copyrights? Lots of legal precedent here, be careful with image redisplay. Mine field here...
http://www.gummy-stuff.org/Yahoo-data.htm
If you want real-time data, good luck. It will cost you.