I want to get google search results as json arrays in google latest custom search.
How to implement the code.
For Example :
{
"responseData": {` `
"results": [
{
` ` "GsearchResultClass ": "GwebSearch",
"unescapedUrl": "http:/ / en.wikipedia.org/wiki/Paris_Hilton",
"url" : "http :// en.wikipedi a.org/wiki/Paris_Hilton",
"visibleUrl " : "en.wikipedia .org",
"cacheUrl " : "http://www.google.com/search?q=cache:TwrPfhd22hYJ:en.wikipedia.org",
"title": "< b>Paris Hilton</b > - Wikipedia, the free encyclopedia",
"titleNoFormatting": "Paris Hilton - Wikipedia, the free encyclopedia",
"content": "[1] In 2006, she released her debut album..."
},
{
"GsearchResultClass": "GwebSearch",
"unescapedUrl": "http://` `www.imdb.com/name/nm0385296/",
"url": "http://` `www.imdb.com/name/nm0385296/",
"visibleUrl": "www.imdb.com",
"cacheUrl": "http://www.google.com/search?q=cache:1i34KkqnsooJ:www.imdb.com",
"title": "<b> Paris Hilton</b>",
"titleNoFormatting": "Paris Hilton",
"content": " Self: Zoolander. Socialite <b>Paris Hilton</b>..."
}
]
If you want a custom search result.
Please read Custom Search Engine (free)
of Google at:
And go to link to create your custom search:
Or
You should go to:
Click to link: Try this API in APIs Explorer
Insert your parameter:
A project is needed to enable APIs
+ Create project
, then go to 'APIs & auth' and activate in 'Custom Search API']Press Execute
to show a result with format JSON.