DEV Community

Cover image for Google Maps Places API JavaScript
Raja Tamil
Raja Tamil

Posted on

Google Maps Places API JavaScript

If you want to get all of the restaurant data from a specific city by text search in your application, you have come to the right place.

In this tutorial, you’re going to learn how to do exactly that using Google Maps Places API. Also, I will be covering how to get more information about a specific restaurant using place_id.

STEP #1: Get the API Key

Log in to Google Cloud Platform

alt text

Then, go to Select a project ▾ drop-down menu which will open up a dialog box with your existing projects if any. Choose the one that you want to obtain an API key from.

alt text

Otherwise, create a new project by clicking the NEW PROJECT button at the top right of the dialog box.

alt text

Once the project is selected, go to the Navigation Menu button at the top left of the page, choose APIs & ServicesCredentials

alt text

Select Create CredentialsAPI Key which will open up a dialog box with your API Key. 🔑

That’s it… you have it! 🙂

STEP #2: Make A Request On Places API

Continue Reading...

Top comments (1)

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, we encourage authors to share their entire posts here on DEV, rather than mostly pointing to an external link. Doing so helps ensure that readers don’t have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.

If you choose to do so, you also have the option to add a canonical URL directly to your post.