using (var httpClient = new HttpClient()) { var key = "高德地图key"; var address = "莫比"; var str = string.Format("https://restapi.amap.com/v3/geocode/geo?key={0}&address={1}&batch=false", key, address); var url = new Uri(str); var response = httpClient.GetAsync(url).Result; var data = response.Content.ReadAsStringAsync().Result; dynamic jsonData = JsonConvert.DeserializeObject(data);//转为json var geocodes = jsonData.geocodes; //定位 var status = jsonData.status.Value;//状态 var count = jsonData.count.Value;//数量 var location = geocodes[0].location;//金纬度 }