You could parse the HTML output using a node parser. There might be something provided by google to accomplish this directly. I'm probably missing another 20320421u34189567190238479152134832174-09187569018257839174 ways to go about it.
I tried this once with Java, and found that in order to use google's service you had to sign up for something, otherwise it's queries would not return anything useful to a program (unless you made your program look to google like a browser, or something like that).
Not sure if this is still/ever fully was the case, but I wasn't getting anything useful back from executing queries against a google server in Java.