Japan has around 9 million empty houses. Hundreds of towns try to give theirs a second life through "akiya banks": municipal websites that list vacant homes, often for a few million yen. The catch for anyone outside Japan is that there is no single akiya bank. There are hundreds, each with its own markup, its own price format and its own idea of what a listing is.
I'm building Engawa, an English map of those listings. This post covers what it took to turn a few dozen Japanese property sites into one catalogue of about 13,000 homes, without being a bad citizen of anyone's server.
One adapter per source, one shared frontier
Every source gets a small adapter that knows two things: how to discover detail URLs, and how to turn a detail page into a normalized record (price in yen, land and floor area in square metres, build year, coordinates, photos). Everything else is shared.
Discovered URLs go into a crawl_frontier table in SQLite (Node's built-in node:sqlite, no ORM). That one decision paid for itself many times over: a crawl can be stopped with Ctrl-C after the active batch and resumed later with --resume, failed URLs get re-queued, and a nationwide run never starts from zero.
npm run crawl -- --source=ieichiba --pref=nagano --limit=50 npm run crawl -- --source=ieichiba --resume Being polite is a feature
The crawler identifies itself with a real User-Agent, reads robots.txt for every origin, waits 1.5 seconds between requests by default, runs two workers, and backs off on 429 and 5xx responses.
When a large national portal returned 403 to an identifiable crawler, I didn't try to get around it. It isn't in the catalogue. That's an acceptable gap. Getting around a block that clear is a bad idea.
The parsing is where the time goes
Japanese property pages are mostly server-rendered HTML, which is good news. The bad news is the long tail of formats:
- Prices come as
1,080万円,1080万, a bare1080that means 万円 on one site and yen on another, or要相談("price on request"). Each adapter owns its own rules, and "on request" is stored as 0 and never presented as free. - Build year is usually a year, but on one prefecture's site it's only
築45年(45 years old). That adapter computesREFERENCE_YEAR - 45, and the constant gets bumped every January. - Rentals live in the same lists as sales on several sites. A listing with 賃料 (rent) and no 価格 (price) is skipped.
- One Nuxt site renders almost nothing useful into the markup, but the full property record sits in the
__NUXT_DATA__payload: coordinates, price, images and publication flags. Reading that is far more reliable than scraping the DOM. It also showed that most of its area pages were old, closed listings. A full crawl saw about 4,500 detail pages and kept about 1,300.
Geocoding with a cache
Many listings only give an address, sometimes just a district. Addresses go through the GSI (Geospatial Information Authority of Japan) address search, with Nominatim as a fallback, and every answer is stored in a geocode_cache table so the same town is never looked up twice.
Photos: proxy them, mirror them, gate on them
The crawler doesn't download listing photos. The site serves them through a same-origin /api/photo route with an allowlist of source hosts. It strips JPEG metadata and writes each image into an R2 bucket on first fetch.
I added that mirror the hard way, after a major source went into emergency maintenance and its images vanished overnight. Now a source outage can't blank a listing that has already been seen. The catalogue build also refuses to publish a listing without at least one photo that has been fetched successfully, because a house with no photo is worse than no listing at all.
Hazard data on every card
Japan publishes excellent hazard maps through the GSI Hazard Map Portal: flood depth, landslide zones, tsunami inundation. Each listing is checked against those layers, and the result shows as a small stamp on the card next to the walk to the nearest station. For a buyer looking at a ¥3 million farmhouse from another continent, "is this in a landslide zone?" is the first question, and the akiya banks almost never answer it.
What I'd do again
- SQLite as the single source of truth for crawl state, cache and catalogue.
- Adapters that are allowed to be ugly, behind a normalized record that is not.
- Treating "on request", rentals and closed listings as first-class cases instead of parsing failures.
- A photo gate. Fewer listings, but every one of them looks like a real house.
If you're curious what the result looks like, the map is free to browse. I'm happy to answer questions about any of the adapters in the comments.
