Casas y Terrenos APIcasasyterrenos.com ↗
Search and retrieve Mexico real estate listings from casasyterrenos.com. Get property details, pricing, images, coordinates, and seller contacts via 2 endpoints.
What is the Casas y Terrenos API?
The casasyterrenos.com API provides access to real estate listings across all Mexican states through 2 endpoints. Use search_listings to filter properties by state, city, bedrooms, bathrooms, parking, and price, getting up to 40 results per page with summary data, then call get_listing_detail with the canonical slug to retrieve full property information including GPS coordinates, image gallery, amenities, and direct seller contact details.
curl -X GET 'https://api.parse.bot/scraper/be39d005-39e6-4654-b189-f96e0e6c94ce/search_listings?city=guadalajara&page=0&sort=price_asc&state=jalisco&parking=1&bedrooms=2&bathrooms=2&max_price=10000000&min_price=1000000&operation=venta&property_type=casa' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace casasyterrenos-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: CasasYTerrenos SDK — search Mexican real estate, drill into details."""
from parse_apis.casas_y_terrenos_api import (
CasasYTerrenos, PropertyType, Operation, Sort, ListingNotFound
)
client = CasasYTerrenos()
# Search houses for sale in Jalisco, sorted by price ascending
jalisco = client.state("jalisco")
for listing in jalisco.search(
city="guadalajara",
property_type=PropertyType.CASA,
operation=Operation.VENTA,
sort=Sort.PRICE_ASC,
bedrooms=3,
limit=5,
):
print(listing.name, listing.price_sale, listing.municipality)
# Drill into the first result for full detail (features, amenities, seller)
listing = jalisco.search(
property_type=PropertyType.DEPARTAMENTO,
operation=Operation.RENTA,
limit=1,
).first()
if listing:
detail = listing.details()
print(detail.name, detail.selling_price)
print(detail.features.rooms, detail.features.bathrooms, detail.features.parking)
if detail.seller:
print(detail.seller.first_name, detail.seller.email)
# Typed error handling: catch a missing listing
try:
bad = client.state("quintana-roo").search(limit=1).first()
if bad:
bad.details()
except ListingNotFound as exc:
print(f"Listing gone: {exc.slug_or_url}")
print("exercised: state.search / listing.details / ListingNotFound")
Search for real estate listings (houses, apartments, land, etc.) by state, municipality, property type, and operation. Returns paginated results with up to 40 listings per page. Listings include summary info: price, size, rooms, broker contact, and a canonical slug for drill-down via get_listing_detail. Pagination is zero-based; sort defaults to featured listings first.
| Param | Type | Description |
|---|---|---|
| city | string | Municipality/city name slug to filter within the state (e.g., 'monterrey', 'guadalajara', 'zapopan'). Hyphens are replaced with spaces and title-cased for matching. |
| page | integer | Page number (0-indexed). Each page returns up to 40 results. |
| sort | string | Sort order. Omitting sorts by featured listings first. |
| staterequired | string | Mexican state name slug in lowercase hyphenated form (e.g., 'jalisco', 'nuevo-leon', 'ciudad-de-mexico', 'quintana-roo'). Corresponds to all 32 Mexican states. |
| parking | integer | Minimum number of parking spaces. |
| bedrooms | integer | Minimum number of bedrooms. |
| bathrooms | integer | Minimum number of bathrooms. |
| max_price | integer | Maximum price in MXN. Filters on priceSale for venta, priceRent for renta. |
| min_price | integer | Minimum price in MXN. Filters on priceSale for venta, priceRent for renta. |
| operation | string | Operation type. |
| property_type | string | Property type slug. |
{
"type": "object",
"fields": {
"page": "integer, current page number",
"limit": "integer, max results per page (40)",
"total": "integer, estimated total number of matching listings",
"properties": "array of property listing objects with id, name, state, municipality, neighborhood, type, surface, construction, rooms, bathrooms, parkingLots, currency, priceSale, priceRent, photoPreview, canonical, slugs, images, broker, lastUpdate"
}
}About the Casas y Terrenos API
What the API Returns
The search_listings endpoint accepts a required state parameter as a lowercase hyphenated slug (e.g., nuevo-leon, ciudad-de-mexico) and optional filters for city, bedrooms, bathrooms, parking, and max_price. Results are 0-indexed via the page parameter and return up to 40 listings per page. Each listing in the properties array includes the property id, name, state, municipality, neighborhood, type, surface area, construction area, room count, bathroom count, and a canonical field used to fetch full details.
Listing Detail
Passing the canonical slug from search results to get_listing_detail returns the complete property record. The response includes coords (lat/lng), an images array with original URLs and alt text, a features object covering age, area, construction, bathrooms, halfBathrooms, levels, parking, and rooms, and a seller object with id, name, email, phone, and whatsapp. A contactCard object provides business-level contact info including business_name and phones, and description returns the full HTML property description.
Coverage and Filtering
Listings span residential, commercial, and land categories across Mexican states. Price filtering works against priceSale for sale listings and priceRent for rental listings depending on the operation type. The sort parameter controls ordering; omitting it returns featured listings first. The total field in search results reflects an estimated count of matches, which is useful for building pagination controls.
The Casas y Terrenos API is a managed, monitored endpoint for casasyterrenos.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when casasyterrenos.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official casasyterrenos.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a Mexico property search portal filtering by state, city, and bedroom count using
search_listings - Aggregate asking prices across municipalities to analyze real estate market trends by region
- Display property location on a map using
coordslat/lng fromget_listing_detail - Extract seller
whatsappandphonefields to build a lead generation tool for real estate agents - Compare surface area and construction area across listings in a given neighborhood
- Compile image galleries for listings by iterating the
imagesarray from detail responses - Track available inventory by page-walking
search_listingsand monitoring thetotalcount over time
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does casasyterrenos.com have an official developer API?+
What does `search_listings` return versus `get_listing_detail`?+
search_listings endpoint returns summary data — price, size, room count, municipality, and a canonical slug — for up to 40 listings per page. The get_listing_detail endpoint takes that slug and returns the full record: GPS coordinates, all images, the HTML description, detailed features (levels, half-bathrooms, parking), and seller/business contact fields not present in search results.Does the API cover rental listings as well as properties for sale?+
max_price filter applies against priceSale for sale listings and priceRent for rental listings, so both operation types are accessible. The operation type is part of how you construct your query.Is historical pricing or price-change history available?+
What are the pagination limits and how is the total count reported?+
search_listings response returns at most 40 results per page. The page parameter is 0-indexed, and the total field gives an estimated total match count. Note that total is an estimate from the source and may not be exact for very large result sets.