Using Google AJAX API to copy google results in array
This is some way you can get Google results as a JavaScript array that you can display on any page, you first need to get your Google API Key then try this code…
-
//generate new web search object
-
var searcher = new GwebSearch();
-
//disable html
-
searcher.setNoHtmlGeneration();
-
//expand results to max - about 10
-
searcher.setResultSetSize(GSearch.LARGE_RESULTSET);
-
//excute the search by adding keyword then collect the results in element with id='mydiv'
-
searcher.setSearchCompleteCallback( searcher.execute( 'my keyword' ),
-
function()
-
{
-
var results = searcher.results;
-
for(i in results)
-
for(a in results[i])
-
document.getElementById("mydiv").innerHTML += results[i][a]+' | '} );
-
More Description on how to collect information from this array could be found here


November 5th, 2007 at 4:57 am
Another way to do it, and with all the google results,it’s parsing the google results.
You can do it with this online Google Parser
Or read the complete post about it at: Get Google results in a list of clean URLs