import requests
import json


def get_coordinates_info(lon, lat):
    """
    Request from geocode.arcgis API an info about (lat, lon) coordinates

    :param lon: a number for Longitude
    :param lat: a number for Latitude
    :return: dict if found data else None
    """

    path = r"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?" \
              "location={}%2C{}&langCode=en&outSR=&forStorage=false&f=pjson".format(lon, lat)

    x = requests.get(path)
    if x.ok:
       return json.loads(x.text)