Matt
Matt

Reputation: 751

How to google programmatically?

I want to query google programmatically in Java, to get texts for relation extraction purposes.

For example, I want to write in Java:

result_list=googleAgent.search("Berlin Germany"); 

In result_list, I can get a list of sentences which contain "Berlin" and "Germany". Then I can do NLP analysis and extract the relation.

Can I do it at all? And how if so?

Upvotes: 1

Views: 160

Answers (2)

Cameron Martin
Cameron Martin

Reputation: 6010

You can use Google's Custom Search API

Upvotes: 1

David Titarenco
David Titarenco

Reputation: 33406

Google prohibits programmatic searches directly through their website (that's why they have a search API). If you insist on trying to do this, Google will eventually pop up a captcha that your client will have to solve. So now you'll be trying to do NLP while you're doing OCR ;)

However, their search API isn't that great. You're limited to a certain number of queries per day (100) and information per result.

Upvotes: 2

Related Questions