US Autocomplete API
Overview
Smarty's US Autocomplete Pro API provides real-time US address suggestions as users type, returning up to 10 valid USPS-deliverable address candidates per query to reduce data entry errors and speed up checkout flows. It uses USPS data to ensure every suggested address is a real, deliverable location rather than a guess. A free plan is available with a limited number of lookups per month.
Beginner Tip
Sign up at smarty.com for a free API key (embedded key). The endpoint is `https://us-autocomplete-pro.api.smarty.com/lookup?key=YOUR_KEY&search=123+Main`. Pass the partial address as the `search` parameter. Each keystroke query counts as one lookup — debounce your input handler to avoid burning through your free quota quickly.
Available Data
Example Response
{
"make": "Toyota",
"model": "Camry",
"year": 2025,
"engine": "2.5L 4-cylinder",
"fuel_economy": {
"city_mpg": 28,
"highway_mpg": 39
},
"msrp": 28400
} Field Reference
suggestions Array of address suggestion objects matching the partial input. suggestions[].street_line The suggested street address line (e.g., `123 Main St`). suggestions[].secondary Secondary address info such as apartment or suite number, if applicable. suggestions[].city City name for the suggested address. suggestions[].state Two-letter US state abbreviation. suggestions[].zipcode Five-digit ZIP code for the suggested address. Implementation Example
const url = "https://www.smarty.com/docs/cloud/us-autocomplete-pro-api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Lob.com
Lob.com provides a US Address Verification API that validates, standardizes, and geocodes US mailing addresses using USPS data, ensuring mail deliverability and cleaning up address databases.
US Extract
Smarty's US Extract API scans any block of unstructured text — emails, documents, web pages — and extracts all US postal addresses it finds, then validates each one against USPS data for deliverability.
US Street Address
The Smarty US Street Address API validates and enriches US postal addresses in real time, returning standardized components like delivery line, city, state, ZIP+4, and county FIPS code.
VATlayer
VATlayer is a REST API for validating EU VAT numbers in real time against official EU VIES (VAT Information Exchange System) data, returning company name, address, and registration status.
Postman Echo
⭐ Beginner's PickPostman Echo is a free HTTP test server that mirrors back exactly what you send — headers, query parameters, body, cookies, and request method — making it invaluable for debugging API clients and understanding HTTP behavior without needing a real backend.