UpName offers a powerful domain search API for free. Request your developer token and you're good to go within seconds.
Using the API is quite easy: it supports the same parameter as the search result page, so you can simply replace the URL of the web page with that of the API, and you'll get the same results in JSON format instead of HTML. You can also request results in XML.
See also detailed documentation for the API, including all available filters, sorting options and output parameters.