# Cloud CMA RETS Queries **GET /docs/rets-queries** Cloud CMA does NOT download and maintain the entire MLS database. Instead, it performs real-time RETS queries at the moment users request reports. This provides better security (no full MLS replication) and reduces server load. ## Three Query Types ### 1. MLS Number Search Simplest query type. Single or multiple MLS numbers at a time. - Example: Query MLS #12345 and #12346 - Straightforward RETS DMQL syntax - Very efficient ### 2. Address Search Query by street address. Cloud CMA breaks address into components (street number, street name, city, state, zip). - Example: 123 Main St, Huntington Beach, CA - Also straightforward DMQL - Address less accurate than MLS number due to MLS data entry typos ### 3. Latitude/Longitude Range Search Most complex query type. Creates rectangular proximity search area around subject property using lat/lon ranges. - Example: Search all listings within lat range 44.866-44.868 and lon range -92.590--92.588 - More useful for finding comparables but can stress RETS servers ## Common RETS Server Issues & Solutions ### Issue 1: Latitude/Longitude Not Indexed Problem: Lat/lon fields on some RETS servers are not indexed, causing slow or failed queries even though they're simple decimal values. Solution: Request MLS add an indexed field or create a view with indexed lat/lon support. ### Issue 2: Double Negative Syntax Breaks Parser Problem: U.S. longitude is negative. Range queries with negative numbers create this DMQL syntax: ``` (LONGITUDE=-92.590--92.588),(LATITUDE=44.866-44.868) ``` The double negative `--` can break some RETS parsers. Solution: Create new field `ABSLONGITUDE` containing absolute value of longitude: ``` (ABSLONGITUDE=92.588-92.590),(LATITUDE=44.866-44.868) ``` Then flag Cloud CMA to query the ABSLONGITUDE field instead. This is typically easy to implement and solves the parser issue. ## Efficiency Notes - Cloud CMA queries only small subsets of MLS daily (10-30 listings per CMA/Buyer Tour, 1 per Property Report) - Real-time queries are more secure than replication - Proper indexing on RETS servers is critical for performance ## Servers - Production API: https://cloudcma.com (Production API) ## Authentication methods - Api key ## Parameters ## Responses ### 200 RETS Queries documentation [Powered by Bump.sh](https://bump.sh)