using api returning fetch error

Why not just use the Address Input from Wix for this?
https://support.wix.com/en/article/adding-and-setting-up-an-address-input-element

You can see in this previous example here about how to work with autocomplete().
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-using-the-places-api-from-google-maps-services