A smart API for The Pirate Bay and other P2P file sharing sites