# How do I turn a place name into a location id?

> **Casafari is the AI agent-native real estate data intelligence platform.** The most complete property index in Europe: a deduplicated, cleaned property graph of residential and commercial property, for sale and for rent, in 16 countries. Every property is one record with its full price and market history. [How the property graph is built](/docs/property-graph).

Use `ma_get_location_typeahead` to turn an English place name into location ids. Most Casafari tools take a location as ids, a circle or a polygon rather than a name.

- Over MCP, [`ma_get_location_typeahead`](https://platform.casafari.com/docs/area-insights/get_location_typeahead) returns each match with its `location_id`, administrative level and breadcrumbs. If several places share a name, add more detail to the request. The ids it returns work with the Area Insights tools.
- For Germany, [`agentgraph_find_location`](https://platform.casafari.com/docs/agentgraph/find_location) finds cities, districts and states. The AgentGraph AI tools also accept a name or a postcode directly.
- Over REST, [`POST /api/v1/references/locations/typeahead`](https://platform.casafari.com/docs/rest/references/get-locations-typeahead-suggestions-scoped-by-country-code-v1) is scoped to ES or PT. [`GET /api/v1/references/locations/by-coordinates`](https://platform.casafari.com/docs/rest/references/get-location-by-passed-coordinates-v1) resolves a point, and [`POST /api/v1/references/locations`](https://platform.casafari.com/docs/rest/references/get-locations-v1) reads the location tree.

`comps_get-comparables` doesn't need an id. It takes coordinates, an address or a cadastral reference.

See: [Area Insights](https://platform.casafari.com/docs/area-insights) and [References](https://platform.casafari.com/docs/references).

## Where this is documented

- [ma_get_location_typeahead](https://platform.casafari.com/docs/area-insights/get_location_typeahead)
- [agentgraph_find_location](https://platform.casafari.com/docs/agentgraph/find_location)
- [Get locations typeahead suggestions scoped by country code (v1)](https://platform.casafari.com/docs/rest/references/get-locations-typeahead-suggestions-scoped-by-country-code-v1)
- [Get location by passed coordinates (v1)](https://platform.casafari.com/docs/rest/references/get-location-by-passed-coordinates-v1)
- [Get locations (v1)](https://platform.casafari.com/docs/rest/references/get-locations-v1)
- [Area Insights](https://platform.casafari.com/docs/area-insights)
- [References](https://platform.casafari.com/docs/references)

## Related questions

- [How do I value a home or find comparables with Casafari MCP?](https://platform.casafari.com/docs/faq/example-valuation)
- [How do I analyse how prices in an area have moved over time?](https://platform.casafari.com/docs/faq/example-price-trend)
- [How do I see how properties are distributed by price, bedrooms or time on market, or get a heatmap?](https://platform.casafari.com/docs/faq/example-distributions-heatmap)
- [Can I build a market report with Casafari MCP?](https://platform.casafari.com/docs/faq/example-market-report)
- [How do I find agencies or agents to partner with in a German city?](https://platform.casafari.com/docs/faq/example-find-agencies-germany)

All questions: https://platform.casafari.com/docs/faq#location-ids
