Address parser

A parser is a tool for analyzing a string with some predefined rules. Using the Addresses API parser, you can convert a string into a correctly formatted address object.

The parser expects an address string in the following formats.

  • For best results, use a comma , as a delimiter.
  • Your address must follow this order: address_line_1, address_line_2, city_locality, state_province, postal_code, country_code.
  • phone and email can be in any part of the string.
Good string example ☑Bad string example ☒
Copy
Copied
11605 W Belleview Ave, Littleton, Colorado, 80127, US
Copy
Copied
Colorado 11605 W Belleview Ave Littleton 80127 US

Parse a string

Follow this example to parse a string to an address object.

cURLResponse
Copy
Copied
curl -i -X GET \
  'https://api.goshippo.com/v2/addresses/parse?address=Shippo%20731%20Market%20St%20%23200%2C%20San%20Francisco%2C%20CA%2094103%20US%20shippo%40shippo.com%20%2B1-555-999-8888' \
  -H 'Authorization: ShippoToken <API_TOKEN>'
Copy
Copied
{
    "email": "shippo@shippo.com",
    "phone": "+1-555-999-8888",
    "address_line_1": "731 MARKET ST",
    "address_line_2": "#200",
    "city_locality": "SAN FRANCISCO",
    "state_province": "CA",
    "postal_code": "94103",
    "country_code": "US"
}

Try Address Parser

Use this demo to learn about the Shippo Address Parser. This demo takes an address as an input, and then displays the response from the Address Parser method as visualized content and as a JSON object.

Please select an address and click Parse to get started.