I want to get the result of searches that use special features in Google, like "define: [phrase]" and I can't seem to find relevant information about this.
Does anyone knows where I can get the data in JSON format (like the rest of Google's APIs) without scraping the results page manually?
Thanks, Eli
I wish I had not set a bounty for this, because I stumbled upon the answer a few days later and it is really simple.
Here is URL to call if you want a definition to love:
You will get a response stream containing JSONP, with the following contents ("prettified" for learning purposes, API returns all in one line):
Google Dictionary API returns in the form of a callback function (JSONP). Before you can process the JSON within the function call, you have to strip out the callback function data.
That means removing everything before the first
{
and everything after the last}
.After this you are done! That's all information you need and it's basically the same (actually a little more!) information when you search Google for
define love
.I wrote this script to get the definition of a word from google. Hope it helps but its not using any API.