DEV Community

dgloriaweb
dgloriaweb

Posted on

3

Using Google Places (new) Api in your Laravel application

I have struggled a while to understand the setup of the new requests. This I needed because the responses I've got from the old api to my search for places were missing places I knew existed. Therefore I experimented with the new Places Api.
The easiest way for me to start was to use my postman. However I didn't know how to use cURL in postman, but it was easy and quick. There is a button near "my workspace" on the left that says import. There I copied the example cURL from this page: https://developers.google.com/maps/documentation/places/web-service/nearby-search
It gave me the details, so I can see that most of the stuff goes into the header instead of the parameters, and the body is a normal json, where you can fiddle with the results.

Image description

Image description

Now I am ready to use this request in my laravel app.

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more