# Rank the agencies of a city by portfolio value

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

Rank the agencies of Lisbon by the value of the homes they have on the market, with growth, price cuts and time on the market, against the city's price trend.

## Ask your assistant

> Rank the agencies in Lisbon by portfolio value, with their new homes last quarter, price cuts and time on the market, and tell me how the city's asking prices moved over the same quarter.

Who it is for: Agencies that want to know where they stand; franchise networks; the press office of a portal preparing a market note.

## Steps

1. `locations_search` ([Location Lookup](/docs/connect), `https://platform.casafari.com/mcp/locations`): Turn "Lisbon" into a location id (Location Lookup, free).

   ```json
   {
     "query": "Lisboa"
   }
   ```

2. [`agencygraph_area_benchmark`](/docs/agencygraph/area_benchmark): The agencies of the city ranked by portfolio value, each with the five measures and its growth, 25 per page; pass next_offset as offset for the next page, down to the first 100.

   ```json
   {
     "country": "PT",
     "location_id": 101,
     "sort": "portfolio_value"
   }
   ```

3. [`area-insights_get_time_series_data`](/docs/area-insights/get_time_series_data): The city's asking prices and supply over the same quarter (Area Insights), so a growing portfolio can be read against a rising or falling market.

## What you get

Illustrative example: made-up agencies, ids and figures, not real data.

| Rank | Agency | Properties | Portfolio value | Median price | New homes (quarter) | Median days on the market |
|---|---|---|---|---|---|---|
| 1 | Example Prime Estates | 260 | €214.0M | €690K | 71 | 118 |
| 2 | Sample Homes Lisboa | 180 | €117.0M | €560K | 64 | 96 |
| 3 | Example Casas Oeiras | 122 | €71.4M | €540K | 29 | 104 |

## Notes

This is a digital inventory index: it ranks what agencies advertise online, not their revenue or their whole business. The benchmark stops at the first 100 agencies of a town; every agency of the city, with four quarters of new and delisted homes, is the city dataset (REST).

What it costs: `agencygraph_area_benchmark` 75 tokens per page of up to 25 rows (the first 100 agencies of a town); the other products' tools at their own prices ([Pricing](/pricing)).
