# A home-search portal in one prompt

> **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).

**"Build me a home search portal for Madrid", running on live data.**

You get: A working app in Claude or your code. It uses Location Lookup, Property Sourcing and Area Insights, takes 225 tokens a run (€9.00 at €0.04 a token) and runs per build. For: Software or AI builder, Portal or classifieds.

**Status:** runs today.

## What it does

| # | Step | Product | Tokens |
|---|---|---|---|
| 1 | `locations_search` | Location Lookup | 0 |
| 2 | `property-sourcing_search` | Property Sourcing | 50 |
| 3 | `property-sourcing_next_page` | Property Sourcing | 50 |
| 4 | `property-sourcing_get_property` × 10 | Property Sourcing | 100 |
| 5 | `area-insights_get_time_series_data` | Area Insights | 25 |

One run: **225 tokens**, €9.00. Each call costs the same over MCP and REST, so the run always costs what the table says. [How many tokens your volume needs](/playbooks), and [plans and credits](/pricing).

## Where it runs

Every country the products it uses cover. The plan names a country that one of them does not.

## Run in Claude

This playbook calls 3 Casafari MCP servers. Add each to Claude, ChatGPT or any MCP client, and sign in the first time you use them (a Free account, no card, is created then; [console](https://platform.casafari.com/console/)).

- Location Lookup: `https://platform.casafari.com/mcp/locations`
- Area Insights: `https://platform.casafari.com/mcp/area-insights`
- Property Sourcing: `https://platform.casafari.com/mcp/property-sourcing`

In Claude Code:

```bash
claude mcp add --transport http casafari-locations https://platform.casafari.com/mcp/locations
claude mcp add --transport http casafari-area-insights https://platform.casafari.com/mcp/area-insights
claude mcp add --transport http casafari-property-sourcing https://platform.casafari.com/mcp/property-sourcing
```

Then ask:

```text
Run the a home-search portal in one prompt playbook for Spain: call locations_search, then property-sourcing_search, then property-sourcing_next_page, then property-sourcing_get_property, then area-insights_get_time_series_data, in that order, and tell me what each step cost in tokens.
```

## Get the API calls

The same steps as REST calls, in order. Create a platform API key in the console and export it as `CASAFARI_API_KEY`; each call takes the parameters its operation documents in the [REST reference](/docs/rest).

```bash
# 1. Location Lookup, 0 tokens a call
curl -X GET https://platform.casafari.com/v1/locations/search \
  -H "Authorization: Bearer $CASAFARI_API_KEY"

# 2. Property Sourcing, 50 tokens a call
curl -X POST https://platform.casafari.com/v1/property-sourcing/searches \
  -H "Authorization: Bearer $CASAFARI_API_KEY"

# 3. Property Sourcing, 50 tokens a call
curl -X GET https://platform.casafari.com/v1/property-sourcing/searches/{cursor} \
  -H "Authorization: Bearer $CASAFARI_API_KEY"

# 4. Property Sourcing (10 times), 10 tokens a call
curl -X GET https://platform.casafari.com/v1/property-sourcing/properties/{property_id} \
  -H "Authorization: Bearer $CASAFARI_API_KEY"

# 5. Area Insights, 25 tokens a call
curl -X POST https://platform.casafari.com/v1/area-insights/time-series \
  -H "Authorization: Bearer $CASAFARI_API_KEY"
```

## Other playbooks

- [Competitor map](/playbooks/competitor-map): Know who wins listings in my area, and where.
- [Valuation in a minute](/playbooks/quick-valuation): An indicative value with comparables, before the visit.
- [Price-position badge](/playbooks/price-badge): Show buyers whether each listing is priced above or below the market.
- [Check the AI's shortlist](/playbooks/check-ai-shortlist): Paste five links, get each home's evidence side by side.
- [All playbooks and the calculator](/playbooks)
