Property data in your product · Use case
How do I resolve a portal or agency ad id to the property it belongs to?
Send each advertisement's link or reference to POST /v1/property-sourcing/properties/resolve in Casafari's Property Sourcing, with a platform API key. Casafari's property graph recognises the same property advertised by several agencies and portals as one record, so ads of one home resolve to one prop_ id. Fetch that property in full, with every source and its history, by id.
Products: References, Property Sourcing
Short answer
Casafari collects advertisements from agency websites and portals in 16 countries. It structures and cleans them, then deduplicates them: the same property, advertised by several agencies and portals, is recognised as one. Every advertisement of that property is merged into one record with its full history.
POST /v1/property-sourcing/properties/resolve takes a portal or agency link, or an agency reference, and returns the property it belongs to. Your feed, CRM or statistics can then count each property once. Existing clients on the Legacy API send ad ids to POST /api/v1/properties/match-by-listings instead. Background: The property graph.
Steps
Send a platform API key (cf_sk_..., from the console at https://platform.casafari.com/console) as Authorization: Bearer $CASAFARI_API_KEY on each platform call below. There is no sign-in call. See platform API keys.
Check the sources the graph is built from (Legacy API): GET /api/v1/references/sources
- The platform has no route that lists the sources yet. Existing clients can call
GET /api/v1/references/sourceson the Legacy API (api.casafari.com, its own sign-in: how to sign in) to confirm that the portals and agency websites their ads come from are among them. Otherwise, resolve a sample of your links and see which return a property.
Send your links: POST /v1/property-sourcing/properties/resolve with url or reference
- Send one advertisement per call: its link in
url, or the agency's reference inreferencewithcountry. Addcountryto a link whose domain does not say the country. Theidinresultsis the property'sprop_id. Store it next to the advertisement in your own system.
Fetch the full record: GET /v1/property-sourcing/properties/{property_id}
- Call
GET /v1/property-sourcing/properties/{property_id}with the returned id andexpand=listings,history. The record holds the property, every advertisement of it with its agency, source, link and asking price, and its price history. Existing Legacy API clients fetch their own ids withGET /api/v1/properties/search/{property_id}.
Example
A portal team in Valencia receives three ads for what looks like the same flat: two from portals and one from an agency website. They resolve each link:
curl -X POST "https://platform.casafari.com/v1/property-sourcing/properties/resolve" \
-H "Authorization: Bearer $CASAFARI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "<ad link 1>", "country": "ES" }'They repeat the call for <ad link 2> and <ad link 3>. If the graph recognises the three ads as one flat, all three answers carry the same id in results. Fetch that id to read the full record:
curl "https://platform.casafari.com/v1/property-sourcing/properties/<prop_id>?expand=listings" \
-H "Authorization: Bearer $CASAFARI_API_KEY"Your product then shows one flat, not three. The exact response schemas are on the resolve and property reference pages.
How to read the result
Treat the prop_ id as the key in your own system. Store it next to each advertisement you receive. Two ads with the same prop_ id are the same home. Platform ids are not the Legacy API's property ids.
listings and the linked advertisements
With expand=listings, the record's listings holds every advertisement linked to the property.
- Use the
prop_id for counting. - Each entry carries
source,agency,url,price,status,active,first_seenandreferences, the agency's reference numbers. - The Legacy API record instead names one
primary_listing_id, which Legacy API operations such asprimary_listing_idsinPOST /api/v1/properties/smart-linksask for; the platform has no route for smart links yet.
listings_count and active
listings_count gives the number of advertisements of the property, and active in each entry of listings says whether that advertisement is live. More than one active entry means several agencies or portals offer the same home at once.
That supports two decisions:
- Show the property once, with a note that several agencies offer it.
- Discount it when you measure supply.
Check the fetch operation's reference page for the exact fields it returns.
Limits
Resolving a link or reference to its property and fetching the property are self-serve on the Casafari API and MCP Platform over REST, with a platform API key, and over MCP. Matching by ad ids and the sources vocabulary are Legacy API operations for existing clients; the platform has no route for them yet.
The sources give no figures for quotas, rate limits, refresh frequency or SLAs. Ask Casafari at https://www.casafari.com/.
Links must come from sources in the graph
Only ads from sources Casafari collects can be resolved. An ad that never appeared in those sources has no property to resolve to. The fields of the advertisement entity are listed in Data Export at /docs/data-export/listing.
API key or MCP connection
You need a platform API key for REST, or an assistant connected to the Property Sourcing MCP server, where property-sourcing_resolve_listing answers "are these three ads the same flat?" one link at a time. See Why does Casafari count properties and not advertisements? and What is the Casafari property graph?.
Ask in Claude or ChatGPT
Property Sourcing has an MCP server, https://platform.casafari.com/mcp/property-sourcing, so an assistant can run this from a chat. In Claude or ChatGPT, add a custom connector with that URL; in Claude Code: claude mcp add --transport http casafari-property-sourcing https://platform.casafari.com/mcp/property-sourcing. Sign in with your Casafari Platform account in the browser (a new account starts on the Free plan). Then ask, for example:
Flats in Madrid under €650K, 2+ bedrooms: show each with every agency advertising it and its price history.
The assistant finds the place with locations_search (free), searches with property-sourcing_search (5 tokens a page of up to 10 homes, property-sourcing_next_page for more), reads each home with property-sourcing_get_property (2 tokens: every agency and portal advertising it and its asking price history) and turns a pasted portal or agency link into its home with property-sourcing_resolve_listing (2 tokens). Prices are asking prices. See Property Sourcing.
Questions
What happens when an id is unknown?
The sources do not describe the answer for a link or reference that cannot be resolved; the reference page lists the errors the operation can return, including 404 not_found, so test it. Send the full link of one advertisement, and country with a reference. Existing Legacy API clients can check with GET /api/v1/references/sources that the portal or agency website is one of the sources the graph is built from; the platform has no route for that list yet.
Can I match by address or coordinates instead?
No, resolve takes a url, a reference or a listing_id only. To find properties around a point, get its location ids with GET /v1/locations/by-coordinates (or by name with GET /v1/locations/search), then search them with POST /v1/property-sourcing/searches and compare location, type, bedrooms and living_area_sqm. A custom polygon or circle is a Legacy API filter (custom_location_boundary on POST /api/v2/properties/search) with no platform equivalent yet.
How does Casafari decide two advertisements are the same property?
Casafari structures every advertisement into one schema, normalises the values and resolves places to its location tree and to coordinates. It then recognises the same property, advertised by several agencies and portals, as one record. The sources do not publish the matching method or its accuracy; ask Casafari at https://www.casafari.com/ if you need that detail.
Is the matched record updated when a new advertisement appears?
Yes in principle: Casafari collects advertisements as they appear and as they change, and merges every advertisement of a property into its one record. A new advertisement of the same property therefore joins that record, under the same prop_ id, rather than creating a second one. The sources publish no refresh frequency or delivery timing; ask Casafari at https://www.casafari.com/.
Related: Resolve client-forwarded links to one property record