Address Validation API

Validate an Address

Validates a mailing address and returns geolocation coordinates for it, along with a normalized version of the address where one can be resolved. Use this before submitting an address to another endpoint (for example, a company address, work location, or employee address) when you want to confirm it's deliverable and get its geoLatitude/geoLongitude ahead of time.

Endpoint

POST https://api.worklio.com/wep/addressvalidation

Requires a bearer access token (see How to Get API Access).

Fields:

FieldTypeRequiredDescription
addressLine1stringYesStreet address line 1.
addressLine2stringNoStreet address line 2 (suite, unit, etc.).
addressCitystringYesCity.
addressStatestringNoTwo-letter state code.
addressZIPstringYesZIP/postal code.
addressCountrystringNoISO country code. If omitted, Worklio infers the country from addressCity and addressZIP rather than defaulting to a fixed value.
🚧

Sending an addressCountry that doesn't match where the address actually is doesn't produce an error. Worklio falls back to resolving the address against whatever country its city/ZIP actually belong to, and the response's addressCountry reflects that resolved country — which can differ from what you sent. See the second example below.

Example request

require("dotenv").config();

const TOKEN = process.env.API_KEY;
const url = `https://api.worklio.com/wep/addressvalidation`;

const payload = {
  addressLine1: "3150 S Las Vegas Blvd",
  addressCity: "Las Vegas",
  addressZIP: "89101"
};

async function validateAddress() {
  const response = await fetch(url, {
    method: "POST",
    headers: {
      accept: "application/json",
      "api-version": "2.0",
      authorization: `Bearer ${TOKEN}`,
      "content-type": "application/json",
      "x-api-version": "2.0"
    },
    body: JSON.stringify(payload)
  });

  console.log(response.status);
  console.log(await response.text());
}

validateAddress();
curl -s -X POST "https://api.worklio.com/wep/addressvalidation" \
  -H "accept: application/json" \
  -H "api-version: 2.0" \
  -H "authorization: Bearer $API_KEY" \
  -H "content-type: application/json" \
  -H "x-api-version: 2.0" \
  -d '{
    "addressLine1": "3150 S Las Vegas Blvd",
    "addressCity": "Las Vegas",
    "addressZIP": "89101"
  }' | jq .

Example response

{
  "precision": 2,
  "geoLatitude": 36.1283046,
  "geoLongitude": -115.1679053,
  "addressLine1": "3150 South Las Vegas Boulevard",
  "addressCity": "Las Vegas",
  "addressState": "NV",
  "addressZIP": "89109",
  "addressCountry": "US"
}

addressLine1, addressCity, addressState, and addressZIP in the response are Worklio's normalized version of the address, not an echo of what you sent — note the ZIP corrected from 89101 to 89109 and the street name expanded to its full form.

The precision field

precision tells you how closely the address could be matched. It's one of:

ValueNameMeaning
1RoofTopMatched to the exact building/rooftop location.
2RangeInterpolationMatched by interpolating a point along the street's address range.
3GeometricCenterMatched to the geometric center of an area (e.g., a city or postal code) rather than a specific street address.
4ApproximateAn approximate match; typically means part of the address (such as the street) couldn't be resolved.
99NoResultThe address couldn't be geocoded.

Always check precision rather than assuming a 200 response means the address is fully deliverable — as the next example shows, Worklio returns 200 even when it can only partially resolve the address.

Example: address that can't be fully resolved

{
  "addressLine1": "New York Main Street",
  "addressCity": "New York",
  "addressZIP": "89101",
  "addressCountry": "SK"
}
{
  "precision": 4,
  "geoLatitude": 40.7127753,
  "geoLongitude": -74.0059728,
  "addressLine1": "",
  "addressCity": "New York",
  "addressState": "NY",
  "addressCountry": "US"
}

Here, addressZIP: "89101" (a Las Vegas ZIP) and addressCountry: "SK" don't correspond to an actual "New York Main Street" in Slovakia, so Worklio falls back to resolving the address by city name alone. The response reflects that fallback: addressCountry comes back as "US" — not the "SK" that was sent — addressState is inferred as "NY", addressLine1 is empty because no specific street could be matched, and precision drops to 4 (Approximate).

Usage and cost

Worklio cautions that overly extensive use of this endpoint can lead to additional charges. Specific rate limits and pricing details aren't documented yet — check with your account contact if you're planning high-volume use.


Did this page help you?