addresses

Parse an address

Changed on

The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more.

Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels.

Note: Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.

put/v1/addresses/recognize

Request

  • Base URL
    https://api.shipengine.com
  • URL
    https://api.shipengine.com/v1/addresses/recognize
  • Auth
    API key in header API-Key

Request body

textstring required

The unstructured text that contains address-related entities

Example request

{
  "text": "Margie McMiller at 3800 North Lamar suite 200 in austin, tx.  The zip code there is 78652.",
  "address": {
    "name": "John Doe",
    "phone": "+1 204-253-9411 ext. 123",
    "email": "example@example.com",
    "company_name": "The Home Depot",
    "address_line1": "1999 Bishop Grandin Blvd.",
    "address_line2": "Unit 408",
    "address_line3": "Building #7",
    "city_locality": "Winnipeg",
    "state_province": "Manitoba",
    "postal_code": "78756-3717",
    "country_code": "CA"
  }
}

Response

Returns the parsed address, as well as a confidence score and a list of all the entities that were recognized in the text.

scorenumber double required

A confidence score between zero and one that indicates how certain the API is that it understood the text.

Example response

{
  "address": {
    "name": "John Doe",
    "phone": "+1 204-253-9411 ext. 123",
    "email": "example@example.com",
    "company_name": "The Home Depot",
    "address_line1": "1999 Bishop Grandin Blvd.",
    "address_line2": "Unit 408",
    "address_line3": "Building #7",
    "city_locality": "Winnipeg",
    "state_province": "Manitoba",
    "postal_code": "78756-3717",
    "country_code": "CA"
  }
}

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • warning

      added the new file_not_found enum value to the //// response property for the response status

    • warning

      added the new file_not_found enum value to the //// response property for the response status

    • warning

      added the new funding_source_error enum value to the //// response property for the response status

    • warning

      added the new funding_source_error enum value to the //// response property for the response status

    • warning

      added the new funding_source_missing_configuration enum value to the //// response property for the response status

    • warning

      added the new funding_source_missing_configuration enum value to the //// response property for the response status

    • warning

      added the new funding_source_registration_in_progress enum value to the //// response property for the response status

    • warning

      added the new funding_source_registration_in_progress enum value to the //// response property for the response status

    • warning

      added the new insurance_failure enum value to the //// response property for the response status

    • warning

      added the new insurance_failure enum value to the //// response property for the response status

    • warning

      added the new service_not_determined enum value to the //// response property for the response status

    • warning

      added the new service_not_determined enum value to the //// response property for the response status

    • warning

      added the new shipping_rule_not_found enum value to the //// response property for the response status

    • warning

      added the new shipping_rule_not_found enum value to the //// response property for the response status