Geocoding API to convert any address into latitude and longitude
Turn any address, postal code, or place name into precise coordinates with a fast, developer-friendly geocoding API.
Ambee aggregates raw environmental data from satellite and ground observations, meteorological models, historical datasets, and emission inventories.
Station-only
Satellite-only
Model-only
High
Low
High
High
High
Medium
Low
Medium
High
Medium
Medium
High
Yes
No
No
Some
Full
Limited
No
Limited
Turn any address, postal code, or place name into precise coordinates with a fast, developer-friendly geocoding API.
Ambee’s Geocoding API is a REST API that converts human-readable addresses into precise geographic coordinates and translates coordinates back into structured address information. For example, “1600 Amphitheatre Parkway, Mountain View, CA” can be converted into latitude 37.423021 and longitude -122.083739.
Responses are returned in JSON format, with structured fields including city, state, country, and postal code, while authentication is handled through a single API key in the request header.
Built with scalable, real-time location intelligence, global coverage, and developer-friendly integration, the API enables organizations to build reliable location intelligence directly into their products and operations.

const http = require("https");
const options = {
"method": "GET",
"hostname": "api.ambeedata.com",
"port": null,
"path": "/geocode/by-place?place=new york",
"headers": {
"x-api-key": "API_KEY",
"Content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ambeedata.com/geocode/by-place?place=new%20york")
.get()
.addHeader("x-api-key", "API_KEY")
.addHeader("Content-type", "application/json")
.build();
Response response = client.newCall(request).execute();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.ambeedata.com/geocode/by-place?place=new%20york"),
Headers =
{
{ "x-api-key", "API_KEY" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ambeedata.com/geocode/by-place?place=new%20york"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ambeedata.com/geocode/by-place?place=new%20york",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-type: application/json",
"x-api-key: API_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.ambeedata.com/geocode/by-place?place=new%20york")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'API_KEY'
request["Content-type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"message": "success",
"data": [
{
"countryCode": "US",
"postalCode": "67123-9630",
"city": "Potwin",
"placeName": "NW 120th St",
"lat": 38,
"state": "Kansas",
"division": "Butler",
"PM25": 7.244794324242575,
"PM10": 31.630507819643963,
"NO2": 5.296335376565732,
"SO2": 0.16864221223097375,
"CO": 0.1869163036883965,
"OZONE": 27.915852956730046,
"AQI": 30,
"updatedAt": "2024-07-08T07:00:00.000Z",
"lng": -97
}
]
}Sign up for an Ambee account and generate your API key from the dashboard.
Select the endpoint based on what you need: present conditions, historical data, or forecasts.
Specify the location using latitude/longitude coordinates, postal codes, city names, or country codes.
Include your API key in the request header and call the endpoint. You'll receive AQI and all seven pollutant concentrations in JSON format.
Common questions about Ambee's Geocoding API
Ambee's geocoding API is a powerful tool that converts user-friendly location names into precise geographic coordinates. It offers global coverage, lightning-fast conversion, and easy application integration. This API can streamline location-based services, customer data management, online services, logistics, real estate, and insurance processes.
The geocoding API functions by receiving HTTP requests from developers or applications, processing the request parameters, parsing addresses, performing geographic coordinate lookups, generating structured responses, and sending them back to the client. It simplifies the conversion of location queries into coordinates and vice versa.
Ambee's geocoding API offers several key features, including global coverage, dynamic address subfields, lightning-fast conversion, easy integration, scalable infrastructure, accuracy, precision, and comprehensive developer-friendly documentation.