You need to rank neighborhoods fast—autocomplete addresses, pull active listings inside a bounding box, and fetch a property’s full details—so you can compute location quality scores for your app. By the end of this guide you’ll be able to call three real endpoints on Zyla API Hub to source the raw data you’ll score: keyword-based location suggestions, residential inventory within a geo-bounds, and deep property details.
What this API gives you for scoring locations
The Canada Real Estate API aggregates residential listings data you can use to derive your own “location quality” metrics. With it you can:
- Resolve user intent quickly using keyword-based location suggestions.
- Fetch listings within a latitude/longitude bounding box to compute density, variety, and price distribution.
- Pull full property details (descriptions, IDs, etc.) to enrich your scoring logic or build drill-down views.
These building blocks are commonly used in buyer guides, neighborhood discovery tools, lead routing, and investment analysis dashboards. If you need a dependable feed you can ship this week, this is a straightforward option on Zyla API Hub.
Getting started on Zyla API Hub
Open the API’s marketplace page and start a trial to get an API key. Authentication is a simple header on every request: Authorization: Bearer YOUR_API_KEY. Zyla uses a subscription and quota model—no pay-per-call. For first-time use, expect a 7-day trial or 50 requests to test in your environment. Check the API page for current access options and pricing.
Begin here: Start 7-day trial on Canada Real Estate API
Endpoints you’ll use to build a location quality score
1) Auto Complete (GET)
Use this to turn user input into precise, actionable suggestions—streets, cities, and references you can map to searches.
- URL: https://zylalabs.com/api/5902/canada-real-estate-api/7768/auto-complete
- Purpose: Return keyword-based location suggestions.
- Required params:
- Query (string): Example: Quebec
- Optional params:
- CultureId (string): Example: 1
- IncludeLocations (string): Example: true
Copy-paste cURL:
curl -s -X GET "https://zylalabs.com/api/5902/canada-real-estate-api/7768/auto-complete?Query=Quebec&CultureId=1&IncludeLocations=true" \
-H "Authorization: Bearer YOUR_API_KEY"
Official example response:
{"ErrorCode":{"Id":200,"Description":"Success - OK","ProductName":"Realtor API 7 | 20241202.1 | 1018e702fe06dda8279318e12b199910ca21c3ff | Monday, December 2, 2024 12:21:41 PM","Version":"1.0.9102.31292"},"Results":[{"Type":1,"ListingId":"27656697","ReferenceNumber":"X10440405","Address_EN":"191 QUEBEC STREET","Address_FR":"191 QUEBEC STREET","City":"Bracebridge (Macaulay)","PostalCode":"p1l1e3","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27656697\/191-quebec-street-bracebridge-macaulay-macaulay","RelativeURLFr":"\/immobilier\/27656697\/191-quebec-street-bracebridge-macaulay","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27661192","ReferenceNumber":"X10428998","Address_EN":"549 QUEBEC STREET","Address_FR":"549 QUEBEC STREET","City":"London","PostalCode":"n5w3y9","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27661192\/549-quebec-street-london-east-g","RelativeURLFr":"\/immobilier\/27661192\/549-quebec-street-london","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27720876","ReferenceNumber":"R2949266","Address_EN":"212 4928 QUEBEC STREET","Address_FR":"212 4928 QUEBEC STREET","City":"Vancouver","PostalCode":"v5w2n2","Province":"BC","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27720876\/212-4928-quebec-street-vancouver","RelativeURLFr":"\/immobilier\/27720876\/212-4928-quebec-street-vancouver","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27741486","ReferenceNumber":"X11894528","Address_EN":"558 QUEBEC STREET","Address_FR":"558 QUEBEC STREET","City":"Hamilton (Parkview)","PostalCode":"l8h6v4","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27741486\/558-quebec-street-hamilton-parkview-parkview","RelativeURLFr":"\/immobilier\/27741486\/558-quebec-street-hamilton-parkview","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27754883","ReferenceNumber":"S11901084","Address_EN":"267 QUEBEC STREET","Address_FR":"267 QUEBEC STREET","City":"Clearview (Stayner)","PostalCode":"l0m1s0","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27754883\/267-quebec-street-clearview-stayner-stayner","RelativeURLFr":"\/immobilier\/27754883\/267-quebec-street-clearview-stayner","isReferenceMatch":false,"isPostalCodeMatch":false}],"ResultsMapBox":[{…
What to read from it:
- ErrorCode: Use Id and Description to short-circuit on non-200 flows.
- Results: Each suggestion gives you ListingId, ReferenceNumber, Address_EN/FR, City, PostalCode, Province, and relative URLs. These can be shown directly in your UI and used to seed a follow-up search for listings within that area.
2) List Residential (GET)
Pull a page of residential properties inside a lat/long bounding box. Perfect for density metrics, price aggregation, and mapping clusters.
- URL: https://zylalabs.com/api/5902/canada-real-estate-api/7769/list-residential
- Purpose: Return available residential properties for sale or rent based on geo bounds.
- Required params:
- LatitudeMax (number): 81.14747595814636
- LatitudeMin (number): -22.26872153207164
- LongitudeMax (number): -10.267941690981388
- LongitudeMin (number): -136.83037765324116
Example cURL (copy as-is and change the header key):
Notes that save time:
- Responses include a Paging object with RecordsPerPage, CurrentPage, and TotalRecords. Use that to paginate and to compute a listings-per-area density metric.
- ErrorCode.Status may include cache hints like “Pins-Via-Cache:false;Sidebar-Items-Via-Cache:0;”. Don’t rely on these for logic, but they can explain response timing in logs.
- RecordsShowing and Pins can help you debug how many map pins or items the server intends to show per page.
3) Property Detail (GET)
Fetch a single property’s comprehensive info using a combination of ReferenceNumber and PropertyID. Use this to enrich your scoring UI with full descriptions and to confirm details for selected candidates.
- URL: https://zylalabs.com/api/5902/canada-real-estate-api/7770/property-detail
- Purpose: Get detailed listing information such as images, description, and property characteristics.
- Required params:
- ReferenceNumber (string): 67b74ee58bc56b22659786b3
- PropertyID (string): 27935110
Example cURL:
Practical guidance:
- Check the ErrorCode block before reading fields.
- Use public remarks and core identifiers to anchor a property profile page in your app.
Python example: resolve a query and compute a simple listing-density score
This example calls Auto Complete to confirm a target area from a user’s input, then calls List Residential for a broad bounding box. You’ll adapt the bounding box to user-selected suggestions (for example, narrowing to a specific city or neighborhood geometry you derive from your own data).
import requests
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1) Resolve user intent with Auto Complete
auto_complete_url = "https://zylalabs.com/api/5902/canada-real-estate-api/7768/auto-complete"
params = {
"Query": "Quebec",
"CultureId": "1",
"IncludeLocations": "true"
}
ac_resp = requests.get(auto_complete_url, headers=HEADERS, params=params, timeout=30)
ac_data = ac_resp.json()
if ac_data.get("ErrorCode", {}).get("Id") != 200:
raise SystemExit(f"Auto Complete failed: {ac_data.get('ErrorCode')}")
suggestions = ac_data.get("Results", [])
# In a real app, select one suggestion based on user action.
first = suggestions[0] if suggestions else None
if first:
print("Top suggestion:", first.get("Address_EN"), first.get("City"), first.get("Province"))
# 2) Fetch listings within a bounding box (demo values from docs)
list_url = "https://zylalabs.com/api/5902/canada-real-estate-api/7769/list-residential"
list_params = {
"LatitudeMax": 81.14747595814636,
"LatitudeMin": -22.26872153207164,
"LongitudeMax": -10.267941690981388,
"LongitudeMin": -136.83037765324116
}
list_resp = requests.get(list_url, headers=HEADERS, params=list_params, timeout=30)
list_data = list_resp.json()
if list_data.get("ErrorCode", {}).get("Id") != 200:
raise SystemExit(f"List Residential failed: {list_data.get('ErrorCode')}")
paging = list_data.get("Paging", {})
total_records = paging.get("TotalRecords")
records_per_page = paging.get("RecordsPerPage")
current_page = paging.get("CurrentPage")
print("Listings page:", current_page, "page size:", records_per_page, "total:", total_records)
# 3) A minimal "location quality" proxy: density score (records per N sq-km) based on your bounds.
# You must compute area for your chosen bounds; here we just show the idea without geodesic math.
results = list_data.get("Results", [])
count = len(results) if isinstance(results, list) else 0
print("Density proxy (count in bbox):", count)
Tips:
- Keep your request timeouts sane (20–30s) for network variance.
- Use the ErrorCode object to branch on success vs. retry or fallback flows.
- Persist the Paging totals for analytics and to avoid re-counting on each user page turn.
How to turn these responses into a “location quality” score
Because scoring criteria vary by product, the API returns raw listing and suggestion data. You can compute a composite score like this:
- Inventory density: number of listings per area unit in your bounding box (from List Residential + your own area calc).
- Diversity: count by property attributes present in Results (e.g., StoriesTotal if available in Building objects) to estimate variety.
- Recency/availability proxies: use paging totals to know if an area is “active.”
- Text signals: mine PublicRemarks (when available) from Property Detail to surface keywords (renovated, near transit) to your model.
Start with density and diversity. They give an actionable baseline and are fast to compute.
AI agents: call the API via MCP
If you prefer to orchestrate calls from an AI agent or IDE assistant, you can use Zyla’s MCP endpoint. Any MCP-compatible client (e.g., Claude Code, Cursor, Windsurf) can access Zyla APIs with your same key via the MCP gateway. See: MCP.
Workflow outline:
- Provide the MCP endpoint and your API key to your MCP client: https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
- Instruct your agent to call the Auto Complete endpoint first for user input, then List Residential for the selected area.
- Optionally fetch Property Detail to enrich summaries before responding in chat.
Operational details that help in production
- Auth: Send Authorization: Bearer YOUR_API_KEY on every request.
- Pagination: Read the Paging object on List Residential to paginate and cache counts.
- Caching: The ErrorCode.Status string may include hints (e.g., Pins-Via-Cache). Treat it as informational.
- Localization: Auto Complete supports CultureId and Address_EN/FR. Respect the user’s language in your UI.
- Quotas: Zyla uses subscription + quota. First API typically offers a 7-day trial or 50 requests to evaluate. For current limits, see the marketplace page.
End-to-end flow to ship this week
- Acquire a key on the marketplace page and store it in your secret manager.
- Implement Auto Complete in your search box to resolve the user’s intended area fast.
- Translate the chosen suggestion into a bounding box. If your app stores polygons, map suggestions to your geometry. Otherwise, start with a city-wide box you maintain.
- Call List Residential and compute:
- Listing count (density proxy).
- Attribute diversity distribution from the Results array.
- On selection, call Property Detail for an in-depth view and to extract text features for your score.
- Expose the composite “location quality” score with a link to see underlying data (number of listings, sample properties).
Troubleshooting checklist
- 401/403: Verify Authorization: Bearer YOUR_API_KEY and subscription status.
- Empty suggestions: Try a broader Query string in Auto Complete or confirm IncludeLocations is set to true when needed.
- Unexpected paging: Log the entire Paging object to confirm RecordsPerPage and TotalPages.
- Slow queries: Pre-cache frequent bounding boxes and reuse computed scores.
FAQ
How do I authenticate?
Send the header Authorization: Bearer YOUR_API_KEY with every request.
Can I filter by price, beds, or other attributes?
The List Residential endpoint is described for geo-bounds in this guide. If you require additional filters, check the API page for available parameters and examples.
How do I paginate results?
Use the Paging object in the List Residential response. Fields like RecordsPerPage, CurrentPage, and TotalPages indicate how many pages to request. Handle this in your API layer and stream to the UI.
What should I use to compute a location quality score?
Start with listing density within your bounding box, then add diversity by property attributes and text-keyword signals from Property Detail. Keep the model transparent so users can see why an area scored high or low.
Is there a free plan?
Zyla uses subscription + quota. For first-time evaluations, expect a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Ship your location scoring feature
Get your key, wire the three endpoints above, and start computing an opinionated location score that fits your product. Begin here: Start 7-day trial on Canada Real Estate API. You can always expand later with additional Zyla APIs—there are more than 10,000 public APIs available on Zyla API Hub.
Official API response
{"ErrorCode":{"Id":200,"Description":"Success - OK","ProductName":"Realtor API 7 | 20241202.1 | 1018e702fe06dda8279318e12b199910ca21c3ff | Monday, December 2, 2024 12:21:41 PM","Version":"1.0.9102.31292"},"Results":[{"Type":1,"ListingId":"27656697","ReferenceNumber":"X10440405","Address_EN":"191 QUEBEC STREET","Address_FR":"191 QUEBEC STREET","City":"Bracebridge (Macaulay)","PostalCode":"p1l1e3","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27656697\/191-quebec-street-bracebridge-macaulay-macaulay","RelativeURLFr":"\/immobilier\/27656697\/191-quebec-street-bracebridge-macaulay","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27661192","ReferenceNumber":"X10428998","Address_EN":"549 QUEBEC STREET","Address_FR":"549 QUEBEC STREET","City":"London","PostalCode":"n5w3y9","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27661192\/549-quebec-street-london-east-g","RelativeURLFr":"\/immobilier\/27661192\/549-quebec-street-london","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27720876","ReferenceNumber":"R2949266","Address_EN":"212 4928 QUEBEC STREET","Address_FR":"212 4928 QUEBEC STREET","City":"Vancouver","PostalCode":"v5w2n2","Province":"BC","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27720876\/212-4928-quebec-street-vancouver","RelativeURLFr":"\/immobilier\/27720876\/212-4928-quebec-street-vancouver","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27741486","ReferenceNumber":"X11894528","Address_EN":"558 QUEBEC STREET","Address_FR":"558 QUEBEC STREET","City":"Hamilton (Parkview)","PostalCode":"l8h6v4","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27741486\/558-quebec-street-hamilton-parkview-parkview","RelativeURLFr":"\/immobilier\/27741486\/558-quebec-street-hamilton-parkview","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27754883","ReferenceNumber":"S11901084","Address_EN":"267 QUEBEC STREET","Address_FR":"267 QUEBEC STREET","City":"Clearview (Stayner)","PostalCode":"l0m1s0","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27754883\/267-quebec-street-clearview-stayner-stayner","RelativeURLFr":"\/immobilier\/27754883\/267-quebec-street-clearview-stayner","isReferenceMatch":false,"isPostalCodeMatch":false}],"ResultsMapBox":[{…
Official API response
{"ErrorCode":{"Id":200,"Description":"Success - OK","ProductName":"Realtor API 7 | 20241202.1 | 1018e702fe06dda8279318e12b199910ca21c3ff | Monday, December 2, 2024 12:21:41 PM","Version":"1.0.9102.31292"},"Results":[{"Type":1,"ListingId":"27656697","ReferenceNumber":"X10440405","Address_EN":"191 QUEBEC STREET","Address_FR":"191 QUEBEC STREET","City":"Bracebridge (Macaulay)","PostalCode":"p1l1e3","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27656697\/191-quebec-street-bracebridge-macaulay-macaulay","RelativeURLFr":"\/immobilier\/27656697\/191-quebec-street-bracebridge-macaulay","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27661192","ReferenceNumber":"X10428998","Address_EN":"549 QUEBEC STREET","Address_FR":"549 QUEBEC STREET","City":"London","PostalCode":"n5w3y9","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27661192\/549-quebec-street-london-east-g","RelativeURLFr":"\/immobilier\/27661192\/549-quebec-street-london","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27720876","ReferenceNumber":"R2949266","Address_EN":"212 4928 QUEBEC STREET","Address_FR":"212 4928 QUEBEC STREET","City":"Vancouver","PostalCode":"v5w2n2","Province":"BC","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27720876\/212-4928-quebec-street-vancouver","RelativeURLFr":"\/immobilier\/27720876\/212-4928-quebec-street-vancouver","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27741486","ReferenceNumber":"X11894528","Address_EN":"558 QUEBEC STREET","Address_FR":"558 QUEBEC STREET","City":"Hamilton (Parkview)","PostalCode":"l8h6v4","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27741486\/558-quebec-street-hamilton-parkview-parkview","RelativeURLFr":"\/immobilier\/27741486\/558-quebec-street-hamilton-parkview","isReferenceMatch":false,"isPostalCodeMatch":false},{"Type":1,"ListingId":"27754883","ReferenceNumber":"S11901084","Address_EN":"267 QUEBEC STREET","Address_FR":"267 QUEBEC STREET","City":"Clearview (Stayner)","PostalCode":"l0m1s0","Province":"ON","Details_Small_EN":null,"Details_Small_FR":null,"RelativeURLEn":"\/real-estate\/27754883\/267-quebec-street-clearview-stayner-stayner","RelativeURLFr":"\/immobilier\/27754883\/267-quebec-street-clearview-stayner","isReferenceMatch":false,"isPostalCodeMatch":false}],"ResultsMapBox":[{…