Google Maps list

Anyone have experience with making calls to Google’s database and locations? I’m making a Yelp-ish app and after watching the Adalocado video on connecting the location API to the app, I want to make lists that are searchable based on categories or terms without populating an internal database like he did. In my Google documentation I enabled their “100 million searchable locations” but I’m not sure how to actually search it and generate a list in real time.

1 Like

Hi @mrentrekin ,
If you want to achieve that, my first though would be the high Google Costs regarding to API calls. Any particular reason you don’t want to store the data (Google allows to store temporarilly and you are ok if you use “Powered by Google”)? Also Google API returns max 60 locations based on a 3 call request, so you need to make 3 calls in case there are 60 locations available for the search terms.

I made a lot of projects already around Google, and making my own API to use with Adalo and if you plan to go Global, costs are really high.

But I would see this possible with a custom API as external collection, only making the calls based on the search terms and categories (These would have to be based on Keywords and Locations or Google Types), but would also slow down the API speed if it would have to make 3 calls. Personally I wouldn’t advise this approach.

Hey JL,
Thanks for your thoughtful explanation. Right now I’m more interested in the mechanisms behind how one would go about populating a list through an API call in real time without pre-populating it. I’d love to understand how exactly I need to implement this so that it calls and pulls the info; I’m not too worried about the cost currently. Unfortunately, I don’t have a lot of time to spend on database building.
Thanks again and let me know your thoughts or if you have any experience with my specific scenario.
Thanks,
Michael

Hi @mrentrekin ,
I didn’t yet get into the depths of API in real-time in regards to population because in a way that is what Adalo already does.

I would assume Adalo External collections would work in the following way, maybe someone can confirm this from Adalo team or someone that tested it already.

You create an external collection, Adalo makes the initial call to get the JSON results and schema of the API in order to built the connection.

Here I assume data is not cached but the schema is (connection and JSON schema) saved as a snapshot (Well it is, you can see the columns in the DB :slight_smile: ).

When you enter the screen where list is, Adalo makes a GET request, so results are displayed according to the API limits (Adalo 100 results, Airtable the same, and so on) in real time.

When you use filters like in Airtable, that you change a dropdown, or input text field, that does other requests to Airtable, Adalo gets results in real time, so every user that filters, this in an extra API call.

So I would say for Google Maps (Aka Places) auto population, let’s say you always want results of a certain city and type (Restaurants), the API should only also be called when users enter the screen.

To pre filter with other dynamic conditions, I would see this coming from a previous screen, then user entering the next screen and Google would make that call in real time (So input text field, dropdown, just based for example that user was in the previous screen in a city list).

Note for Google:
So it is possible, but Google API needs filtering from beginning, so you would need to customize the API for this, since Adalo Setup makes a simple request to create the connection via a GET that takes let’s say the first random 100 results.

If you need further details let me know, I mostly work with Google APIs as I am building directories for customers and for myself (My next project is also a directory :slight_smile: )

2 Likes

Great answer! Thanks for the thorough breakdown of everything. I’ll be in touch.