How to search for properties within a radius of a lat/long point

The short answer

To find properties within a radius of a point, query Datafiniti Property Data at POST /v4/properties/search with geoLocation:[longitude,latitude,distance,unit], for example geoLocation:[-97.7430600,30.2671500,3,mi]. Longitude comes first. Add filters such as mostRecentStatus or propertyType, download the matches, and compute each record's distance from latitude and longitude to sort results nearest-first or group them into rings.

Datafiniti Team Last updated 9 min read

Key facts

  • Search endpoint: POST https://api.datafiniti.co/v4/properties/search with a bearer token.
  • Radius syntax: geoLocation:[Longitude,Latitude,Distance,Distance Unit]. Datafiniti's radius guide says a swapped latitude/longitude is the most common reason a radius search returns no results.
  • Documented units include m, mi, ft, km, mm, cm, and NM (nautical miles).
  • geoLocation is a geo_shape field stored as Well-Known Text, POINT (longitude latitude). latitude and longitude are text fields.
  • A search without a download returns at most 10 records. Credits are charged per record returned, and a query that finds 0 records costs nothing.
  • Larger pulls use "download": true, then GET /v4/downloads/{id} until the status is "completed". Result links expire after 7 days.

Datafiniti is a data-as-a-service provider that offers Property, People, Business, and Product data through a REST API, bulk downloads, and an MCP server. This guide covers one job: getting every property within a set distance of a coordinate, filtered to what your feature needs, with distances you can sort and group.

Who needs a radius property search?

  • Listing and map products that show "homes for sale near this point" or draw results around a pin.
  • Investors and acquisition teams screening everything within a few miles of a target asset, a new employer, or a transit stop.
  • Lenders, insurers, and risk teams checking what sits within a set distance of a property or a hazard.
  • Site-selection and retail teams sizing the housing around a planned location.
  • AI agents that answer "what's for sale within two miles of here?" and need a source they can cite.

Why is a radius property search hard to build yourself?

The query is one line. The data under it is not.

  • Every record needs coordinates. Listings, tax rolls, and deed records mostly carry street addresses. You geocode each one, handle failures, and re-geocode when addresses change.
  • You need a spatial index. Radius queries over millions of records need a geospatial database and someone to run it.
  • Coordinates alone don't answer the question. "Single-family homes for sale near X" also needs property type, current status, and price on the same record, kept fresh.
  • Sources disagree on location. The same home can appear in several listings with slightly different addresses and coordinates. Without deduplication, one house shows up three times on your map.
  • Coverage crosses jurisdictions. A 5-mile circle can touch several cities, counties, and listing sources, each with its own format.

What fields do you use for a radius search?

FieldTypeWhat it tells you
geoLocationgeo_shapeLatitude and longitude in a format that allows geospatial querying; stored as POINT (longitude latitude). The field the radius query runs against.
latitude, longitudetextThe property's coordinates as strings. Convert to numbers to compute distance.
geoQualityintegerThe quality of the geoLocation data. The docs don't publish the scale.
address, city, province, postalCode, countrytext, keywordTop-level location fields for display and extra filters.
propertyTypetextClassification such as "Single Family Dwelling", "Condo", or "Townhouse".
mostRecentStatuskeywordLatest sale-side status, such as "For Sale", "Pending", or "Sold".
mostRecentStatusDatedateDate of the change behind mostRecentStatus.
statusHistorynestedHistorical statuses for the property. Use it instead of the deprecated statuses.
mostRecentPriceAmountbigdecimalMost recent price from the prices field. Excludes rent prices.
numBedroom, numBathroom, floorSizeValueinteger, float, floatSize filters and display fields.
dateUpdateddateWhen the record was last updated. Use it to keep results fresh.

A trimmed record looks like this (fictional example data):

