Google Address Autocomplete With Cjuiautocomplete

I would like to impletement address autocomplete on my site. I have tries some solutions, but no meets my requirements - they always return addresse in wrong format (I need street_name street_number city postal_code). I would like to use CJuiAutoComplete widget and this is my idea:

  1. User starts to type. After 3 characters, the widget calls actionAjaxRequest action in some controller

  2. controller calls google api, gets results and provide them to CJuiAutoComplete in a form I want

  3. User can choose from offered options

Now my problem is - how to do api ajax call from the controller? is it even possible? if not, how would you do it other way? Thanks for any help

what do you mean by "how to do api ajax call from the controller"? if you want to call remote http service from PHP code - you can simply use CURL, file open wrappers, etc…