Im trying to view the data structure of the google results to create an api. im using the foll code: function GoogleResults($query, $apikey) { $results = file_get_contents('http://google.com/uds/GwebSearch?callback=GwebSearch.RawCompletion&context=0&lstkp=0&rsz=large&hl=en&sig=' . $apikey . '&q=' . $query . '&key=internal&v=1.0&nocache=10'); var_dump($results); preg_match_all('/{ GsearchResultClass:"GwebSearch", unescapedUrl : "(.*?)", url : "(.*?)", visibleUrl : "(.*?)", cacheUrl : "(.*?)", title : "(.*?)", titleNoFormatting : "(.*?)", content : "(.*?)"}/', $results, $matches, PREG_SET_ORDER); var_dump($matches); var_dump($results); } var_dump works with yahoo search results, then why is it not working for google?? any help is welcomed thanks in advance.