Ask HN: Programmatic Googling to Recreate xkcd results

2 points by mydpy ↗ HN
I am trying to access Google search results programmatically.

For example, let's say I wanted to recreate xkcd's X Girls Y Cup results.

http://xkcd.com/467/

AFAIK, Randall entered these results manually "X Girls Y Cup" into Google search.

Is there any way to do this programmatically? Does Google have an API that I can use to return the number of search results for a given search string? Is there any way to hack it by abusing the Google URI?

Any ideas for how to access Google's search results would be really helpful.

Thanks!

1 comment

[ 3.3 ms ] story [ 10.1 ms ] thread
It seems like my options are the Custom Search API from Google (with severe limitations) or the Duck Duck Go API (which I'm not sure if it provides the total number of results).

Any other ideas?