Sthan.io API Documentation

USPS-verified address APIs for autocomplete, parsing, verification, geocoding, and IP geolocation. Get started in under 5 minutes.

All systems operational 99.9% uptime 100K free requests/mo REST API

Quick Start

Make your first API call in under 5 minutes.

1

Create a Free Account

Sign up at sthan.io and subscribe to the Free tier. No credit card required. Get 100,000 requests/month instantly.

2

Get Your API Key

Go to your Dashboard and copy your API key. Use it in the Authorization header of every request.

3

Make Your First Call

Copy any example below and replace YOUR_API_KEY with your actual key. That's it!

Authentication

Sthan.io uses a two-step authentication flow. First, obtain a JWT token using your profile credentials. Then, include that token as a Bearer token in all subsequent API requests.

Step 1: Get Your Token

GET /Auth/Token

Send your profileName and profilePassword as request headers. The API returns a JWT access token and its expiration time.

Request Headers
HeaderTypeRequiredDescription
profileNamestringRequiredYour access profile identifier. Case-sensitive.
profilePasswordstringRequiredYour access profile password. Case-sensitive.
Request
curl -X GET \
  "https://api.sthan.io/Auth/Token" \
  -H "profileName: YOUR_PROFILE_NAME" \
  -H "profilePassword: YOUR_PROFILE_PASSWORD"
200 Response
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5...",
  "expiration": "2026-02-19T03:45:00.0000000"
}
Response Fields
FieldTypeDescription
access_tokenstringJWT Bearer token. Include in Authorization header for all API calls.
expirationdatetimeUTC expiration timestamp. Request a new token before this time.

Step 2: Use the Token

Include the access_token as a Bearer token in the Authorization header of every subsequent API request.

All Subsequent Requests
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5...
Content-Type: application/json

Rate Limits

API requests are rate-limited per subscription plan. When you exceed your limit, the API returns 429 Too Many Requests. The response includes a Retry-After header indicating when you can retry.

PlanRequests / MonthBurst Rate
Free100,00010 req/sec
Starter500,00050 req/sec
Basic2,000,000100 req/sec
429 Response Headers
HTTP/1.1 429 Too Many Requests
Retry-After: 30
X-RateLimit-Limit: 100000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1708300800
GET

Address Autocomplete

/AutoComplete/USA/Address/{text}

Returns real-time address suggestions as the user types. Powered by USPS data with support for abbreviations, apartment/suite numbers, and partial input. Ideal for checkout forms and address fields.

Parameters
NameTypeRequiredDescription
textstringRequiredPartial address to search. URL-encoded. Min 3 chars for best results.
Response Codes
200 Success 400 Bad Request 401 Unauthorized 429 Rate Limited
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/USA/Address/123%20main%20st" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "123 Main St APT 1, Andover, MA 01810-3816",
  "123 Main St APT 1, Delhi, NY 13753-1257",
  "123 Main St STE 1, Caldwell, ID 83605-5476",
  "123 Main St, White Plains, NY 10601-3104",
  "123 Main St, Brockton, MA 02301-6204"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

Need more than just the full address string? Explore related APIs:

Address Parser

From $9/mo

Break addresses into components: street, city, state, ZIP, county.

View docs →

Address Verification

From $7/mo

Verify deliverability with DPV confirmation, carrier routes, ZIP+4.

View docs →

Forward Geocoding

From $5/mo

Convert addresses to latitude/longitude. High-accuracy coordinate resolution.

View docs →
GET

Address Parser

/AddressParser/USA/Single/{address}

Parses a raw address string into structured components (street number, street name, unit, city, state, ZIP, county). Returns USPS-standardized results with confidence scores.

Parameters
NameTypeRequiredDescription
addressstringRequiredFull or partial US address to parse. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AddressParser/USA/Single/1345%20avenue%20of%20americas" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
{
  "inputAddress": "1345 avenue of americas",
  "fullAddress": "1345 Avenue of the Americas, New York, NY 10105-2701",
  "addressLine1": "1345 Avenue of the Americas",
  "addressNumber": "1345",
  "streetName": "Avenue of the Americas",
  "city": "New York",
  "stateCode": "NY",
  "state": "New York",
  "zipCode": "10105",
  "zip4": "2701",
  "county": "New York",
  "isUspsVerified": true,
  "confidence": 0.98
}
Response Fields
FieldTypeDescription
fullAddressstringStandardized full address with ZIP+4
addressNumberstringHouse/building number
streetNamestringStandardized street name
unitTypestring?APT, STE, UNIT, etc.
countystringCounty name
isUspsVerifiedboolWhether USPS confirmed the address exists
confidencefloatMatch confidence score (0.0 – 1.0)

