No Public API Available
Realtor.com does not provide a public API for accessing their real estate listings data. The platform, operated by Move, Inc. (a News Corp subsidiary), keeps its data proprietary and requires formal partnerships or licensing agreements for data access.
Why No Public API?
Real estate data is heavily regulated and controlled by:
- Multiple Listing Services (MLSs): Govern the distribution of property listings
- Data licensing agreements: Control how and where data can be used
- Legal compliance: Protect against unauthorized data usage
- Business model: Maintain competitive advantage through exclusive data access
Legal Alternatives to Realtor.com Data
1. Official Partnership with Realtor.com
- Requirements: Business agreement and partnership application
- Access level: Varies based on partnership tier
- Cost: Typically involves licensing fees
- Timeline: Can take weeks to months for approval
2. Alternative Real Estate APIs
Here are legitimate APIs with MLS partnerships:
SimplyRETS API
import requests
# Example SimplyRETS API call
api_key = "your_api_key"
headers = {"Authorization": f"Basic {api_key}"}
response = requests.get(
"https://api.simplyrets.com/properties",
headers=headers,
params={"limit": 10, "cities": "Houston"}
)
properties = response.json()
ATTOM Data Solutions - Property details, valuations, and market analytics - Historical sales data and property characteristics - Comprehensive coverage across the US
Rentals.com API - Rental property listings - Market rent data - Property management tools
3. Government and Public Records
Access property data through official sources:
County Assessor Records
# Example for accessing public records
import requests
# Many counties provide open data portals
county_api = "https://data.county.gov/api/property-records"
response = requests.get(county_api, params={"address": "123 Main St"})
MLS Grid (For Licensed Professionals) - Standardized MLS data access - Requires real estate license - Covers multiple MLS regions
Technical Implementation Considerations
Rate Limiting and Compliance
When using any real estate API:
import time
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
class RealEstateAPIClient:
def __init__(self, base_url, api_key, rate_limit=1):
self.base_url = base_url
self.api_key = api_key
self.rate_limit = rate_limit # requests per second
# Configure retry strategy
retry_strategy = Retry(
total=3,
backoff_factor=1,
status_forcelist=[429, 500, 502, 503, 504]
)
self.session = requests.Session()
adapter = HTTPAdapter(max_retries=retry_strategy)
self.session.mount("http://", adapter)
self.session.mount("https://", adapter)
def get_properties(self, params):
headers = {"Authorization": f"Bearer {self.api_key}"}
try:
response = self.session.get(
f"{self.base_url}/properties",
headers=headers,
params=params,
timeout=30
)
response.raise_for_status()
# Respect rate limits
time.sleep(1 / self.rate_limit)
return response.json()
except requests.exceptions.RequestException as e:
print(f"API request failed: {e}")
return None
Data Standardization
Different APIs return data in various formats. Create a standardization layer:
class PropertyDataStandardizer:
@staticmethod
def standardize_property(property_data, source_api):
if source_api == "simplyrets":
return {
"address": property_data.get("address", {}).get("full"),
"price": property_data.get("listPrice"),
"bedrooms": property_data.get("property", {}).get("bedrooms"),
"bathrooms": property_data.get("property", {}).get("bathsFull"),
"square_feet": property_data.get("property", {}).get("area"),
"listing_date": property_data.get("listDate")
}
elif source_api == "attom":
return {
"address": property_data.get("address", {}).get("oneLine"),
"price": property_data.get("sale", {}).get("amount"),
"bedrooms": property_data.get("building", {}).get("rooms", {}).get("beds"),
"bathrooms": property_data.get("building", {}).get("rooms", {}).get("bathstotal"),
"square_feet": property_data.get("building", {}).get("size", {}).get("livingsize"),
"listing_date": property_data.get("sale", {}).get("transactionDate")
}
Legal and Ethical Considerations
Terms of Service Compliance
- Always read and comply with API terms of service
- Respect rate limits and usage quotas
- Attribute data sources when required
- Avoid republishing proprietary data without permission
Data Privacy
- Handle personal information according to privacy laws (GDPR, CCPA)
- Secure API keys and authentication credentials
- Implement data retention policies for scraped data
Professional Use
For commercial real estate applications:
- Obtain proper licensing (real estate license may be required)
- Implement data accuracy disclaimers
- Maintain compliance with fair housing laws
- Consider professional liability insurance
Best Practices for Real Estate Data Integration
# Example: Robust real estate data fetcher
import asyncio
import aiohttp
class RealEstateDataAggregator:
def __init__(self):
self.apis = {
"simplyrets": {"url": "https://api.simplyrets.com", "key": "your_key"},
"attom": {"url": "https://api.gateway.attomdata.com", "key": "your_key"}
}
async def fetch_from_multiple_sources(self, search_params):
async with aiohttp.ClientSession() as session:
tasks = []
for api_name, config in self.apis.items():
task = self.fetch_from_api(session, api_name, config, search_params)
tasks.append(task)
results = await asyncio.gather(*tasks, return_exceptions=True)
# Combine and deduplicate results
return self.combine_results(results)
async def fetch_from_api(self, session, api_name, config, params):
# Implementation specific to each API
pass
def combine_results(self, results):
# Merge data from multiple sources, handle duplicates
pass
Conclusion
While Realtor.com doesn't offer a public API, numerous legal alternatives exist for accessing real estate data. Choose the approach that best fits your use case, budget, and compliance requirements. Always prioritize legal compliance and ethical data usage over convenience.
For most developers, using established APIs like SimplyRETS or ATTOM Data provides better reliability, legal protection, and data quality than attempting to scrape Realtor.com directly.