How to determine the user's location by IP address


Returns the IATA code and the name of the nearest city to the user.


Request parameters

  • locale — language in which the name of the city is returned (available in, rue, de, fr, it, pl, th);
  • callback — specifies the name of the function that contains the response to the request (required parameter);
  • ip — IP address of the user (If the address is not transferred, the system determines the IP from the header of the request).

Example of response


Response parameters

  • iata — IATA code of the airport
  • country_name — name of the country
  • coordinates — airport coordinates
  • name — city name where the user is located.

Was this article helpful?

Have more questions? Submit a request