Try it live

Live demo — calls server-side proxy with demo credentials. No API key needed.

GET

Address Verification

/AddressVerification/Usa/Single/{address}

Verifies a US address against USPS data and returns deliverability information including DPV confirmation, carrier route, ZIP+4, delivery point, and record type.

Parameters
NameTypeRequiredDescription
addressstringRequiredUS address to verify. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AddressVerification/Usa/Single/1111%20howe%20ave%20sacramento%20ca" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
{
  "inputAddress": "1111 howe ave sacramento ca",
  "fullAddress": "1111 Howe Ave, Sacramento, CA 95825-7123",
  "addressLine1": "1111 Howe Ave",
  "city": "Sacramento",
  "stateCode": "CA",
  "county": "Sacramento",
  "zipCode": "95825",
  "zip4": "7123",
  "carrierRoute": "C001",
  "deliveryPoint": "12",
  "dpvConfirmation": "Y",
  "recordType": "S"
}
Response Fields
FieldTypeDescription
dpvConfirmationstringY = confirmed deliverable, N = not deliverable, S = secondary (apt) missing, D = vacant
carrierRoutestringUSPS carrier route code (e.g., C001 = city route 1)
deliveryPointstring2-digit delivery point code appended to ZIP+4
recordTypestringS = street, H = highrise, F = firm, R = rural route, P = PO box
zip4string4-digit ZIP extension for precise delivery routing

Try it live

Live demo — calls server-side proxy with demo credentials. No API key needed.

GET

City Autocomplete

/AutoComplete/USA/City/DisplayType/{displayType}/{text}

Returns real-time US city name suggestions as the user types. Supports multiple display formats combining city name with state code or full state name.

Parameters
NameTypeRequiredDescription
displayTypeintRequired0 = City, StateCode (e.g., Sacramento, CA)
1 = City, State (e.g., Sacramento, California)
textstringRequiredPartial city name to search. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/USA/City/DisplayType/0/sacram" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "Sacramento, CA",
  "Sacramento, KY",
  "Sacramento, NM",
  "Sacramento, PA"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

GET

ZIP Code Autocomplete

/AutoComplete/USA/ZipCode/DisplayType/{displayType}/{text}

Returns real-time ZIP code suggestions for US addresses. Supports 4 display formats with varying levels of detail. Covers all ~42,000 active US ZIP codes.

Parameters
NameTypeRequiredDescription
displayTypeintRequired0 = ZipCode, City, StateCode
1 = ZipCode, City, State
2 = ZipCode-Zip4, City, StateCode
3 = ZipCode-Zip4, City, State
textstringRequiredPartial ZIP code or city name. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/USA/ZipCode/DisplayType/0/9582" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "95820, Sacramento, CA",
  "95821, Sacramento, CA",
  "95822, Sacramento, CA",
  "95825, Sacramento, CA"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

GET

Forward Geocoding

/Geocoding/USA/Forward/{address}

Converts a US street address into geographic coordinates (latitude and longitude). Returns matched address components along with high-accuracy coordinates.

Parameters
NameTypeRequiredDescription
addressstringRequiredFull US address to geocode. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/Geocoding/USA/Forward/1600%20Pennsylvania%20Ave%20NW%20Washington%20DC" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
{
  "inputAddress": "1600 Pennsylvania Ave NW Washington DC",
  "fullAddress": "1600 Pennsylvania Ave NW, Washington, DC 20500",
  "latitude": 38.897676,
  "longitude": -77.036530,
  "city": "Washington",
  "stateCode": "DC",
  "county": "District of Columbia",
  "zipCode": "20500",
  "confidence": 0.97
}

Try it live

Live demo — calls server-side proxy with demo credentials. No API key needed.

GET

Reverse Geocoding

/Geocoding/USA/Reverse/{lat}/{lon}

Converts geographic coordinates (latitude/longitude) into a human-readable street address. Returns the nearest matched address with city, state, ZIP, and county information.

