Perhaps you mean the difference between the Google Places API, which is intended for use on the SERVER server (i.e., using PHP to directly call the Google Places API), and the use of a completely different approach to the Google Places Javascript library in which BROWSER runs Javascript using the Javascript library provided by Google (which internally transfers calls to the Google Places API, so that you, as a Javascript programmer, need to understand the Javascript library provided by Google and use this)?
Here are two scenarios.
Scenario # 1: Use the API directly. For this method, you should refer to the Google API documentation for the Google Places API: https://developers.google.com/maps/documentation/places/ .
Using this API works as follows (just for a simple example). Suppose you want to get places at a distance of 1000 meters from latitude = -27.2531166, longitude = 138.8655664. You need to click the URL as described in the API documentation: https://developers.google.com/maps/documentation/places/#PlaceSearchRequests .
In this example, the URL looks like this (it's long):
https://maps.googleapis.com/maps/api/place/search/json?location=-27.2531166,138.8655664&radius=1000&sensor=false&key=AddYourOwnKeyHere
You need a key for your personal use, which I believe you have. There are other parameters that you can specify, for example, limiting the results in restaurants, etc.
When you click this URL, the data will be returned in JSON or XML format, as indicated in the json text in the above URL (use xml text for xml). This data is returned exactly , since the data is returned from any URL when you click the URL in your browser.
You can verify this by simply typing the URL directly in your browser and see the results.
To use the API directly from the code, you will need to use the code that accesses the external URL above in the code and extracts the results inside the code (for example, using the PHP CURL library or using AJAX in Javascript).
Scenario number 2:. You are using the Javascript library provided by Google that wraps the API, so you don’t have to deal with it. I will talk about this in more detail if you do not know what it is.