> For the complete documentation index, see [llms.txt](https://docs.altum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altum.ai/english/property-valuation-and-market/market-trend-api/authentication-input-and-response.md).

# Authentication, input and response

### Headers

<table><thead><tr><th width="152">Name</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>string</td><td>application/json</td></tr><tr><td>x-api-key<mark style="color:red;">*</mark></td><td>string</td><td>Unique API key from Altum. Obtain one via Mopsus (https://mopsus.altum.ai)</td></tr></tbody></table>

This is the main endpoint of the API. It retrieves a list of subsidies based on a user's postcode and, if provided, their personal and financial details for loan eligibility checking.

<mark style="color:green;">**`GET`**</mark>   `https://api.altum.ai/market-trend?postcode=??&valuation_date=????-??-??`

### Request body

**Market Trend Request Model**

| **Field**                                  | **Type** | **Description**                                     |
| ------------------------------------------ | -------- | --------------------------------------------------- |
| postcode<mark style="color:red;">\*</mark> | string   | **Required**. The Dutch postcode (e.g., "3511 AA"). |
| valuation\_date                            | date     | Reference date for price indexing (YYYY-MM-DD).     |

**Example Complete Input**

```
https://api.altum.ai/market-trend?postcode=5258BB&valuation_date=2024-01-15
```

Upon a successful `GET` request, the API returns a `200 OK` status with a JSON object containing the results.

### Market Trend API Response Model

| **Field**                       | **Type** | **Description**                                                                                                                 |
| ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| postcode                        | String   | The normalized Dutch postcode (e.g., "1011AB") used for the query.                                                              |
| city                            | String   | The city name derived from the master address database.                                                                         |
| neighbourhood                   | String   | The specific neighborhood name (if available in Dataland source).                                                               |
| municipality                    | String   | The administrative municipality governing the area.                                                                             |
| averagePriceSingleFamilyHomes   | Float    | The average transaction price for single-family properties (detached, semi-detached, terraced).                                 |
| averagePriceMultiFamilyHomes    | Float    | The average transaction price for multi-family properties (apartments/flats).                                                   |
| pricePerSquareMeterSingleFamily | Float    | The average price per square meter (€/m²) for single-family homes.                                                              |
| pricePerSquareMeterMultiFamily  | Float    | The average price per square meter (€/m²) for apartments.                                                                       |
| annualPriceChange               | Float    | The annualized percentage growth (CAGR) of property values compared to the previous recorded year.                              |
| fiveYearPriceChange             | Float    | The projected percentage change in value over a 5-year period based on historical growth trends.                                |
| totalSalesLast12Months          | Integer  | The total count of property transactions recorded in this postcode over the last 365 days.                                      |
| priceDistribution               | Object   | A dictionary serving as a histogram, mapping price ranges (e.g., "250-500k") to the number of properties sold in that bracket.  |
| pricePerSquareMeterDistribution | Object   | A dictionary serving as a histogram, mapping price-per-m² ranges (e.g., "3000-3500") to the frequency of sales in that bracket. |

### Output <a href="#id-5.-output" id="id-5.-output"></a>

Upon a successful `GET` request, the API returns a `200 OK` status with a JSON object containing the results.

**Example Complete Output**

```
{
  "valuationDate": "2024-01-15",
  "region": {
    "postcode": "5258BB",
    "city": "BERLICUM NB",
    "neighbourhood": "Berlicum",
    "municipality": "Sint-Michielsgestel"
  },
  "averagePriceSingleFamilyHomes": 585213.2,
  "averagePriceMultiFamilyHomes": null,
  "pricePerSquareMeterSingleFamily": 3862.19,
  "pricePerSquareMeterMultiFamily": null,
  "annualPriceChange": 2.34,
  "fiveYearPriceChange": 12.25,
  "transactionData": {
    "totalSalesLast12Months": 0
  },
  "priceDistribution": {
    "250-500k": 3,
    "500-750k": 1,
    "750k-1M": 1
  },
  "pricePerSquareMeterDistribution": {
    "0-2500": 1,
    "2500-3000": 1,
    "4000+": 3
  }
}
```

**Explanation**

🏘️ **Valuation Date**

```
"valuationDate": "2024-01-15"
```

{% hint style="info" %}
All data and KPIs are calculated using the prices as of the valuation date and reflect the price levels prevailing on that date.
{% endhint %}

🏘️ **Region**

```
"region": {
  "postcode": "5258BB",
  "city": "BERLICUM NB",
  "neighbourhood": "Berlicum",
  "municipality": "Sint-Michielsgestel"
}
```

{% hint style="info" %}
All the data and KPIs are calculated for postcode 5258BB, providing context at the city **BERLICUM NB**, neighborhood **Berlicum**, and municipality **Sint-Michielsgestel**.
{% endhint %}

💰 **Average Property Prices**

```
"averagePriceSingleFamilyHomes": 585213.2,
"averagePriceMultiFamilyHomes": null
```

{% hint style="info" %}

* **Single-family homes:** €585213.2 on average.
* **Multi-family homes / apartments:** No data available for this area.

This tells us that houses in this postcode are relatively expensive, and the market for apartments is either very small or not recorded.
{% endhint %}

📏 **Price Per Square Meter**

```
"pricePerSquareMeterSingleFamily": 3862.19,
"pricePerSquareMeterMultiFamily": null
```

{% hint style="info" %}

* **Single-family homes:** €3862.19 per m².
* **Multi-family homes:** No data available.

This gives a way to compare house prices fairly, even if the sizes of the houses differ.
{% endhint %}

📈 **Price Trends**

```
"annualPriceChange":  2.34,
"fiveYearPriceChange": 12.25
```

{% hint style="info" %}

* **Annual price change:** +2.34% → prices increased over the last year.
* **Five-year price change:** +12.25% → prices increased significantly over the last 5 years.

This shows that house prices are rising in both the short term and long term.
{% endhint %}

🏷️ **Transaction Activity**

```
"transactionData": {
  "totalSalesLast12Months": 0
}
```

{% hint style="info" %}

* **Number of sales in the last 12 months:** 0

This means **no houses were sold in this area over the past year**, so the market is currently inactive.
{% endhint %}

💵 **Price Distribution**

```
 "priceDistribution": {
		"250-500k": 3,
		"500-750k": 1,
		"750k-1M": 1
	}
```

{% hint style="info" %}

* How many houses were sold in each price range (all-time, not just last 12 months):

  * €250k–€500k → 3 houses
  * €500k–€750k → 1 houses
  * €1M+ → 1 houses

  Most houses sold in this postcode fall in the **€500k–€750k range**, with a few high-end sales over €1M.
  {% endhint %}

🏠 **Price Per Square Meter Distribution**

```
"pricePerSquareMeterDistribution": {
		"0-2500": 1,
		"2500-3000": 1,
		"4000+": 3
	}
```

{% hint style="info" %}
This tells us that even expensive houses are relatively modest in €/m² compared to very high-end markets.

* €0–€2500 → 3 houses&#x20;
* €2500–€3000 → 1 houses
* €4000+ → 3 houses
  {% endhint %}

{% tabs %}
{% tab title="200: OK Standard response" %}

```
Request processed and data returned.
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
The postcode exists, but there is insufficient data (e.g., missing dates or prices) to calculate KPIs.
```

{% endtab %}

{% tab title="404 Not Found" %}

```
No transactions or master data exist for the provided postcode.
```

{% endtab %}

{% tab title="422 Validation Error" %}
The postcode format was incorrect (e.g., "12345").
{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
Database connection failure or unhandled exception in calculation logic.
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.altum.ai/english/property-valuation-and-market/market-trend-api/authentication-input-and-response.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
