A smart API for The Pirate Bay