Google Place API in Javascript

I want to use Google Place API for Autocomplete text and Place Detail. Please help me if there is some way to do so using Javascript or any other method (I don’t want to use Google API Web Services for the same as it has some limitations). If something like that is not possible now please let me know whether it is in your future preferences or not, as my project is on hold due to this problem.

It is not possible to use the JavaScript API that Google supplies as this is for the DOM. You should be able to implement the API in JavaScript or Uno, but not use any of the existing SDKs.

I’ve had a look at this, and to do this in pure JS is pretty straight forward.

Thank You for your reply. Can you guide me, how to do the same. Please provide a sample/example for the same.

Is it possible to use in Fuse. Please can you give some clue, how can I implement the same in Fuse.


Here is some js that might help you.

var url = "";
var type = "address";
var language = "sv";
var key = "GOOGLE API KEY";
var input = "" //Address input
var params = "url="+url+"&type="+type+"&language="+language+"&key="+key+"&input="+input;

var http = new XMLHttpRequest();"GET", url+"?"+params, true);
http.onreadystatechange = function() {
    if(http.readyState == 4 && http.status == 200) {
        var myArr = JSON.parse(http.responseText);

Thanks jonas for reply, but the code is using web service, but it has some limitations. I want JavaScript for using the API.

Hmm… not sure what you are meaning. The code above is just javascript, and it’s calling the Google Places API.

The code above is using HttpRequest (Google Place API Web Service) which has usage limit of 10000 requests for 24 hours(10 request for 1 place search) , which would exceed our reqiurement, whereas Google Places API for Javascript Library has unlimited usage.

For Further reference you can refer, and

Okej, I understand. Only have experince using the Web Service, so can’t help you.

Thank you for your response.

anupriyashakaya: The googleplaces.js npm package, and the google browser javascript are using the same endpoint, and has the same limitations.

Thanks for the information. I was also going through the same and came to know that npm google-places is using Web Services only. Google Places JavaScript Library do not have any limitations (as mentioned in I came through another work is this would be helpful.