Parameters
NameTypeRequiredDescription
latdoubleRequiredLatitude coordinate (-90 to 90)
londoubleRequiredLongitude coordinate (-180 to 180)
Request
curl -X GET \
  "https://api.sthan.io/Geocoding/USA/Reverse/38.897676/-77.036530" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
{
  "latitude": 38.897676,
  "longitude": -77.036530,
  "fullAddress": "1600 Pennsylvania Ave NW, Washington, DC 20500",
  "city": "Washington",
  "stateCode": "DC",
  "state": "District of Columbia",
  "zipCode": "20500",
  "county": "District of Columbia"
}

Try it live

Live demo — calls server-side proxy with demo credentials. No API key needed.

GET

IP Geolocation

/IpGeolocation/{ip}

Look up the geographic location of any IPv4 or IPv6 address. Returns country, region, city, coordinates, timezone, and postal code.

Parameters
NameTypeRequiredDescription
ipstringRequiredIPv4 or IPv6 address (e.g., 8.8.8.8)
Request
curl -X GET \
  "https://api.sthan.io/IpGeolocation/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
{
  "ipAddress": "8.8.8.8",
  "country": "United States",
  "countryCode": "US",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.405991,
  "longitude": -122.078514,
  "timezone": "America/Los_Angeles",
  "postalCode": "94043"
}

Try it live

Leave blank and hit Send to look up your own IP. No API key needed.

GET

City Autocomplete (India)

/AutoComplete/Ind/City/DisplayType/{displayType}/{text}

Returns real-time city name suggestions for India. Covers all 700+ districts across 28 states and 8 UTs.

Parameters
NameTypeRequiredDescription
displayTypeintRequired0 = City, State
1 = City, District, State
textstringRequiredPartial city name. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/Ind/City/DisplayType/0/mumbai" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "Mumbai, Maharashtra",
  "Mumbai Suburban, Maharashtra",
  "Navi Mumbai, Maharashtra",
  "Mumbai City, Maharashtra"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

GET

Locality Autocomplete (India)

/AutoComplete/Ind/Locality/DisplayType/{displayType}/{text}

Returns real-time locality (area/neighborhood) suggestions for Indian addresses. Localities are sub-city areas commonly used in Indian addressing.

Parameters
NameTypeRequiredDescription
displayTypeintRequired0 = Locality, City, State
1 = Locality, City, District, State
textstringRequiredPartial locality name. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/Ind/Locality/DisplayType/0/koramangala" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "Koramangala, Bengaluru, Karnataka",
  "Koramangala 1st Block, Bengaluru, Karnataka",
  "Koramangala 2nd Block, Bengaluru, Karnataka",
  "Koramangala 3rd Block, Bengaluru, Karnataka",
  "Koramangala 4th Block, Bengaluru, Karnataka"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

GET

PIN Code Autocomplete (India)

/AutoComplete/Ind/PinCode/DisplayType/{displayType}/{text}

Returns real-time PIN code suggestions for India. India uses a 6-digit PIN code system covering over 150,000 post offices.

Parameters
NameTypeRequiredDescription
displayTypeintRequired0 = PinCode, City, State
1 = PinCode, City, District, State
textstringRequiredPartial PIN code or city name. URL-encoded.
Request
curl -X GET \
  "https://api.sthan.io/AutoComplete/Ind/PinCode/DisplayType/0/400001" \
  -H "Authorization: Bearer YOUR_API_KEY"
200 Response
[
  "400001, Mumbai, Maharashtra",
  "400002, Mumbai, Maharashtra",
  "400003, Mumbai, Maharashtra",
  "400004, Mumbai, Maharashtra",
  "400005, Mumbai, Maharashtra"
]

Try it live

Type-ahead demo — results appear as you type. Calls server-side proxy with demo credentials.

Error Handling

All endpoints return consistent error responses. Check the isError field and statusCode for error detection.

HTTP Status Codes
CodeMeaningCommon Cause
200SuccessRequest processed successfully
400Bad RequestInvalid parameters or empty address
401UnauthorizedMissing or invalid API key
403ForbiddenAPI key lacks permission for this endpoint
429Rate LimitedToo many requests. Slow down or upgrade plan.
500Server ErrorInternal error. Contact support if persistent.
Error Response Example
{
  "statusCode": 400,
  "isError": true,
  "errors": [
    "Arguments cannot be null or empty"
  ]
}