Skip to main content
GET
/
v2
/
addresses
/
parse
curl
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>'
import requests

url = "https://api.goshippo.com/v2/addresses/parse"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.goshippo.com/v2/addresses/parse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goshippo.com/v2/addresses/parse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.goshippo.com/v2/addresses/parse"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.goshippo.com/v2/addresses/parse")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.goshippo.com/v2/addresses/parse")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "email": "user@shippo.com",
  "phone": "+1-4155550132",
  "address_line_1": "731 Market Street",
  "address_line_2": "#200",
  "city_locality": "San Francisco",
  "state_province": "CA",
  "postal_code": "94103",
  "country_code": "US"
}
{
"detail": [
{
"type": "missing",
"loc": [
"query",
"address"
],
"msg": "Field required",
"input": null,
"url": "https://errors.pydantic.dev/2.3/v/missing"
}
]
}
{
"trace_id": "b562cab2e9200ac3e11474cc877580e1",
"message": "Internal Server Error"
}

Authorizations

Authorization
string
header
default:ShippoToken
required

Enter your shippo token with the ShippoToken prefix.

Example: ShippoToken shippo_live_xxxx

Query Parameters

address
string
required
Example:

"Shippo 731 Market St #200, San Francisco, CA 94103 US shippo@shippo.com +1-555-999-8888"

Response

Successful Response

The parsed response of an address.

email
string<email> | null
Example:

"user@shippo.com"

phone
string | null
Example:

"+1-4155550132"

address_line_1
string | null
Example:

"731 Market Street"

address_line_2
string | null
Example:

"#200"

city_locality
string | null
Example:

"San Francisco"

state_province
string | null
Example:

"CA"

postal_code
string | null
Example:

"94103"

country_code
string | null
Example:

"US"