curl --request GET \
--url https://api.baselayer.com/addresses/{address_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/addresses/{address_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/addresses/{address_id}', 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.baselayer.com/addresses/{address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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.baselayer.com/addresses/{address_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.baselayer.com/addresses/{address_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/addresses/{address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_number": "94941",
"street_name": "Harrison Drive",
"city": "Wilsonside",
"state": "AL",
"zipcode": "90210",
"latitude": 38.03012,
"longitude": 78.47665,
"street_predirection": "North",
"street_postdirection": "South",
"street_suffix": "St",
"secondary_number": "517",
"secondary_designator": "Apartment",
"pmb_designator": "<string>",
"pmb_number": "<string>",
"plus4_code": "<string>",
"rdi": "Residential",
"cmra": true,
"deliverable": true,
"associated_registered_agents": [],
"delivery_type": "FIRM"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Address
Get the details of a specific address.
curl --request GET \
--url https://api.baselayer.com/addresses/{address_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/addresses/{address_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/addresses/{address_id}', 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.baselayer.com/addresses/{address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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.baselayer.com/addresses/{address_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.baselayer.com/addresses/{address_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/addresses/{address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary_number": "94941",
"street_name": "Harrison Drive",
"city": "Wilsonside",
"state": "AL",
"zipcode": "90210",
"latitude": 38.03012,
"longitude": 78.47665,
"street_predirection": "North",
"street_postdirection": "South",
"street_suffix": "St",
"secondary_number": "517",
"secondary_designator": "Apartment",
"pmb_designator": "<string>",
"pmb_number": "<string>",
"plus4_code": "<string>",
"rdi": "Residential",
"cmra": true,
"deliverable": true,
"associated_registered_agents": [],
"delivery_type": "FIRM"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
The unique identifier of the address to fetch the details for.
"d064ba47-d345-47b5-937a-22893366b22a"
Response
Response
Response model for address data.
This model defines the complete structure for address-related API responses.
The ID of the address
The primary number of the address
"94941"
The street name
"Harrison Drive"
The city name
"Wilsonside"
"Fayettesville"
The state 2 letter abbreviation
AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, PR, VI, AE, AA, AP, GU, AS The 5 digit zipcode
"90210"
"31337"
The latitude of the address
38.03012
The longitude of the address
78.47665
The street predirection e.g. N 5th St
"North"
The street postdirection e.g. 5th St NW
"South"
The street suffix e.g. St, Ave, Blvd, etc.
"St"
The secondary number of the address e.g. Apt, Suite, etc.
"517"
The secondary designator of the address e.g. Apartment, Suite etc.
"Apartment"
The Private Mailbox Designator
The Private Mailbox Number
The 4 digit zipcode extension
Residential Delivery Indicator
Residential, Commercial Whether the address is a Commercial Mail Receiving Agency
Whether the address is deliverable
All registered agents that have ever been associated with this address
The delivery type of the address
FIRM, GENERAL_DELIVERY, HIGH_RISE, POST_OFFICE, RURAL_ROUTE, STREET