Graph Google Search Results When you search for something on Google, it conveniently gives a message near the top of the page saying something like About 53,000,000 results (0.22 seconds). (The numbers change depending on what was searched of course.)
In this challenge you will write a program that draws a logarithmic ASCII graph of the number of results given by Google when all the non-empty prefixes of a given search-phrase are searched.
A search-phrase is defined as one or more strings of lowercase alphanumeric characters, separated by one space from each other. In Regex a search-phrase is (?:[a-z0-9]+ )*[a-z0-9]+.
So im ok, r, and 1a 2 are all search-phrases, but I'm OK, R, 1a  2, and  , are not.
(The character restrictions are in place because Google rarely takes case or special symbols into account. Escaping non-alphanumeric characters in URLs is also a hassle.)
Spec
Your program must take in a search-phrase and a positive floating point number H from either stdin or the command line. (You can assume they are valid and it's fine if you need quotes or something around the search-phrase.)
As a working example let's assume the search phrase is a car and H = 0.75.
Step 1:
Gather the non-empty prefixes of your search-phrase, and put them in double quotes. The quotes ensure that that the exact phrase will be searched for, avoiding any 'did you mean...' redirections.
Exclude all prefixes that end in a space such as a[space].
Prefixes
&quot;a&quot;
&quot;a c&quot;
&quot;a ca&quot;
&quot;a car&quot;

Step 2:
Search each of these terms exactly as they appear using https://www.google.com, and note the number of results returned.
Search Term    Message                                       Results
&quot;a&quot;            About 6,950,000,000 results (0.27 seconds)    6950000000
&quot;a c&quot;          About 861,000,000 results (0.27 seconds)      861000000 
&quot;a ca&quot;         About 2,990,000 results (0.30 seconds)        2990000
&quot;a car&quot;        About 53,900,000 results (0.39 seconds)       53900000

If the search term did not match any documents, put a 0 in the Results column.
Step 3:
Compute y = floor(H * log10(r + 1)) for each row, where r is the Results value. H is still 0.75 here.
Search Term    Results       y
&quot;a&quot;            6950000000    7
&quot;a c&quot;          861000000     6
&quot;a ca&quot;         2990000       4
&quot;a car&quot;        53900000      5

Step 4:
Arrange y number of vertical bars (|) above the last character of each unquoted search term, using spaces to fill empty areas, in a sort of bar graph.
|
| |
| | |
| |||
| |||
| |||
| |||
a car

This graph is the final result of your program and the only thing it needs to output. It should go to stdout.
Scoring
This is code-golf, so the shortest program in bytes wins.
Notes

You may use URL shorteners or other search tools/APIs as long as the results would be the same as searching https://www.google.com.
I know that double quotes are not a surefire way to exclude &quot;did you mean...&quot; redirections. Adding &amp;nfpr=1 to the URL doesn't always work either. Don't worry about these inaccuracies. Just look for the About X results... message no matter what pops up, or set Results to 0 if there is none.
There is an empty column above any space in the search-phrase in the graph.
The graph should not be wider or taller than it needs to be (e.g. with whitespace).
It's ok if your program has side effects like opening a web browser so the cryptic Google html/js pages can be read as they are rendered.
Ruby, 316 295 bytes

require 'open-uri'
s,h=*$*
r=[]
s.size.times{|i|r&lt;&lt;(s[i]==' '?'':?|*(h.to_f*Math.log10((URI.parse("http://google.com/search?q=#{URI::encode ?"+s[0..i]+?"}").read[/About [\d,]+ results/]||?0).gsub(/\D/,'').to_i+1)).floor)+s[i]}
puts r.map{|l|l.rjust(r.map(&amp;:size).max).chars}.transpose.map &amp;:join


Unfortunately, the requests just stopped working on the online tester I was using, so I need to golf this down further tonight or tomorrow.

Explanation: I'm taking the input via ARGV. Then I'm just sending a request for each substring that doesn't end in a space, find the results via regex (and default to 0 if the regex doesn't match), and then build the histogram with horizontal bars. At the end, I'm reversing all lines and transposing them to create the vertical histogram.