title: How to use Google translate API from code
body: <p>I am trying to create an app that send a word to <em>translate.google.com</em>, take the result of the translation and display it to the user. I composed the URL but I do not know how to extract the word/phrase from the webpage. </p>
  
  <p>Example pseudo:
  en is code for english and es is code for spanish</p>
  
  <pre><code>String from = "en";
  String to = "es";
  String word = "hello"; //this will be user input text really
  String URL = "http://www.translate.google.com/#" + from + "/" + to + "/" + word;
  </code></pre>
  
  <p>Therefore the request URL will look like <a href="http://www.translate.google.com/#en/es/hello" rel="nofollow">http://www.translate.google.com/#en/es/hello</a></p>
  
  <p>I now need to be able to retrieve the information from the result box and place it in a String so I can display it to the user. </p>