{"id":5161,"date":"2019-10-17T23:14:28","date_gmt":"2019-10-17T17:44:28","guid":{"rendered":"https:\/\/code4developers.com\/?p=5161"},"modified":"2019-10-17T23:23:57","modified_gmt":"2019-10-17T17:53:57","slug":"getting-started-with-google-maps-places-api","status":"publish","type":"post","link":"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/","title":{"rendered":"Getting started with Google Maps Places API"},"content":{"rendered":"<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5167\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/google-maps-places-api-javascript\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?fit=1000%2C600&amp;ssl=1\"  data-orig-size=\"1000,600\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"google-maps-places-api-javascript\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?fit=800%2C480&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?fit=700%2C420&amp;ssl=1\"  class=\" wp-image-5167 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"google-maps-places-api-javascript\"  width=\"483\"  height=\"290\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 483px) 100vw, 483px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript-300x180.jpg\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=800%2C480&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=120%2C72&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=90%2C54&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=320%2C192&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=560%2C336&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=240%2C144&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=180%2C108&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=640%2C384&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=700%2C420&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-maps-places-api-javascript.jpg?w=1000&amp;ssl=1 1000w\" ><\/p>\n<p>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\u2019re going to learn how to do exactly that using Google Maps Places API.<!--more--> Also, I will be covering how to get more information about a specific restaurant using place_id.<\/p>\n<h2 id=\"step-1-get-the-api-key\">STEP #1: Get the API Key<\/h2>\n<p>1. Log in to\u00a0<a href=\"https:\/\/cloud.google.com\/console\/google\/maps-apis\/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Google Cloud Platform<\/a><\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5166\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/google-cloud-platform-console\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?fit=1358%2C491&amp;ssl=1\"  data-orig-size=\"1358,491\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"google-cloud-platform-console\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?fit=800%2C289&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?fit=1160%2C419&amp;ssl=1\"  class=\" wp-image-5166 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"google-cloud-platform-console\"  width=\"659\"  height=\"237\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 659px) 100vw, 659px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console-300x108.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=300%2C108&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=800%2C289&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=1160%2C419&amp;ssl=1 1160w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=120%2C43&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=90%2C33&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=320%2C116&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=560%2C202&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=240%2C87&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=180%2C65&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=640%2C231&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=1120%2C405&amp;ssl=1 1120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?resize=700%2C253&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/google-cloud-platform-console.png?w=1358&amp;ssl=1 1358w\" ><\/p>\n<p>2. Then, go to\u00a0<strong>Select a project \u25be<\/strong>\u00a0drop 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.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5171\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/select-a-project-google-places-api\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?fit=820%2C503&amp;ssl=1\"  data-orig-size=\"820,503\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"select-a-project-google-places-api\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?fit=800%2C491&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?fit=700%2C429&amp;ssl=1\"  class=\" wp-image-5171 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  width=\"522\"  height=\"320\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 522px) 100vw, 522px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api-300x184.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=300%2C184&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=800%2C491&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=120%2C74&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=90%2C55&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=320%2C196&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=560%2C344&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=240%2C147&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=180%2C110&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=640%2C393&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=700%2C429&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?resize=768%2C471&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/select-a-project-google-places-api.png?w=820&amp;ssl=1 820w\" ><\/p>\n<p>3. Otherwise, create a new project by clicking the NEW PROJECT button at the top right of the dialog box.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5164\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/create-a-new-project-google-cloud-platform\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?fit=824%2C391&amp;ssl=1\"  data-orig-size=\"824,391\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"create-a-new-project-google-cloud-platform\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?fit=800%2C380&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?fit=700%2C332&amp;ssl=1\"  class=\"wp-image-5164 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"create-a-new-project-google-cloud-platform\"  width=\"532\"  height=\"252\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 532px) 100vw, 532px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform-300x142.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=300%2C142&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=800%2C380&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=120%2C57&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=90%2C43&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=320%2C152&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=560%2C266&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=240%2C114&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=180%2C85&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=640%2C304&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=700%2C332&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?resize=768%2C364&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/create-a-new-project-google-cloud-platform.png?w=824&amp;ssl=1 824w\" ><\/p>\n<p>4. Once the project is selected, go to the Navigation Menu button at the top left of the page, choose\u00a0<strong>APIs &amp; Services<\/strong>\u00a0<strong>\u2192<\/strong>\u00a0<strong>Credentials<\/strong><\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5163\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/apiservices-credentials\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?fit=822%2C469&amp;ssl=1\"  data-orig-size=\"822,469\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"apiservices-credentials\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?fit=800%2C456&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?fit=700%2C399&amp;ssl=1\"  class=\" wp-image-5163 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"apiservices-credentials\"  width=\"567\"  height=\"323\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 567px) 100vw, 567px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials-300x171.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=300%2C171&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=800%2C456&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=120%2C68&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=90%2C51&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=320%2C183&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=560%2C320&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=240%2C137&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=180%2C103&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=640%2C365&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=700%2C399&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=768%2C438&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?resize=820%2C469&amp;ssl=1 820w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/apiservices-credentials.png?w=822&amp;ssl=1 822w\" ><\/p>\n<p>5. Select C<strong>reate Credentials<\/strong>\u00a0<strong>\u2192<\/strong>\u00a0<strong>API Key<\/strong>\u00a0which will open up a dialog box with your API Key.\u00a0<img  decoding=\"async\"  class=\"emoji pk-lazyload\"  draggable=\"false\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\ud83d\udd11\"  data-pk-sizes=\"auto\"  data-pk-src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/1f511.svg\" ><\/p>\n<p>That\u2019s it\u2026 you have it!\u00a0<img  decoding=\"async\"  class=\"emoji pk-lazyload\"  draggable=\"false\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\ud83d\ude42\"  data-pk-sizes=\"auto\"  data-pk-src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/1f642.svg\" ><\/p>\n<h2 id=\"step-2-make-a-request-on-places-api\"><strong>STEP #2: Make A Request On Places API<\/strong><\/h2>\n<p>1. Here is the base URL for Places API<\/p>\n<pre class=\"font:monospace lang:default decode:true\">http:\/\/maps.googleapis.com\/maps\/api\/place\/textsearch\/json<\/pre>\n<p>All you need is two query parameters in order get this working, these are<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>query<\/strong>: The actual text string that you want to get search results for. For example, restaurants in Toronto<\/li>\n<li><strong>key<\/strong>: API key that you have obtained from the previous section.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>So, the final URL with query parameters will look like this:<\/p>\n<pre class=\"font:monospace lang:default decode:true \">http:\/\/maps.googleapis.com\/maps\/api\/place\/textsearch\/json?query=[yourquerystring]&amp;key=[YOURAPIKEY]<\/pre>\n<blockquote><p>Don\u2019t forget to replace with your text string and API key<\/p><\/blockquote>\n<div>\n<p>If\u00a0 you send a GET request from the browser at this stage, you may get an unauthorized API error.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5162\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/api-project-is-not-authorized\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?fit=1322%2C214&amp;ssl=1\"  data-orig-size=\"1322,214\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"api-project-is-not-authorized\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?fit=800%2C130&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?fit=1160%2C188&amp;ssl=1\"  class=\" wp-image-5162 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"api-project-is-not-authorized\"  width=\"570\"  height=\"93\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 570px) 100vw, 570px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized-300x49.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=300%2C49&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=800%2C130&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=1160%2C188&amp;ssl=1 1160w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=120%2C19&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=90%2C15&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=320%2C52&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=560%2C91&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=240%2C39&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=180%2C29&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=640%2C104&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=1120%2C181&amp;ssl=1 1120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=768%2C124&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?resize=700%2C113&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/api-project-is-not-authorized.png?w=1322&amp;ssl=1 1322w\" ><\/p>\n<\/div>\n<div>This is because you will need to Enabled Maps JavaScript API as well as Places API.<\/div>\n<h2 id=\"step-3-enable-maps-javascript-api-places-api\">STEP #3: Enable Maps JavaScript API &amp; Places API<\/h2>\n<p>1. Go to\u00a0<strong>APIs &amp; Services<\/strong>\u00a0<strong>\u2192<\/strong>\u00a0<strong>Dashboard<\/strong>\u00a0<strong>\u2192<\/strong>\u00a0<strong>Enable APIs &amp; Services<\/strong>\u00a0at the top and Choose\u00a0<strong>Maps JavaScrip API<\/strong>\u00a0from the API Library. This will open up Map JavaScript API page and\u00a0<strong>Enable<\/strong>\u00a0it.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5165\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/enable-maps-javascript-api\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?fit=860%2C469&amp;ssl=1\"  data-orig-size=\"860,469\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"enable-maps-javascript-api\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?fit=800%2C436&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?fit=700%2C382&amp;ssl=1\"  class=\" wp-image-5165 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"enable-maps-javascript-api\"  width=\"544\"  height=\"297\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 544px) 100vw, 544px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api-300x164.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=300%2C164&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=800%2C436&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=120%2C65&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=90%2C49&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=320%2C175&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=560%2C305&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=240%2C131&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=180%2C98&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=640%2C349&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=700%2C382&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?resize=768%2C419&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/enable-maps-javascript-api.png?w=860&amp;ssl=1 860w\" ><\/p>\n<p>2. Scroll down to the bottom of the page and you can find\u00a0<strong>Places API<\/strong>\u00a0under the \u201cMore Solutions to Explore\u201d section and\u00a0<strong>Enable\u00a0<\/strong>it as well.<\/p>\n<h2 id=\"step-4-get-restaurants-data\">STEP #4: Get Restaurants Data<\/h2>\n<div>Let\u2019s say you want to get the first 20 restaurants from Toronto. Your request would look like this:<\/div>\n<pre class=\"font:monospace lang:default decode:true\">https:\/\/maps.googleapis.com\/maps\/api\/place\/textsearch\/json?query=restaurants+toronto+canada&amp;key=YOURAPIKEY<\/pre>\n<p>The response JSON object will have 20 restaurants like the screenshot below.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5170\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/screen-shot-2019-08-21-at-11-09-03-am\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?fit=709%2C698&amp;ssl=1\"  data-orig-size=\"709,698\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"Screen-Shot-2019-08-21-at-11.09.03-AM\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?fit=300%2C295&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?fit=700%2C689&amp;ssl=1\"  class=\" wp-image-5170 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"Screen-Shot-2019-08-21-at-11.09.03-AM\"  width=\"453\"  height=\"445\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 453px) 100vw, 453px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM-300x295.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=300%2C295&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=80%2C80&amp;ssl=1 80w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=120%2C118&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=90%2C89&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=320%2C315&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=560%2C551&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=240%2C236&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=180%2C177&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=640%2C630&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=700%2C689&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?resize=45%2C45&amp;ssl=1 45w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-08-21-at-11.09.03-AM.png?w=709&amp;ssl=1 709w\" ><\/p>\n<div><\/div>\n<blockquote>\n<div>Install\u00a0<a href=\"https:\/\/chrome.google.com\/webstore\/detail\/json-formatter\/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">JSON Formatter<\/a>\u00a0which is a chrome extension that will help to format JSON object.<\/div>\n<\/blockquote>\n<div><\/div>\n<div>\n<h2 id=\"step-5-get-restaurant-details-data-using-place_id\">STEP #5: Get Restaurant Details Data Using Place_id<\/h2>\n<p style=\"padding-left: 40px;\">Here is the Base URL:<\/p>\n<pre class=\"font:monospace lang:default decode:true \">https:\/\/maps.googleapis.com\/maps\/api\/place\/details\/json<\/pre>\n<p>As you can see, I have passed three query parameters for this request.<\/p>\n<pre class=\"font:monospace lang:default decode:true\">https:\/\/maps.googleapis.com\/maps\/api\/place\/details\/json?placeid=ChIJKSp50NI0K4gR6C6L3yYqpYY&amp;fields=name&amp;key=YOURKEY<\/pre>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><strong>placeid<\/strong>: This can be found the previous request JSON Object with the property name place_id.<\/li>\n<li><strong>key<\/strong>: Your API Key.<\/li>\n<li><strong>fields<\/strong>: Multiple values can be passed by commas and I have just a\u00a0<strong>name\u00a0<\/strong>field for now.<br \/>\nSome of the useful fields are as follows: name, rating, formatted_address, type, geometry, formatted_phone_number, opening_hours and\u00a0<a href=\"https:\/\/developers.google.com\/places\/web-service\/details\" target=\"_blank\" rel=\"noopener noreferrer\">more<\/a>.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p style=\"padding-left: 40px;\">Here is the sample JSON response for the details request.<\/p>\n<\/div>\n<p><img  loading=\"lazy\"  decoding=\"async\"  data-attachment-id=\"5169\"  data-permalink=\"https:\/\/code4developers.com\/getting-started-with-google-maps-places-api\/places-api-details-json-response\/\"  data-orig-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?fit=1215%2C415&amp;ssl=1\"  data-orig-size=\"1215,415\"  data-comments-opened=\"1\"  data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\"  data-image-title=\"places-api-details-json-response\"  data-image-description=\"\"  data-image-caption=\"\"  data-medium-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?fit=800%2C273&amp;ssl=1\"  data-large-file=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?fit=1160%2C396&amp;ssl=1\"  class=\" wp-image-5169 aligncenter pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"places-api-details-json-response\"  width=\"545\"  height=\"185\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 545px) 100vw, 545px\"  data-pk-src=\"https:\/\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response-300x102.png\"  data-pk-srcset=\"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=800%2C273&amp;ssl=1 800w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=1160%2C396&amp;ssl=1 1160w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=120%2C41&amp;ssl=1 120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=90%2C31&amp;ssl=1 90w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=320%2C109&amp;ssl=1 320w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=560%2C191&amp;ssl=1 560w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=240%2C82&amp;ssl=1 240w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=180%2C61&amp;ssl=1 180w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=640%2C219&amp;ssl=1 640w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=1120%2C383&amp;ssl=1 1120w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=768%2C262&amp;ssl=1 768w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?resize=700%2C239&amp;ssl=1 700w, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api-details-json-response.png?w=1215&amp;ssl=1 1215w\" ><\/p>\n<p>There you have it\u00a0<img  decoding=\"async\"  class=\"emoji pk-lazyload\"  draggable=\"false\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\ud83d\ude42\"  data-pk-sizes=\"auto\"  data-pk-src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/1f642.svg\" ><\/p>\n<p class=\"dpsp-share-text\">Sharing is caring!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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,&hellip;<\/p>\n","protected":false},"author":7,"featured_media":5168,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[270,2],"tags":[294,292,22,293,295],"powerkit_post_featured":[],"class_list":{"0":"post-5161","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cloud","8":"category-javascript","9":"tag-cloud","10":"tag-googleapi","11":"tag-javascript","12":"tag-mapsapi","13":"tag-placesapi"},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2019\/10\/places-api.png?fit=1051%2C1229&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8NAi4-1lf","jetpack-related-posts":[{"id":6553,"url":"https:\/\/code4developers.com\/cors-error-and-its-solutions\/","url_meta":{"origin":5161,"position":0},"title":"CORS Error And Its Solutions","author":"Arif Khoja","date":"March 15, 2020","format":false,"excerpt":"By the end of this short tutorial, you\u2019ll have a better understanding of: Why CORS error is occurring? What is CORS? and, Find a few ways to fix CORS error: Enable CORS Make an HTTP Request from a Server Use Proxy Server Let\u2019s say, you will need to make an\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/code4developers.com\/category\/javascript\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2018\/04\/cors-1.png?fit=375%2C210&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3216,"url":"https:\/\/code4developers.com\/superstruct\/","url_meta":{"origin":5161,"position":1},"title":"Superstruct","author":"Arif Khoja","date":"January 31, 2018","format":false,"excerpt":"I stumbled upon this GitHub project a few days ago. It\u2019s called Superstruct, and it looks like an awesome way to validate data in JavaScript. Let me explain. You probably want to make sure that you get the kind of data you expect as input in JavaScript, either from your\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/code4developers.com\/category\/javascript\/"},"img":{"alt_text":"javascript","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":12847,"url":"https:\/\/code4developers.com\/connect-firebase-database-and-angular-app\/","url_meta":{"origin":5161,"position":2},"title":"Connect Firebase Realtime NoSQL Database with Angular App from Scratch","author":"Arif Khoja","date":"August 30, 2020","format":false,"excerpt":"In this tutorial, We are going to learn\u00a0How to connect Firebase Realtime NoSQL cloud database with Angular app from scratch?. We\u2019ll be using\u00a0AngularFire library for setting up Firebase database in the Angular web application. Firebase is a Google product, It is a real-time NoSQL cloud database that allows you to\u2026","rel":"","context":"In &quot;Angular&quot;","block_context":{"text":"Angular","link":"https:\/\/code4developers.com\/category\/angular\/"},"img":{"alt_text":"connect-angular-firebase","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2020\/08\/connect-angular-firebase.jpg?fit=715%2C350&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2020\/08\/connect-angular-firebase.jpg?fit=715%2C350&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2020\/08\/connect-angular-firebase.jpg?fit=715%2C350&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2020\/08\/connect-angular-firebase.jpg?fit=715%2C350&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3510,"url":"https:\/\/code4developers.com\/cors-anywhere\/","url_meta":{"origin":5161,"position":3},"title":"CORS Anywhere","author":"Arif Khoja","date":"May 3, 2018","format":false,"excerpt":"After a recent domain change at my workplace one of the API endpoints became inaccessible due to some configuration problems resulting in incorrect behavior in regards to cross-origin resource sharing policy. It interfered with one non-critical function of the website and was a bit of a nuisances but not big\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/code4developers.com\/category\/javascript\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2018\/04\/cors-1.png?fit=375%2C210&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3824,"url":"https:\/\/code4developers.com\/restful-api-best-practices\/","url_meta":{"origin":5161,"position":4},"title":"RESTful API best practices and Designing guidelines\u200a","author":"Arif Khoja","date":"July 5, 2018","format":false,"excerpt":"Facebook, Google, Github, Netflix and few other tech giants have given a chance to the developers and products to consume their data through APIs, and became a platform for them. Even if you are not writing RESTful API for other developers and products, it is always very healthy for your\u2026","rel":"","context":"In &quot;Web Services&quot;","block_context":{"text":"Web Services","link":"https:\/\/code4developers.com\/category\/web-services\/"},"img":{"alt_text":"rest_api","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2018\/07\/rest_api.png?fit=406%2C430&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3171,"url":"https:\/\/code4developers.com\/programming-asynchronously-promises\/","url_meta":{"origin":5161,"position":5},"title":"Programming asynchronously: Promises","author":"Arif Khoja","date":"December 20, 2017","format":false,"excerpt":"Promises are in many ways the logical next step from callback. A promise is just a special object that promise to either resolve, or throw an exception. Promises are easy to use, and easy to make. For example this is how you use some kind of library that uses promises:\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/code4developers.com\/category\/javascript\/"},"img":{"alt_text":"javascript","src":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/code4developers.com\/wp-content\/uploads\/2017\/10\/javascript.jpg?fit=750%2C422&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/posts\/5161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/comments?post=5161"}],"version-history":[{"count":3,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/posts\/5161\/revisions"}],"predecessor-version":[{"id":5174,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/posts\/5161\/revisions\/5174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/media\/5168"}],"wp:attachment":[{"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/media?parent=5161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/categories?post=5161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/tags?post=5161"},{"taxonomy":"powerkit_post_featured","embeddable":true,"href":"https:\/\/code4developers.com\/wp-json\/wp\/v2\/powerkit_post_featured?post=5161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}