# /reins/houses/search

`POST /api/reins/houses/search`

Price: 20 credits

Contracted sales of second-hand detached houses in a REINS area, from the REINS Market Information list: rail line, station and walking distance, address, contract price, land and building area bands, layout, build year, structure, three-month contract period, front road width, type and direction, zoning, building coverage and floor area ratios

## How to use it

Take area_code, municipality, town, rail line and station codes from reins/areas. An area holding fewer than 100 contracts in total returns an empty list, and so does a filter set matching fewer than 10 contracts.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `area_code` (string, required) — REINS area code (examples: "H1302", "H0199"; minLength: 1)
- `count` (integer, required) — Max number of results (min: 1; max: 5000)
- `municipality_code` (string, nullable) — Municipality code inside the area (examples: "13113")
- `town_code` (string, nullable) — Town code inside the municipality (examples: "13113001")
- `rail_line_code` (string, nullable) — Rail line code (examples: "2172")
- `station_code` (string, nullable) — Station code on the rail line (examples: "170")
- `station_distances` (array, nullable) — Distance to the nearest station (one of: "walk_up_to_5_minutes", "walk_up_to_10_minutes", "walk_up_to_15_minutes", "walk_over_15_minutes", "bus"; examples: ["walk_up_to_5_minutes","walk_up_to_10_minutes"])
- `price_min` (integer, nullable) — Lowest contract price, yen (one of: 5000000, 10000000, 15000000, 20000000, 25000000, 30000000, 35000000, 40000000, 45000000, 50000000, 60000000, 70000000, 80000000, 90000000, 100000000; examples: 50000000)
- `price_max` (integer, nullable) — Highest contract price, yen (one of: 5000000, 10000000, 15000000, 20000000, 25000000, 30000000, 35000000, 40000000, 45000000, 50000000, 60000000, 70000000, 80000000, 90000000, 100000000; examples: 100000000)
- `floor_area_min` (integer, nullable) — Smallest floor area, m² (one of: 20, 40, 60, 80, 100; examples: 40)
- `floor_area_max` (integer, nullable) — Largest floor area, m² (one of: 20, 40, 60, 80, 100; examples: 80)
- `layouts` (array, nullable) — Floor plans by room count (one of: "studio", "1k_1dk_1ldk", "2k_2dk_2ldk", "3k_3dk_3ldk", "4k_or_more"; examples: ["2k_2dk_2ldk","3k_3dk_3ldk"])
- `building_age` (string, nullable) — Age of the building (one of: "up_to_5_years", "from_5_to_10_years", "from_10_to_15_years", "from_15_to_20_years", "over_20_years"; examples: "up_to_5_years")
- `contracted_within` (string, nullable) — How recently the contract was made (one of: "3_months", "6_months", "12_months"; examples: "6_months")
- `zoning` (string, nullable) — Zoning district (one of: "category_1_low_rise_residential", "category_2_low_rise_residential", "category_1_mid_high_rise_residential", "category_2_mid_high_rise_residential", "category_1_residential", "category_2_residential", "quasi_residential", "neighborhood_commercial", "commercial", "quasi_industrial", "industrial"; examples: "commercial")
- `sort_order` (string) — Sort direction (default: "asc"; one of: "asc", "desc"; examples: "desc")
- `land_area_min` (integer, nullable) — Smallest land area, m² (one of: 20, 40, 60, 80, 100; examples: 60)
- `land_area_max` (integer, nullable) — Largest land area, m² (one of: 20, 40, 60, 80, 100; examples: 100)
- `sort_by` (string, nullable) — Sort column within each rail line and station (one of: "station_distance", "address", "price", "land_area", "floor_area", "layout", "built_year", "structure", "contract_period", "road_width", "road_type", "road_direction", "zoning", "building_coverage_ratio", "floor_area_ratio"; examples: "land_area")

## Response

### 200 — Successful Response

- `@type` (string) (default: "ReinsContract")
- `position` (integer, required)
- `property_type` (string, required) (one of: "condo", "house")
- `area_code` (string, required)
- `rail_line` (string, nullable)
- `station` (string, nullable)
- `station_distance` (string, nullable)
- `address` (string, nullable)
- `price` (number, nullable)
- `floor_area_min` (number, nullable)
- `floor_area_max` (number, nullable)
- `land_area_min` (number, nullable)
- `land_area_max` (number, nullable)
- `layout` (string, nullable)
- `renovation` (string, nullable)
- `built_year` (integer, nullable)
- `structure` (string, nullable)
- `contract_period_start` (string, nullable)
- `contract_period_end` (string, nullable)
- `zoning` (string, nullable)
- `road_width` (number, nullable)
- `road_type` (string, nullable)
- `road_direction` (string, nullable)
- `building_coverage_ratio` (number, nullable)
- `floor_area_ratio` (number, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No REINS area under that code

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

