Question

Some of my programs send direct queries to Google and then parse the HTML results - for instance http://www.google.com/search?q=foobar&hl=en&num=20.

Unfortunately, it seems that since very recently, when sending such queries to Google, the "num" parameter is ignored because of Instant Search. No matter what, only 10 results are shown in the page. If you disable Instant Search, then it works again. Problem is that settings is stored in a cookie or something and it's very impractical, if at all possible, to pre-set from the program side.

Is there a way to add an extra parameter to the query to bypass Instant Search and get "num" working again? I'm sure I'm not only one parsing Google HTML results...

Was it helpful?

OTHER TIPS

One workaround is to use the "start" parameter which still works and send multiple queries, but it's not very clean.

http://www.google.com/search?q=foobar&hl=en&num=20&start=0
http://www.google.com/search?q=foobar&hl=en&num=20&start=10
...

More investigation shows that this "bug" seems to only happen for web browsers, not when using HTTP clients that don't provide a user agent.

So things are still good after all!

&complete=0 will also work.

For example: http://www.google.com/search?q=foobar&hl=en&num=20&complete=0

Refer to this webapps-link.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top