property record · JSON (fictional)
{
"address": "118 Quarry Fern Ln",
"city": "Austin",
"province": "TX",
"postalCode": "78701",
"country": "US",
"latitude": "30.2702",
"longitude": "-97.7489",
"geoLocation": "POINT (-97.7489 30.2702)",
"propertyType": "Condo",
"numBedroom": 2,
"numBathroom": 2,
"floorSizeValue": 1140,
"floorSizeUnit": "sq ft",
"mostRecentStatus": "For Sale",
"mostRecentStatusDate": "2026-11-12T00:00:00Z",
"mostRecentPriceAmount": 525000,
"dateUpdated": "2026-11-20T09:41:07Z"
}

How do I search properties within a radius, step by step?

Step 1: Get the center point, longitude first

You need a longitude and latitude for the center. Use your own geocoder, a point the user drops on a map, or the latitude and longitude of a Datafiniti property record you already have. Those two fields are text, so convert them with float() before you use them.

Write the query with longitude first: geoLocation:[-97.7430600,30.2671500,3,mi] is a 3-mile radius around a point in Austin, Texas. In the US, longitudes are negative, so a query that starts with a positive number around 25 to 50 is usually backwards.

Step 2: Size the radius before you pay for records

Add the filters your feature needs and check the count. The MCP tool df_count is free. Over REST, send "num_records": 1 and read num_found; that costs at most 1 credit. Compute the date window from today.

size_radius.py · Python 3
import os
from datetime import date, timedelta
import requests
API = "https://api.datafiniti.co/v4"
HEADERS = {
"Authorization": f"Bearer {os.environ['DATAFINITI_API_TOKEN']}",
"Content-Type": "application/json",
}
# Center point: longitude FIRST, then latitude.
LON, LAT = -97.7430600, 30.2671500
RADIUS, UNIT = 3, "mi"
SINCE = (date.today() - timedelta(days=30)).isoformat()
QUERY = (
f"geoLocation:[{LON},{LAT},{RADIUS},{UNIT}] "
"AND propertyType:(\"Single Family Dwelling\" OR Townhouse OR Condo) "
"AND mostRecentStatus:\"For Sale\" "
f"AND dateUpdated:[{SINCE} TO *]"
)
r = requests.post(f"{API}/properties/search", headers=HEADERS, timeout=60,
json={"query": QUERY, "num_records": 1})
r.raise_for_status()
print("properties in radius:", r.json()["num_found"])

Wrap OR groups in parentheses, as in propertyType:("Single Family Dwelling" OR Townhouse OR Condo). If num_found is far larger than you need, shrink the radius or add filters before downloading.

Step 3: Look at one record

Read one record before you write processing code. Check that latitude and longitude are populated and see which status and price fields your market fills.

cURL
curl --request POST \
--url https://api.datafiniti.co/v4/properties/search \
--header "Authorization: Bearer $DATAFINITI_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"query": "geoLocation:[-97.7430600,30.2671500,3,mi] AND mostRecentStatus:\"For Sale\" AND dateUpdated:[2026-10-29 TO *]",
"num_records": 1
}'

