I have a list of several hundred quoted phrases and I would like to just get one number from a Google search for each of these phrases. The number I need is the estimate of the number of search results for each phrase. (For example, the "N" from the line "About N results (Y seconds)"
PS: I ask about Powershell because of a comment on question Use cmd prompt to search a word on google or other search engine where user https://stackoverflow.com/users/1240980/timwagaman implied that it would be easy to do something like this with Powershell. If there is a way to do this without the complications of Powershell, please let me know. I have never use Powershell before.
Something to start with:
$userAgent = 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36'
$searchPhrases = @("supercalifragilisticexpialidocious", "david")
$searchPhrases | %{
$searchLink = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=$_"
$results = Invoke-WebRequest -URI $searchLink -UserAgent $userAgent
$json = $results.Content | ConvertFrom-Json
Write-Host "SearchPhrase: $_ Count: $($json.responseData.cursor.resultCount)"
}