On this episode of GoogleWebmasterHelp, Matt Cutts answer the question:
“Can you tell us if Webmaster Tools will ever have an update to its API allowing us retrieve the “Search Queries” and “Backlinks” data?”


Download the Search Queries data using Python:
https://code.google.com/p/php-webmaster-tools-downloads/wiki/Running

Download Webmaster Tools data using PHP (not an official Google project):
https://code.google.com/p/php-webmaster-tools-downloads/wiki/Running