Geocode Any USA Address with Rooftop Precision
Convert street addresses to latitude/longitude coordinates. 1.13 billion USA addresses covered, with confidence scores in every response.
Last updated: March 7, 2026
Integrate in Minutes
Two steps: get your token, then make the GET request. Pick your language and start building.
# Step 1: Get your auth token TOKEN=$(curl -s "https://api.sthan.io/Auth/Token" \ -H "profileName: YOUR_PROFILE_NAME" \ -H "profilePassword: YOUR_PROFILE_PASSWORD" | jq -r '.access_token') # Step 2: Make the API call ADDRESS="1600 Pennsylvania Ave NW Washington DC" ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$ADDRESS'))") curl "https://api.sthan.io/Geocoding/USA/Forward/$ENCODED" \ -H "Authorization: Bearer $TOKEN"
// Step 1: Get your auth token const auth = await fetch("https://api.sthan.io/Auth/Token", { headers: { "profileName": "YOUR_PROFILE_NAME", "profilePassword": "YOUR_PROFILE_PASSWORD" } }); const { access_token } = await auth.json(); // Step 2: Make the API call const address = "1600 Pennsylvania Ave NW Washington DC"; const encoded = encodeURIComponent(address); const response = await fetch( `https://api.sthan.io/Geocoding/USA/Forward/${encoded}`, { headers: { "Authorization": `Bearer ${access_token}` } }); const data = await response.json(); console.log(data);
import requests from urllib.parse import quote # Step 1: Get your auth token auth = requests.get( "https://api.sthan.io/Auth/Token", headers={ "profileName": "YOUR_PROFILE_NAME", "profilePassword": "YOUR_PROFILE_PASSWORD" } ) token = auth.json()["access_token"] # Step 2: Make the API call address = "1600 Pennsylvania Ave NW Washington DC" encoded = quote(address) response = requests.get( f"https://api.sthan.io/Geocoding/USA/Forward/{encoded}", headers={"Authorization": f"Bearer {token}"} ) data = response.json() print(data)
using var client = new HttpClient(); // Step 1: Get your auth token client.DefaultRequestHeaders.Add("profileName", "YOUR_PROFILE_NAME"); client.DefaultRequestHeaders.Add("profilePassword", "YOUR_PROFILE_PASSWORD"); var authJson = await client.GetStringAsync("https://api.sthan.io/Auth/Token"); var auth = JsonSerializer.Deserialize<JsonElement>(authJson); var token = auth.GetProperty("access_token").GetString(); // Step 2: Make the API call client.DefaultRequestHeaders.Clear(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var address = "1600 Pennsylvania Ave NW Washington DC"; var encoded = Uri.EscapeDataString(address); var response = await client.GetStringAsync( $"https://api.sthan.io/Geocoding/USA/Forward/{encoded}"); Console.WriteLine(response);
import java.net.*; import java.net.http.*; // Step 1: Get your auth token HttpClient client = HttpClient.newHttpClient(); HttpRequest authReq = HttpRequest.newBuilder() .uri(URI.create("https://api.sthan.io/Auth/Token")) .header("profileName", "YOUR_PROFILE_NAME") .header("profilePassword", "YOUR_PROFILE_PASSWORD") .build(); HttpResponse<String> authResp = client.send(authReq, HttpResponse.BodyHandlers.ofString()); // Parse access_token from authResp.body() // Step 2: Make the API call String address = "1600 Pennsylvania Ave NW Washington DC"; String encoded = URLEncoder.encode(address, "UTF-8"); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.sthan.io/Geocoding/USA/Forward/" + encoded)) .header("Authorization", "Bearer " + token) .build(); HttpResponse<String> resp = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(resp.body());
// Step 1: Get your auth token $ch = curl_init("https://api.sthan.io/Auth/Token"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "profileName: YOUR_PROFILE_NAME", "profilePassword: YOUR_PROFILE_PASSWORD" ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = json_decode(curl_exec($ch), true); $token = $data["access_token"]; // Step 2: Make the API call $address = "1600 Pennsylvania Ave NW Washington DC"; $encoded = urlencode($address); $ch = curl_init("https://api.sthan.io/Geocoding/USA/Forward/" . $encoded); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $token ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); echo $response;
require 'net/http' require 'json' require 'uri' # Step 1: Get your auth token uri = URI("https://api.sthan.io/Auth/Token") req = Net::HTTP::Get.new(uri) req["profileName"] = "YOUR_PROFILE_NAME" req["profilePassword"] = "YOUR_PROFILE_PASSWORD" resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } token = JSON.parse(resp.body)["access_token"] # Step 2: Make the API call address = "1600 Pennsylvania Ave NW Washington DC" encoded = URI.encode_www_form_component(address) uri = URI("https://api.sthan.io/Geocoding/USA/Forward/#{encoded}") req = Net::HTTP::Get.new(uri) req["Authorization"] = "Bearer #{token}" resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } puts JSON.parse(resp.body)
import ("net/http"; "net/url"; "io"; "fmt") // Step 1: Get your auth token authReq, _ := http.NewRequest("GET", "https://api.sthan.io/Auth/Token", nil) authReq.Header.Set("profileName", "YOUR_PROFILE_NAME") authReq.Header.Set("profilePassword", "YOUR_PROFILE_PASSWORD") authResp, _ := http.DefaultClient.Do(authReq) defer authResp.Body.Close() // Parse access_token from response JSON // Step 2: Make the API call address := "1600 Pennsylvania Ave NW Washington DC" encoded := url.QueryEscape(address) req, _ := http.NewRequest("GET", "https://api.sthan.io/Geocoding/USA/Forward/" + encoded, nil) req.Header.Set("Authorization", "Bearer " + token) resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))
{
"inputAddress": "1600 Pennsylvania Ave NW, Washington, DC 20500-0005",
"formattedAddress": "1600 PENNSYLVANIA AVE NW, WASHINGTON, DC, 20500",
"latitude": 38.89869893252,
"longitude": -77.03518753691,
"source": "20",
"confidence": "high",
"components": {
"streetNumber": "1600",
"street": "PENNSYLVANIA AVE NW",
"city": "WASHINGTON",
"state": "DC",
"zip": "20500",
"zip4": null
},
"interpolation": null
}
Why Developers Choose Sthan for Geocoding
Accurate coordinates, broad coverage, and a simple API — so you can focus on your application, not your geocoding pipeline.
1.13 Billion USA Addresses
Comprehensive coverage across every US state and territory. Residential, commercial, and PO Box addresses — all geocoded with high accuracy.
Always Returns a Result
Our system uses multiple data sources to maximize coverage. If one source doesn't have a match, the request automatically falls back to alternatives — so you get coordinates for virtually any valid USA address.
Simple REST API
One endpoint, one address, one JSON response. No SDKs to install, no complex configuration — just a GET request with your address.
Rooftop-Level Precision with Confidence Scores
Every response includes a confidence score so you know exactly how precise the result is — and can handle edge cases in your application logic.
Start Free, Scale When Ready
100 geocoding requests per month on the free tier — no credit card required. Upgrade when your volume grows.
Frequently Asked Questions
Geocode Your First Address in 60 Seconds
Sign up, grab your API key, and make your first request. Free tier included.
No credit card required • 100 free requests/month