Replace the date with one 30 days before today. Note the escaped quotes (\"For Sale\") inside the JSON string.

Step 4: Download the matches and compute distance

Searches without a download return at most 10 records, so pull the full set as a download. Set num_records to cap spend; you're charged for records found, up to that number. The script computes each property's great-circle distance from the center, sorts nearest-first, assigns a distance ring, and prints a median list price per ring.

radius_pull.py · Python 3
import csv
import json
import math
import os
import statistics
import time
from datetime import date, timedelta
import requests
API = "https://api.datafiniti.co/v4"
HEADERS = {
"Authorization": f"Bearer {os.environ['DATAFINITI_API_TOKEN']}",
"Content-Type": "application/json",
}
LON, LAT = -97.7430600, 30.2671500 # longitude first
RADIUS_MI = 3
SINCE = (date.today() - timedelta(days=30)).isoformat()
QUERY = (
f"geoLocation:[{LON},{LAT},{RADIUS_MI},mi] "
"AND propertyType:(\"Single Family Dwelling\" OR Townhouse OR Condo) "
"AND mostRecentStatus:\"For Sale\" "
f"AND dateUpdated:[{SINCE} TO *]"
)
MAX_RECORDS = 1000 # caps spend: credits are charged per record
RINGS = [(0, 1, "0-1 mi"), (1, 2, "1-2 mi"), (2, RADIUS_MI, f"2-{RADIUS_MI} mi")]
def start_download(query, limit):
body = {"query": query, "num_records": limit, "format": "json", "download": True}
r = requests.post(f"{API}/properties/search", headers=HEADERS, json=body, timeout=60)
r.raise_for_status()
data = r.json()
return data.get("download_id") or data.get("id")
def wait_for(download_id):
while True:
r = requests.get(f"{API}/downloads/{download_id}", headers=HEADERS, timeout=60)
r.raise_for_status()
job = r.json()
if job["status"] == "completed":
return job
if job["status"] == "cancelled":
raise RuntimeError("download was cancelled")
time.sleep(10)
def fetch_records(job):
for item in job.get("results") or []:
url = item["url"] if isinstance(item, dict) else item
text = requests.get(url, timeout=300).text.strip()
if text.startswith("["):
yield from json.loads(text)
else:
for line in text.splitlines():
if line.strip():
yield json.loads(line)
def miles_between(lat1, lon1, lat2, lon2):
"""Great-circle (haversine) distance in miles."""
p1, p2 = math.radians(lat1), math.radians(lat2)
dp, dl = p2 - p1, math.radians(lon2 - lon1)
a = math.sin(dp / 2) ** 2 + math.cos(p1) * math.cos(p2) * math.sin(dl / 2) ** 2
return 3958.8 * 2 * math.asin(math.sqrt(a))
def ring_for(miles):
for low, high, label in RINGS:
if low <= miles <= high:
return label
return "outside"
rows = []
job = wait_for(start_download(QUERY, MAX_RECORDS))
for rec in fetch_records(job):
try: # latitude and longitude are text fields in the schema
lat, lon = float(rec["latitude"]), float(rec["longitude"])
except (KeyError, TypeError, ValueError):
continue
miles = miles_between(LAT, LON, lat, lon)
rows.append({
"address": rec.get("address"),
"city": rec.get("city"),
"postalCode": rec.get("postalCode"),
"propertyType": rec.get("propertyType"),
"mostRecentPriceAmount": rec.get("mostRecentPriceAmount"),
"numBedroom": rec.get("numBedroom"),
"miles": round(miles, 2),
"ring": ring_for(miles),
})
rows.sort(key=lambda row: row["miles"]) # nearest first
with open("radius_results.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=list(rows[0]) if rows else ["address"])
writer.writeheader()
writer.writerows(rows)
for _, _, label in RINGS:
ring = [r for r in rows if r["ring"] == label]
prices = sorted(r["mostRecentPriceAmount"] for r in ring if r["mostRecentPriceAmount"])
median = statistics.median(prices) if prices else None
print(f"{label}: {len(ring)} listings, median list price {median}")

The docs don't say radius results come back ordered by distance, so the script sorts them itself. Records without usable coordinates are skipped.

Step 5: Put the results to work

Can an AI agent run a radius search?

Yes. Connect an MCP client to https://api.datafiniti.co/v4/mcp (Streamable HTTP) with your API token as a bearer header:

MCP client config
{
"mcpServers": {
"datafiniti": {
"type": "http",
"url": "https://api.datafiniti.co/v4/mcp",
"headers": { "Authorization": "Bearer ${DATAFINITI_API_TOKEN}" }
}
}
}

The radius goes inside the query string, the same as in REST. Use "data_type": "property" with df_count (free) to size the query and df_search (up to 50 records per call, charged like REST search) to read results. df_get_schema (free) lists field names. For larger sets, use df_start_download and df_download_status.

Example prompt:

Using Datafiniti property data, count single-family homes, townhouses, and condos with a most recent status of "For Sale" updated since October 29, 2026, within 2 miles of longitude -97.74306, latitude 30.26715. Use geoLocation with longitude first. If there are fewer than 50, pull them, compute each one's distance from the center, and list them nearest-first with address, price, and distance.

What are the common gotchas?

  • Longitude first. geoLocation:[lon,lat,distance,unit]. A swapped pair points at a different place and usually returns nothing.
  • Avoid the yard unit. Two docs pages label yards as in; the newer radius guide says yd. Until that's settled, use mi, km, m, or ft.
  • Coordinates are strings. latitude and longitude are text fields. Convert before doing math, and skip records where conversion fails.
  • Combining a radius with a ZIP code clips the circle. geoLocation:[...] AND postalCode:"78701" returns only the part of the circle inside that ZIP. Use one or the other unless you want the overlap.
  • Results aren't sorted by distance. Compute distance from latitude and longitude and sort in your code. The MCP df_search tool sorts by dateUpdated descending by default.
  • Check geoQuality on a sample. The schema has a geoQuality integer, but the docs don't define its scale. Look at the values in your market before filtering on it.
  • Status is sale-side. mostRecentStatus covers sale statuses such as "For Sale", "Pending", and "Sold". Rentals are tracked separately in mostRecentRentalStatus.
  • Use statusHistory, not statuses. statuses is deprecated.
  • Parenthesize OR groups. Write propertyType:("Single Family Dwelling" OR Condo). Without parentheses, ANDs and ORs combine in ways you didn't intend.
  • Big circles get expensive. A large radius in a dense city can match many thousands of records. Count first, and cap downloads with num_records.

Should you build, license, or buy property location data?

CriterionGeocode and index it yourselfLicense a primary source (MLS/BBO feeds, parcel data vendors)Datafiniti Property Data
Suited toA fixed list you already ownMarkets where you hold a feed agreementRadius searches across many markets from one API
CoordinatesYou geocode and maintain themDepends on the feedgeoLocation, latitude, longitude on each record
Attributes with locationYou join status, type, and price yourselfDepends on the feedStatus, type, price, and size on the same record
Ongoing workGeocoding, spatial database, refreshContracts and per-feed integrationQuery upkeep and your own distance logic
Choose it whenYou only need to map your own addressesYou need contractual rights, MLS-only fields, or IDX displayYou want filtered property records around any point without running collection

Datafiniti isn't the right fit for every location job. If you only need to geocode your own address list, a geocoding service is simpler. If you must display live MLS listings under IDX rules, you need a licensed MLS feed. And the documented geospatial operator is a radius; if your feature needs drive-time areas or custom polygons, plan to pull a covering radius and trim it in your own code.

Frequently asked questions

What API can I use to find properties within a radius of a point?

Datafiniti Property Data. Send POST /v4/properties/search with a query such as geoLocation:[-97.7430600,30.2671500,3,mi], add any filters, and read latitude, longitude, and property fields from each record.

Does Datafiniti's geoLocation take latitude or longitude first?

Longitude first. The format is geoLocation:[Longitude,Latitude,Distance,Distance Unit], and Datafiniti's docs say swapped coordinates are the most common reason a radius search returns no results.

What distance units can I use in a radius search?

The docs list m, mi, ft, km, mm, cm, and NM (nautical miles). They label yards inconsistently (in on two pages, yd on the newer radius guide), so prefer miles or kilometers.

Can I combine a radius search with status or property type filters?

Yes. Join filters with AND, for example geoLocation:[-97.7430600,30.2671500,3,mi] AND mostRecentStatus:"For Sale" AND propertyType:("Single Family Dwelling" OR Condo). Wrap OR groups in parentheses.

How do I sort radius results by distance?

Compute distance yourself. Convert each record's latitude and longitude to numbers, calculate the great-circle (haversine) distance from your center point, and sort on it.

How much does a radius search cost?

Property searches charge credits per record returned, and nothing when 0 records are found. Check the size first with the free MCP tool df_count, then cap downloads with num_records.

Search your first radius

Run a radius search around any point with a free trial, or talk to us about volume and delivery.

Sources

Search latitude and longitude for properties Search for properties around a lat/long (older page) Geolocation (property) Constructing property queries Property data schema Possible values for property fields Property Data API reference Search and downloads Get a download How credits work (API) MCP server