curl "https://api.v2.dealmachine.com/v1/locations/loc_county_48201" \
-H "Authorization: Bearer dm_sk_live_xxx"
const locationId = "loc_county_48201";
const response = await fetch(
`https://api.v2.dealmachine.com/v1/locations/${locationId}`,
{
headers: {
Authorization: `Bearer ${apiKey}`,
},
}
);
const { data } = await response.json();
console.log(`${data.name} (${data.state}) - FIPS: ${data.code}`);
// Harris County (TX) - FIPS: 48201
import requests
location_id = "loc_county_48201"
response = requests.get(
f"https://api.v2.dealmachine.com/v1/locations/{location_id}",
headers={"Authorization": f"Bearer {api_key}"},
)
body = response.json()
location = body["data"]
print(f"{location['name']} ({location['state']}) - FIPS: {location['code']}")
{
"data": {
"location_id": "loc_county_48201",
"type": "county",
"code": "48201",
"name": "Harris County",
"state": "TX",
"state_name": "Texas",
"property_count": 1842305
}
}
{
"data": {
"location_id": "loc_zip_code_90210",
"type": "zip_code",
"code": "90210",
"name": "Beverly Hills",
"state": "CA",
"state_name": "California",
"property_count": 15832
}
}
{
"data": {
"location_id": "loc_city_48106",
"type": "city",
"code": "48106",
"name": "St. Louis",
"state": "MO",
"state_name": "Missouri",
"property_count": 215360
}
}
{
"data": {
"location_id": "loc_state_TX",
"type": "state",
"code": "TX",
"name": "Texas",
"property_count": 12483201
}
}
{
"error": {
"code": "location_not_found",
"message": "No location found with ID loc_county_99999",
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
Locations
Get Location
GET
/
v1
/
locations
/
{location_id}
curl "https://api.v2.dealmachine.com/v1/locations/loc_county_48201" \
-H "Authorization: Bearer dm_sk_live_xxx"
const locationId = "loc_county_48201";
const response = await fetch(
`https://api.v2.dealmachine.com/v1/locations/${locationId}`,
{
headers: {
Authorization: `Bearer ${apiKey}`,
},
}
);
const { data } = await response.json();
console.log(`${data.name} (${data.state}) - FIPS: ${data.code}`);
// Harris County (TX) - FIPS: 48201
import requests
location_id = "loc_county_48201"
response = requests.get(
f"https://api.v2.dealmachine.com/v1/locations/{location_id}",
headers={"Authorization": f"Bearer {api_key}"},
)
body = response.json()
location = body["data"]
print(f"{location['name']} ({location['state']}) - FIPS: {location['code']}")
{
"data": {
"location_id": "loc_county_48201",
"type": "county",
"code": "48201",
"name": "Harris County",
"state": "TX",
"state_name": "Texas",
"property_count": 1842305
}
}
{
"data": {
"location_id": "loc_zip_code_90210",
"type": "zip_code",
"code": "90210",
"name": "Beverly Hills",
"state": "CA",
"state_name": "California",
"property_count": 15832
}
}
{
"data": {
"location_id": "loc_city_48106",
"type": "city",
"code": "48106",
"name": "St. Louis",
"state": "MO",
"state_name": "Missouri",
"property_count": 215360
}
}
{
"data": {
"location_id": "loc_state_TX",
"type": "state",
"code": "TX",
"name": "Texas",
"property_count": 12483201
}
}
{
"error": {
"code": "location_not_found",
"message": "No location found with ID loc_county_99999",
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
Retrieve a single location by its
location_id. Returns the full location object including type, code, name, and property count.
Path Parameters
string
required
The DealMachine location ID (e.g.,
"loc_county_48201", "loc_city_48106", "loc_zip_code_90210", "loc_state_FL").curl "https://api.v2.dealmachine.com/v1/locations/loc_county_48201" \
-H "Authorization: Bearer dm_sk_live_xxx"
const locationId = "loc_county_48201";
const response = await fetch(
`https://api.v2.dealmachine.com/v1/locations/${locationId}`,
{
headers: {
Authorization: `Bearer ${apiKey}`,
},
}
);
const { data } = await response.json();
console.log(`${data.name} (${data.state}) - FIPS: ${data.code}`);
// Harris County (TX) - FIPS: 48201
import requests
location_id = "loc_county_48201"
response = requests.get(
f"https://api.v2.dealmachine.com/v1/locations/{location_id}",
headers={"Authorization": f"Bearer {api_key}"},
)
body = response.json()
location = body["data"]
print(f"{location['name']} ({location['state']}) - FIPS: {location['code']}")
{
"data": {
"location_id": "loc_county_48201",
"type": "county",
"code": "48201",
"name": "Harris County",
"state": "TX",
"state_name": "Texas",
"property_count": 1842305
}
}
{
"data": {
"location_id": "loc_zip_code_90210",
"type": "zip_code",
"code": "90210",
"name": "Beverly Hills",
"state": "CA",
"state_name": "California",
"property_count": 15832
}
}
{
"data": {
"location_id": "loc_city_48106",
"type": "city",
"code": "48106",
"name": "St. Louis",
"state": "MO",
"state_name": "Missouri",
"property_count": 215360
}
}
{
"data": {
"location_id": "loc_state_TX",
"type": "state",
"code": "TX",
"name": "Texas",
"property_count": 12483201
}
}
{
"error": {
"code": "location_not_found",
"message": "No location found with ID loc_county_99999",
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
Response Fields
The response contains a singledata object. The shape depends on the location type. See List Locations for the full field reference.
Credits
This endpoint does not consume credits. Location lookups are included with your API plan.⌘I