Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
Understanding API calls and API key embedded URLs
$get_api_url = "https://maps.googleapis.com/maps/api/place/details/json?key=$api_key&placeid=$place_id&language=$language_code";
//clean the URL
$result = file_get_contents($url);

The request above is made and received on the server side. I cannot seem to find the exact terminology used to describe the API key embedded URL.

When using JavaScript MAPs API,

let map;

function initMap() {
  map = new google.maps.Map(document.getElementById("map"), {
    center: { lat: -34.397, lng: 150.644 },
    zoom: 8,
  });
}

window.initMap = initMap;
<div id="map"></div>
<script src="https://maps.googleapis.com/maps/api/jskey=AIzaSyB41DRUbKWJHPxaFjMAwdrzWzbVKartNGg&callback=initMap&v=weekly" defer></script>

  1. Which part of the code qualifies as an API call in both the cases?
  2. How does the response received vary in case of the client side call?
  3. Is the URL used called an endpoint?
almost 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Which part of the code qualifies as an API call in both the cases?

An API call is a call to a remote function. In simple word, an API call will always return you some sort of data (JSON, XML, Plain Text etc.)

<script src="https://maps.googleapis.com/maps/api/jskey=AIzaSyB41DRUbKWJHPxaFjMAwdrzWzbVKartNGg&callback=initMap&v=weekly" defer></script>

This is not an API call neither and end point. Because you will notice that the URL returns Java Script. So its just an URL (location of a resource)

How does the response received vary in case of the client side call?

There is no difference if you call an API / End Point from client side or at server side. Because what you are doing is simply initiating an HTTP request and in turns it gives you back the HTTP Response.

Is the URL used called an endpoint?

https://maps.googleapis.com/maps/api/place/details/json?key=$api_key&placeid=$place_id&language=$language_code

This is an end point (to an API). You will notice that this returns some JSON data (Output of the function executed at that end point)

Hope this helps.

Note: Never expose sensitive data like API KEY and etc. with your question.

almost 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda