Skip to content
Peachtree Data

← All API documentation

API Documentation

US Address Cleanse.

Validate and standardize a US address in real time. The response tells you whether the address is deliverable, standardizes it to USPS format, and parses it into individual fields — ZIP+4, county, carrier route, delivery point, and location.

Endpoint
https://rapid.peachtreedata.com/api/v1/addresscleanse
Methods
GET for a single address · POST for a batch
Formats
JSON by default; append .xml to the endpoint for XML
Try it
Run a live lookup in the demo — no key needed

Authentication

Every request carries your API key in the query string. The API is HTTPS-only, so the key is encrypted in transit. Query parameters can appear in any order, and responses are JSON by default — append .xml to the endpoint for XML.

https://rapid.peachtreedata.com/api/v1/addresscleanse?apikey={apikey}&…

Don't have a key? Sign up under plans & pricing below — keys work immediately.

Request

Pass the address in one of two shapes — never both in the same request. Use the standard format when your data is already split into fields; use the multiline format when addresses arrive free-form and you don't know which line holds what.

Standard US format

ParameterRequiredDescription
apikeyYesYour unique API key.
companynameIf this is a business address, the name of the company at the address. Powers SuiteLink — see the example below.
address1Street address portion. Example: 111 Main St.
address2Secondary address, usually the suite or apartment number. Example: Suite 200.
cityCity name. Don't combine with lastline.
stateState name or abbreviation. Don't combine with lastline.
zipcodeZIP Code. Don't combine with lastline.
lastlineUse when city, state, and ZIP arrive as one line. Example: Atlanta, Georgia 30301.
requestIdAny identifier you choose; echoed back in the response.

Addresses must include city + state, city + state + ZIP, ZIP alone, or a last line.

Multiline format

ParameterRequiredDescription
apikeyYesYour unique API key.
line1 … line8The address exactly as you have it, one field per line, up to eight lines. The cleanse works out which line is which — company names, street, suite, city/state, and ZIP can arrive in any layout.

Multiline requests need at least two address lines.

Examples

Single address (GET)
curl "https://rapid.peachtreedata.com/api/v1/addresscleanse?apikey={apikey}\
&companyname=Peachtree+Data\
&address1=2905+Premiere+Pkwy\
&city=Duluth&state=GA"
Response — note SuiteLink restoring “Ste 200” from the company name; the request didn't include a suite
{
  "status": "Confirmed",
  "statusMessage": "",
  "requestId": "",
  "fullAddress": "2905 Premiere Pkwy Ste 200",
  "primaryAddress": "2905 Premiere Pkwy",
  "secondaryAddress": "Ste 200",
  "lastLine": "Duluth, GA 30097-5275",
  "components": {
    "primaryNumber": "2905",
    "primaryName": "Premiere",
    "primaryType": "Pkwy",
    "secondaryUnitDescription": "Ste",
    "secondaryUnitNumber": "200",
    "city": "Duluth",
    "city13": "Duluth",
    "state": "GA",
    "zip10": "30097-5275",
    "zip5": "30097",
    "zip4": "5275"
  },
  "metadata": {
    "addressType": "HighRise",
    "isDefault": false,
    "countyCode": "135",
    "countyName": "Gwinnett",
    "dpvStatus": "Y",
    "dpvFootnote": "AABB",
    "isDpvNoStat": false,
    "isVacant": false,
    "rawDetailCode": "S90100",
    "deliveryPointBarCode": "50",
    "deliveryPointBarCodeCheckDigit": "7",
    "lineOfTravel": "0104",
    "lineOfTravelOrder": "D",
    "carrierRoute": "R058",
    "suiteLinkResult": "Match",
    "rdi": "Commercial"
  },
  "geoCode": {
    "assignmentLevel": "PRE",
    "censusTractBlock": "0502312009",
    "latitude": 34.005798,
    "longitude": -84.093159,
    "metroStatAreaCode": "0520"
  }
}
Batch (POST) — one JSON array, same fields per address
POST https://rapid.peachtreedata.com/api/v1/addresscleanse?apikey={apikey}
Content-Type: application/json

[
  {
    "companyname": "Peachtree Data",
    "address1": "2905 Premiere Pkwy",
    "address2": "Suite 200",
    "city": "Duluth",
    "state": "GA",
    "zipcode": "30097"
  },
  { "...": "up to your plan's max addresses per request" }
]
Multiline (GET) — lines in any layout
curl "https://rapid.peachtreedata.com/api/v1/addresscleanse?apikey={apikey}\
&line1=Peachtree+Data\
&line2=2905+Premiere+Pkwy\
&line3=Suite+200\
&line4=Duluth+GA&line5=30097"

A POST response wraps the per-address results in a small envelope:

FieldTypeDescription
totalRequestsAddresses in the request.
totalProcessedAddresses processed.
totalInvalidRequestsAddresses rejected as invalid requests.
totalErrorAddresses that errored during processing.
responsesOne response object per address, each with the same shape as a GET response.

Response reference

Root fields

FieldTypeDescription
statusString(36)Result of the cleanse. See status values.
statusMessageStringWhen status is Invalid or NotAttempted, the descriptive message.
requestIdString(50)Echo of the requestId you sent, unchanged.
fullAddressString(60)Single-line address containing the primary and secondary address.
primaryAddressString(60)Primary address line — street address or PO Box, without secondary information such as the apartment.
secondaryAddressString(60)Building name, floor, and room number in one field.
lastLineString(60)City, state, and ZIP+4 as one line.
componentsParsed address pieces — see the components table.
metadataDelivery intelligence — see the metadata table.
geoCodeLocation data — see the geoCode table.

components

The address, parsed into its individual pieces.

FieldTypeDescription
cityString(28)City preferred by the postal authority.
city13String(13)Abbreviated city preferred by the postal authority.
primaryNumberString(10)The premise number.
primaryPrefixString(2)Abbreviated directional (N, S, NW, SE…) before the street name.
primaryNameString(28)Street name.
primaryTypeString(4)Abbreviated street type — St, Ave, Pl.
primaryPostfixString(2)Abbreviated directional (N, S, NW, SE…) after the street name.
secondaryUnitDescriptionString(8)Unit description — #, Apartment, Flat.
secondaryUnitNumberString(8)Unit number — the 100 in “APT 100”.
stateString(2)State abbreviation.
zip5String(5)Five-digit ZIP Code, without the ZIP+4.
zip4String(4)Four-digit ZIP+4 add-on.
zip10String(10)Five-digit ZIP Code with the ZIP+4 — 11111-2222.
nonPostalSecondaryAddressString(20)Complete non-postal secondary address, such as “PMB 10” — mail delivered through a private mailbox company rather than USPS.
primaryAddressRemainderString(40)Extraneous data on the address line that isn't address data or doesn't belong in the standardized line — may include invalid secondary information.
secondaryAddressExtraneousString(28)Extraneous data from the secondary address, possibly including invalid secondary data.
extraLine1String(60)Non-address data found above or below the address. Multiline input only.
extraLine2String(60)Non-address data found above or below the address. Multiline input only.

metadata

Everything USPS knows about deliverability at this address.

FieldTypeDescription
addressTypeString(15)Type of address.
  • Street standard street address
  • HighRise multi-unit building
  • Firm business with its own record
  • PoBox post office box
  • RuralRoute rural route
  • CMRA commercial mail-receiving agency (Mailbox Etc.)
  • GeneralDelivery general delivery
  • Military military address
  • Unique unique ZIP Code
  • NoMatch no match found
dpvStatusString(1)Delivery Point Validation result for this record.
  • Y confirmed delivery point — primary and secondary (if present) are valid
  • D primary confirmed, but the secondary was missing from the input
  • S primary confirmed, but the parsed secondary isn't valid in the DPV directory
  • N not a valid delivery point
  • L the address triggered DPV locking
  • blank the address couldn't be assigned
dpvFootnoteString(12)Up to six two-character DPV footnotes, always in the same order.
  • AA input matches the ZIP+4 file
  • A1 input doesn't match the ZIP+4 file
  • BB all input fields match DPV
  • CC primary matches, secondary present but invalid
  • C1 primary matches, secondary required but missing
  • N1 high-rise missing a secondary number
  • M1 primary number missing
  • M3 primary number invalid
  • P1 missing rural route or highway contract box number
  • P3 invalid PO, rural route, or highway contract number
  • PB matches PBSA (PO Box as street address)
  • RR matches a CMRA
  • R1 matches a CMRA, secondary not present
  • R7 matches a phantom route
  • F1 matches a military address
  • G1 matches a general delivery address
  • U1 matches a unique ZIP Code
  • IA identified as an informed address
  • NL an NCOALink move address can't be DPV confirmed
  • TA primary matched by dropping the trailing alpha
isDpvNoStatString(5)No-stat indicator: the address is vacant, receives mail as part of a drop, or doesn't have an established delivery yet. True, False, or null when not looked up.
isVacantString(5)Vacancy indicator. True, False, or null when not looked up.
isDefaultString(5)True when this matched a building default record — a finer assignment would be possible with more input (usually a unit number).
suiteLinkResultString(7)SuiteLink lookup result.
  • Match secondary information was found via the company name and assigned to this record
  • NoMatch attempted, no matching record
  • empty not attempted
lacsLinkReturnCodeString(2)LACSLink match status (rural-style addresses converted to city-style).
  • A match — converted address provided in the address fields
  • 00 no match, no converted address
  • 09 matched to a high-rise default old address; no new address provided
  • 14 record found but couldn't convert to a deliverable address
  • 92 matched after dropping the input secondary number
  • blank not attempted
countyNameString(25)Fully-spelled county name.
countyCodeString(3)FIPS three-digit county code; unique within a state.
carrierRouteString(4)Four-digit carrier route.
deliveryPointBarCodeString(2)Two-digit delivery point.
deliveryPointBarCodeCheckDigitString(1)Check digit for the delivery-point barcode (or the five-digit barcode when a full ZIP+4 couldn't be assigned).
lineOfTravelString(4)Line-of-travel number.
lineOfTravelOrderString(1)Line-of-travel sortation: A ascending, D descending.
rdiString(11)Residential Delivery Indicator: Commercial, Residential, or Unknown.
rawDetailCodeString(6)Raw processing code holding either the status code or error code — positional, one character per aspect of the cleanse. See detail codes.

geoCode

Where the address is, and how precisely it could be placed.

FieldTypeDescription
assignmentLevelString(3)Level to which the location was matched.
  • PRE Primary Range Exact — the exact location of the address
  • PRI Primary Range Interpolated — the address range
  • L1–L4 locality level — city, town, or suburb
  • P1 Postcode1 level
  • P2P full Postcode1 plus partial Postcode2
  • PF full postcode when available
latitudeString(17)Latitude at the best assigned level, in the format 45.32861.
longitudeString(17)Longitude at the best assigned level, in the format 123.45833.
censusTractBlockString(11)Census tract and block — small, relatively permanent statistical subdivisions of a county.
metroStatAreaCodeString(4)Metropolitan Statistical Area (MSA) code.

Status values

The top-level status field is the one to branch on.

StatusDescription
ConfirmedUSPS confirms every part of the address. It's real and deliverable.
ConfirmedPrimaryUnavailableSecondaryThe street address is confirmed, but USPS couldn't verify the unit or suite.
ConfirmedPrimaryInvalidSecondaryThe street address is confirmed, but the unit or suite doesn't match USPS records.
InvalidNo USPS match as entered — statusMessage explains why, and the error code appears in rawDetailCode.
NotAttemptedThe address couldn't be checked against USPS records.

Detail codes

rawDetailCode is a six-character positional code describing exactly what the cleanse changed. In S90100, the S means nothing was truncated, the 9 means a different ZIP Code and ZIP+4 were assigned, and the 1 means a different unit description was assigned. When the status is Invalid, this field carries an error code instead.

1st character — Truncation
  • S no truncation occurred
  • A truncated the address line to fit your field
  • C truncated the city to fit your field
  • B truncated both the address line and the city
2nd character — City, state, ZIP Code, ZIP+4
  • 0 no significant difference
  • 1 assigned a different ZIP Code
  • 2 assigned a different city
  • 3 assigned a different city and ZIP Code
  • 4 assigned a different state
  • 5 assigned a different state and ZIP Code
  • 6 assigned a different city and state
  • 7 assigned a different city, state, and ZIP Code
  • 8 assigned a different ZIP+4
  • 9 assigned a different ZIP Code and ZIP+4
  • A assigned a different city and ZIP+4
  • B assigned a different city, ZIP Code, and ZIP+4
  • C assigned a different state and ZIP+4
  • D assigned a different state, ZIP Code, and ZIP+4
  • E assigned a different city, state, and ZIP+4
  • F assigned a different city, state, ZIP Code, and ZIP+4
3rd character — Street name, prefix/postfix, street type
  • 0 no significant difference
  • 1 assigned a different street type
  • 2 assigned a different prefix
  • 3 assigned a different prefix and street type
  • 4 assigned a different postfix
  • 5 assigned a different street type and postfix
  • 6 assigned a different prefix and postfix
  • 7 assigned a different prefix, street type, and postfix
  • 8 assigned a different street name
  • 9 assigned a different street name and street type
  • A assigned a different prefix and street name
  • B assigned a different prefix, street name, and street type
  • C assigned a different street name and postfix
  • D assigned a different street name, street type, and postfix
  • E assigned a different prefix, street name, and postfix
  • F assigned a different prefix, street name, postfix, and street type
4th character — County, sort code route, delivery point, unit description
  • 0 no significant difference
  • 1 assigned a different unit description
  • 2 assigned a different delivery point
  • 3 assigned a different delivery point and unit description
  • 4 assigned a different sort code route
  • 5 assigned a different sort code route and unit description
  • 6 assigned a different sort code route and delivery point
  • 7 assigned a different sort code route, delivery point, and unit description
  • 8 assigned a different county number
  • 9 assigned a different county number and unit description
  • A assigned a different county number and delivery point
  • B assigned a different county number, delivery point, and unit description
  • C assigned a different county number and sort code route
  • D assigned a different county number, sort code route, and unit description
  • E assigned a different county number, sort code route, and delivery point
  • F assigned a different county number, sort code route, delivery point, and unit description
5th character — Line of travel
  • 0 no significant difference
  • 1 assigned a different LOT
  • 2 assigned a different LOT order
  • 3 assigned a different LOT and LOT order
6th character — Reserved
  • 0 always zero

Error codes

When an address can't be cleansed, the error code lands in rawDetailCode and the plain-English version in statusMessage.

CodeDescription
E101Last line is bad or missing.
E212No locality and bad postal code.
E213Bad locality, valid region, and no postal code.
E214Bad locality and bad postal code.
E216Bad postal code and can't determine which locality match to select.
E302No primary address line parsed.
E412Primary name not found in directory.
E413Possible primary name matches are too close to choose one.
E420Primary range is missing.
E421Primary range is invalid for the street, route, or building.
E422Primary prefix needed; input is wrong or missing.
E423Primary type needed; input is wrong or missing.
E425Primary type and directional needed; input is wrong or missing.
E427Primary postfix needed; input is wrong or missing.
E428Bad postal code; can't select an address match.
E429Bad locality; can't select an address match.
E430Possible address-line matches too close to choose one.
E431Locality2 needed; input is wrong or missing.
E439Exact match made in the EWS (early warning) directory.
E500Other error.
E501Foreign address.
E502Input record entirely blank.
E503Postal code not in the area covered by the partial USPS directory.
E504Overlapping ranges in the USPS directory.
E505Address does not exist in the USPS directories. Undeliverable address.
E600Marked by USPS as unsuitable for delivery of mail.
E601The primary address number did not DPV confirm, and the ZIP+4 was removed.

HTTP response codes

CodeDescription
200Processed successfully.
400Bad request — the API key format is invalid, the key is missing, or the input wasn't properly passed.
401Unauthorized — the API key is inactive or invalid.
403Forbidden — the request exceeds the max items allowed per call, or the account isn't set up for this service.
408Request timeout — processing exceeded the max processing time.
500Internal server error during processing.

Plans & pricing

Every plan includes the full response you see above — and one subscription covers all three address services: Canadian Address Cleanse and ZIP Code Information share the same API key and monthly pool of lookups. Sign up takes a couple of minutes and keys work immediately — start free, move up when your volume does.

Free

250 lookups per month

Hard limit of 250 lookups per month — perfect for evaluating.

Sign up

$30/mo

1,000 lookups per month

$0.03 per lookup above 1,000 in a month.

Sign up

$100/mo

10,000 lookups per month

$0.01 per lookup above 10,000 in a month.

Sign up

$400/mo

50,000 lookups per month

$0.008 per lookup above 50,000 in a month.

Sign up

$600/mo

100,000 lookups per month

$0.006 per lookup above 100,000 in a month.

Sign up

$1,250/mo

250,000 lookups per month

$0.005 per lookup above 250,000 in a month.

Sign up

Above 250,000 lookups a month, or if you'd rather be invoiced, talk to us — we'll set up a plan that fits. Sign-up and key management currently live on our developer portal; your key comes by email right after you register.

Integrating address validation?

Tell us what you're building and we'll get you moving — usually the same day.