Skip to main content
GET
/
v1
/
locations
curl "https://api.v2.dealmachine.com/v1/locations?q=Harris&type=county" \
  -H "Authorization: Bearer dm_sk_live_xxx"
{
  "data": [
    {
      "location_id": "loc_county_48201",
      "type": "county",
      "code": "48201",
      "name": "Harris County",
      "state": "TX",
      "state_name": "Texas",
      "property_count": 1842305
    },
    {
      "location_id": "loc_county_28047",
      "type": "county",
      "code": "28047",
      "name": "Harrison County",
      "state": "MS",
      "state_name": "Mississippi",
      "property_count": 87421
    },
    {
      "location_id": "loc_county_39067",
      "type": "county",
      "code": "39067",
      "name": "Harrison County",
      "state": "OH",
      "state_name": "Ohio",
      "property_count": 12034
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_results": 3,
    "total_pages": 1
  }
}
Search for US locations by name. Use this endpoint to find FIPS codes for counties, look up ZIP codes, or browse states — so you can pass the right code values to your property and people searches.
Not sure what FIPS code to use for a county? Search by name here, then pass the returned code directly into your search request’s locations array.

Query Parameters

q
string
required
Search query. Matches against location names. Minimum 2 characters.Examples: "Harris", "Travis County", "Los Angeles", "9021", "FL"
type
string
Filter results to a specific location type.Options: county, zip_code, stateWhen omitted, all matching location types are returned.
state
string
Filter results to a specific state. Two-letter state abbreviation (e.g., "TX", "CA").Useful when searching for common county names that exist in multiple states (e.g., “Washington County” exists in 30 states).
per_page
integer
default:"25"
Number of results to return per page. Maximum 100.
page
integer
default:"1"
Page number for paginated results.

curl "https://api.v2.dealmachine.com/v1/locations?q=Harris&type=county" \
  -H "Authorization: Bearer dm_sk_live_xxx"
{
  "data": [
    {
      "location_id": "loc_county_48201",
      "type": "county",
      "code": "48201",
      "name": "Harris County",
      "state": "TX",
      "state_name": "Texas",
      "property_count": 1842305
    },
    {
      "location_id": "loc_county_28047",
      "type": "county",
      "code": "28047",
      "name": "Harrison County",
      "state": "MS",
      "state_name": "Mississippi",
      "property_count": 87421
    },
    {
      "location_id": "loc_county_39067",
      "type": "county",
      "code": "39067",
      "name": "Harrison County",
      "state": "OH",
      "state_name": "Ohio",
      "property_count": 12034
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_results": 3,
    "total_pages": 1
  }
}

Response Fields

Location Object

The shape of each location object depends on its type:

All Types

FieldTypeDescription
location_idstringUnique DealMachine location identifier (e.g., "loc_county_48201", "loc_zip_90210", "loc_state_FL")
typestringLocation type: "state", "county", or "zip_code"
codestringThe code to use in search location objects (state abbreviation, FIPS code, or ZIP code)
namestringHuman-readable name (e.g., "Harris County", "Florida", "Beverly Hills")
property_countintegerApproximate number of properties in this location

County-specific

FieldTypeDescription
statestringTwo-letter state abbreviation
state_namestringFull state name

ZIP Code-specific

FieldTypeDescription
statestringTwo-letter state abbreviation
state_namestringFull state name
countystringCounty name this ZIP code falls within
fipsstringFIPS code of the parent county

Pagination

FieldTypeDescription
pageintegerCurrent page number
per_pageintegerResults per page
total_resultsintegerTotal matching locations
total_pagesintegerTotal number of pages

Using Results in Searches

The code returned for each location is the exact value you pass into a search request’s locations array:
// 1. Search for "Harris" to find the FIPS code
// GET /v1/locations?q=Harris&type=county
// → Returns { "location_id": "loc_county_48201", "code": "48201", "name": "Harris County", ... }

// 2. Use the code in a property search
{
  "locations": [
    { "type": "county", "code": "48201" }
  ],
  "filters": [...]
}

Credits

This endpoint does not consume credits. Location lookups are included with your API plan.

Notes

  • Search is case-insensitive and matches partial names. Searching "har" will match “Harris County”, “Harrison County”, “Hardeman County”, etc.
  • Results are ranked by relevance: exact matches appear first, followed by prefix matches, then partial matches.
  • The property_count is an approximate count and is updated periodically. Use Count Properties for precise counts with filters applied.
  • When the state query parameter is used with type=state, it filters to that specific state.
  • ZIP codes that span multiple counties return the primary county.