India Locality AutoComplete
Real-time autocomplete suggestions with fast response times and 10,000 free requests per month.
Last updated: March 7, 2026
Usage
0 / day
Remaining
500 / day
Average
0 MS
IP Address
216.73.216.77
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 (uses jq to read Result.access_token) TOKEN=$(curl -s "https://api.sthan.io/Auth/Token" \ -H "profileName: YOUR_PROFILE_NAME" \ -H "profilePassword: YOUR_PROFILE_PASSWORD" | jq -r '.Result.access_token') # Step 2: Make the API call curl -s "https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra" \ -H "Authorization: Bearer $TOKEN"
// Node.js 18+ (save as example.mjs, run: node example.mjs) // 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" } }); if (!auth.ok) throw new Error(`Auth failed: ${auth.status}`); const { access_token } = (await auth.json()).Result; // Step 2: Make the API call const response = await fetch("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra", { headers: { Authorization: `Bearer ${access_token}` } }); console.log(await response.json());
import requests # Step 1: Get your auth token auth = requests.get( "https://api.sthan.io/Auth/Token", headers={"profileName": "YOUR_PROFILE_NAME", "profilePassword": "YOUR_PROFILE_PASSWORD"}, timeout=10, ) auth.raise_for_status() token = auth.json()["Result"]["access_token"] # Step 2: Make the API call response = requests.get("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra", headers={"Authorization": f"Bearer {token}"}, timeout=10) response.raise_for_status() print(response.json())
// .NET 6+ console app (Program.cs) using System.Net.Http.Headers; using System.Text.Json; using var client = new HttpClient(); // Step 1: Get your auth token var authRequest = new HttpRequestMessage(HttpMethod.Get, "https://api.sthan.io/Auth/Token"); authRequest.Headers.Add("profileName", "YOUR_PROFILE_NAME"); authRequest.Headers.Add("profilePassword", "YOUR_PROFILE_PASSWORD"); using var authResponse = await client.SendAsync(authRequest); authResponse.EnsureSuccessStatusCode(); using var authJson = JsonDocument.Parse(await authResponse.Content.ReadAsStringAsync()); var token = authJson.RootElement.GetProperty("Result").GetProperty("access_token").GetString(); // Step 2: Make the API call client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var response = await client.GetStringAsync("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra"); Console.WriteLine(response);
// Java 11+, no extra libraries. Save as Example.java, run: java Example.java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); // Step 1: Get your auth token HttpRequest authRequest = HttpRequest.newBuilder(URI.create("https://api.sthan.io/Auth/Token")) .header("profileName", "YOUR_PROFILE_NAME") .header("profilePassword", "YOUR_PROFILE_PASSWORD") .build(); String authBody = client.send(authRequest, HttpResponse.BodyHandlers.ofString()).body(); // The token is at Result.access_token (read it with your JSON library, or like this) Matcher m = Pattern.compile("\"access_token\"\\s*:\\s*\"([^\"]+)\"").matcher(authBody); if (!m.find()) throw new IllegalStateException("No token in: " + authBody); String token = m.group(1); // Step 2: Make the API call HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra")) .header("Authorization", "Bearer " + token) .build(); System.out.println(client.send(request, HttpResponse.BodyHandlers.ofString()).body()); } }
<?php // PHP 7.4+ with the curl extension // Step 1: Get your auth token $ch = curl_init("https://api.sthan.io/Auth/Token"); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ["profileName: YOUR_PROFILE_NAME", "profilePassword: YOUR_PROFILE_PASSWORD"], CURLOPT_RETURNTRANSFER => true, ]); $auth = json_decode(curl_exec($ch), true); $token = $auth["Result"]["access_token"]; // Step 2: Make the API call $ch = curl_init("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra"); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ["Authorization: Bearer " . $token], CURLOPT_RETURNTRANSFER => true, ]); echo curl_exec($ch), PHP_EOL;
require "net/http" require "json" # 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" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } token = JSON.parse(res.body)["Result"]["access_token"] # Step 2: Make the API call uri = URI("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra") req = Net::HTTP::Get.new(uri) req["Authorization"] = "Bearer #{token}" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } puts JSON.parse(res.body)
package main import ( "encoding/json" "fmt" "io" "net/http" ) func main() { // 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, err := http.DefaultClient.Do(authReq) if err != nil { panic(err) } defer authResp.Body.Close() var auth struct { Result struct { AccessToken string `json:"access_token"` } } if err := json.NewDecoder(authResp.Body).Decode(&auth); err != nil { panic(err) } // Step 2: Make the API call req, _ := http.NewRequest("GET", "https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra", nil) req.Header.Set("Authorization", "Bearer "+auth.Result.AccessToken) resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) }
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] } // tokio = { version = "1", features = ["full"] }, serde_json = "1" #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = reqwest::Client::new(); // Step 1: Get your auth token let auth: serde_json::Value = client .get("https://api.sthan.io/Auth/Token") .header("profileName", "YOUR_PROFILE_NAME") .header("profilePassword", "YOUR_PROFILE_PASSWORD") .send() .await? .error_for_status()? .json() .await?; let token = auth["Result"]["access_token"].as_str().ok_or("no token in response")?; // Step 2: Make the API call let body = client .get("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra") .bearer_auth(token) .send() .await? .text() .await?; println!("{body}"); Ok(()) }
// Kotlin (JVM 11+), no extra libraries import java.net.URI import java.net.http.HttpClient import java.net.http.HttpRequest import java.net.http.HttpResponse fun main() { val client = HttpClient.newHttpClient() // Step 1: Get your auth token val authRequest = HttpRequest.newBuilder(URI.create("https://api.sthan.io/Auth/Token")) .header("profileName", "YOUR_PROFILE_NAME") .header("profilePassword", "YOUR_PROFILE_PASSWORD") .build() val authBody = client.send(authRequest, HttpResponse.BodyHandlers.ofString()).body() // The token is at Result.access_token (read it with your JSON library, or like this) val token = Regex("\"access_token\"\\s*:\\s*\"([^\"]+)\"").find(authBody)?.groupValues?.get(1) ?: error("No token in: $authBody") // Step 2: Make the API call val request = HttpRequest.newBuilder(URI.create("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra")) .header("Authorization", "Bearer $token") .build() println(client.send(request, HttpResponse.BodyHandlers.ofString()).body()) }
# Run as a script: elixir example.exs # (in a Mix project, add {:req, "~> 0.5"} to deps and drop the next line) Mix.install([{:req, "~> 0.5"}]) # Step 1: Get your auth token auth = Req.get!("https://api.sthan.io/Auth/Token", headers: [{"profileName", "YOUR_PROFILE_NAME"}, {"profilePassword", "YOUR_PROFILE_PASSWORD"}] ) token = auth.body["Result"]["access_token"] # Step 2: Make the API call response = Req.get!("https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/bandra", auth: {:bearer, token}) IO.inspect(response.body)
Example Response
{
"Id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"Result": [
"Bandra Adinggre, West Garo Hills, Meghalaya - 794103",
"Bandra Bari, Kishanganj, Bihar - 855106",
"Bandra Bengka, West Garo Hills, Meghalaya - 793103",
"Bandra, Alwar, Rajasthan",
"Bandra, Alwar, Rajasthan - 301411"
],
"ClientSessionId": null,
"StatusCode": 200,
"IsError": false,
"Errors": []
}
Frequently Asked Questions
India Locality AutoComplete is an autocomplete API that suggests matching results as users type, helping them quickly select the correct option from a dropdown list. It reduces form completion time and input errors by guiding users to valid selections.
sthan.io offers 10,000 free requests per month with no credit card required. Paid plans start at $2/month for additional requests. Annual subscriptions provide additional savings.
Our autocomplete API delivers fast response times, providing instant suggestions as users type. We use optimized infrastructure to ensure quick, reliable autocomplete for your applications.
Integration is simple with our REST API. Sign up for a free account, get your API credentials, and start making requests. We provide documentation and code examples in popular languages including JavaScript, Python, C#, and more.
Yes! sthan.io offers 10,000 free autocomplete requests per month. No credit card is required to sign up. This generous free tier allows you to test and integrate our API before committing to a paid plan.
The API returns structured autocomplete suggestions based on user input. Results include the complete formatted value along with component parts, making it easy to populate forms and validate user selections.
Ready to Get Started?
Start with 10,000 free requests per month. No credit card required.