tags:

views:

57

answers:

2

Hello, I need a program that -Given a search query- uses altavista and returns the number of hits for this search query. I prefer java but other languages are fine with me. Is there an API that can be used for this purpose?

+1  A: 

This should be simple...

  1. Make a web request to Altavista passing in your search query.
  2. Get the resulting HTML back.
  3. Then parse out the hit count from the html.
David
It worked, Thank you :)
Sarah
+1  A: 

You could adapt the code here:

http://nadeausoftware.com/node/73

Which will allow you to specify a URL to search for, get the results and parse out the returned number of matches all in Java

Altavista does not have a search API and I could not locate an up-to-date third-party solution.

Nissan Fan
It worked. This was really useful, Thank you :)
Sarah