Geographic Searchbox not returning Results - Legacy API

Is anyone else hitting this error with their searchboxes?

You’re calling a legacy API, which is not enabled for your project. To get newer features and more functionality, switch to the Places API (New) or Routes API. Learn more: Legacy products and features  |  Google Maps Platform  |  Google for Developers

It’s basically just not showing any results

yeah this isn’t a bubble issue, it’s google.

that error means your searchbox is still calling the old Places API (legacy), and google has either disabled it for your project or you never had it enabled. once they flag it like that, it just stops returning results.

you need to go into your Google Cloud console and make sure the Places API (New) is enabled for that project. sometimes you also have to enable billing properly or regenerate the API key after switching. if your key was restricted to specific APIs, that can also block it.

basically enable the new Places API, make sure billing is active, check key restrictions, and then test again.

a lot of older tutorials still use the legacy endpoint, so this is popping up more now. you’re not the only one hitting it.

This error means Bubble’s searchbox is still calling the legacy Places API, which Google no longer lets you enable on new Google Cloud projects, so the autocomplete returns no results.

A few things to check:

  • Make sure billing is enabled on your Google Cloud project and that you have Places API (New), Maps JavaScript API, Geocoding API and Routes API turned on.

  • If your Google project is relatively new, you can’t turn on “Places API (Legacy)” anymore, so anything in Bubble that still relies on the legacy endpoint will trigger this warning.

  • At this point the real fix needs to come from Bubble updating the searchbox / places integration to use the new Places API instead of the legacy one, so it’s worth filing a bug report with Bubble.

  • As a workaround, you can:

    • Replace the searchbox with a regular input and wire it to Places API (New) via the API Connector to build your own autocomplete, or

    • Use a different maps/places provider (e.g. Mapbox) until Bubble updates their native element.

So it’s not just my app: any new Google Cloud project using Bubble’s old Places searchbox setup will see this legacy-API error until Bubble migrates to Places API (New)

Thanks both of you @carlosdf @iamcharlesac

This is on a brand new google cloud console, hence I don’t think it has anything to do with the API’s I have enabled (which is seemingly all of them), nor is it billing. So I think it more to do with Carlo’s response, whereby the searchbox is only configured to Places legacy api, and doesn’t support the new one at all. I think this is a bug hence the post on this forum.

This is it. Bubble has not updated the API it uses. If they did it would be a breaking change to all other apps using search box.

They need to update the search box element to have a checkbox to say to use legacy api and make the element capable of calling both. That then requires them to set the exposed state values, meaning the results from call, to that data type. Overall, a major lift for bubble based on how they’ve done things over past 5 years.

I’d imagine you’ll submit a bug and be told it is technically too challenging and something they will be looking into for future updates.

In the meantime, you may find a plugin that works.

My search box plugin is agnostic to the Google api call used. I’m sure others exist that are equally well built.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.