API documentation
The only structured, license-clean, machine-native floorplan corpus. Built for spatial AI, generative design, and architecture agents. 📐🏗️ 48,516 real layouts as room graphs and metric geometry, behind two paid endpoints.
Overview
Base URL: https://api.archibase.dev. Responses are JSON. Areas are in square metres and coordinates in metres unless you ask for units=imperial.
| Endpoint | Price | Returns |
|---|---|---|
GET /api/v1/plans/search | $0.02 | Up to 100 plans with room graphs, counts and provenance |
GET /api/v1/plans/{plan_id}/vector | $0.10 | One plan's room polygons, doors, windows and stairs |
GET /.well-known/x402.json | free | Machine-readable discovery: prices, payment terms, JSON Schemas |
GET /api/v1/sample | free | A fixed sample of real plans in the same format, with free geometry at /api/v1/sample/{plan_id}/vector |
GET /api/v1/count | free | How many plans a search would match (same filters as search), so you can size a query before paying |
GET /api/v1/account | free | Balance of an API key |
GET /llms.txt | free | Plain-text summary for AI tools |
Want to contribute or convert your own plans? The free agent skill teaches any agent to turn a drawing into this format and validate it.
For AI assistants, the archibase-mcp server wraps both endpoints with spending limits. See the quick start on the home page.
Payment (x402)
Archibase uses x402 v2. Paid calls settle in USDC on Base (eip155:8453), Polygon (eip155:137) or Arbitrum One (eip155:42161). The payment is a signed USDC authorisation that the facilitator submits, so the paying wallet needs no ETH for gas.
- Call an endpoint without payment. A valid request returns
402 Payment Requiredwith aPAYMENT-REQUIREDheader (base64 JSON) and the same terms in the body: amount in USDC base units (6 decimals), asset, network and recipient. - Sign the payment with an x402 client and repeat the request with the
PAYMENT-SIGNATUREheader (X-PAYMENTis also accepted). - The response carries the data and a
PAYMENT-RESPONSEheader with the settlement transaction.
Queries are validated before payment: a malformed query (400) or an unknown plan (404) is never charged. If the payment service is unreachable you get a retryable 503 and nothing is charged.
API keys
Trials and partners can be issued an API key (kaizim@archibase.dev). Send it on the same endpoints as X-API-Key: ak_… or Authorization: Bearer ak_…; calls are spent from the key's balance at the same prices ($0.02 per search, $0.10 per plan's geometry) and refunded if the request fails.
curl -H "X-API-Key: ak_…" "https://api.archibase.dev/api/v1/plans/search?bedrooms=3&m2_max=90"
- Balance:
GET /api/v1/accountwith the key returnsbalance_usd. Every successful paid response carriesX-Archibase-Credits-Remaining. - An unknown or disabled key gets
401 invalid_api_key. An empty balance gets402 insufficient_creditswith the balance. Keys go in headers, never in URLs.
Free sample and counts
GET https://api.archibase.dev/api/v1/sample accepts the same filters as search and returns a fixed set of real plans, each with a free geometry link, so you can write and test your parser before paying. GET https://api.archibase.dev/api/v1/count returns how many plans a search would match, with the price. Both are free and cached; the sample never grows beyond its fixed set. Or just try it in the browser.
Search
GET https://api.archibase.dev/api/v1/plans/search: $0.02 per call. Results are sorted by area, smallest first.
| Parameter | Type | Meaning |
|---|---|---|
bedrooms | integer 0–20 | Exact bedroom count (labelled plus inferred; see bedrooms_inferred) |
m2_min, m2_max | number | Net interior area bounds in m², inclusive |
sqft_min, sqft_max | number | Same in square feet. Don't mix with the m² bounds |
built | true / false | Only plans of constructed buildings, or only unbuilt designs |
source | string | dataset, habs, commissioned, synthetic, ai_generated |
building_type | string | residential, office, retail, transport, government, sports, hospitality, healthcare, cultural, education, industrial, mixed, other |
style | string | Architectural style where known (most records are unspecified) |
include_duplicates | true / false | Default false: one plan per layout. True returns every copy |
units | metric / imperial | imperial returns total_sqft and room areas in sqft |
limit | integer 1–100 | Maximum results (default 25) |
curl -i "https://api.archibase.dev/api/v1/plans/search?bedrooms=2&m2_min=60&m2_max=80&limit=10"
The response is { count, units, filters, results: [record, …] }. Each record's vector_schema_url is the paid geometry URL for that plan, or null when it has no geometry.
Geometry
GET https://api.archibase.dev/api/v1/plans/{plan_id}/vector: $0.10 per plan. Optional units=imperial for feet.
| Field | Meaning |
|---|---|
rooms[] | { id, type, level, polygon }. Ids match the search record's graph nodes |
doors[] | { type, level, polygon }; type is door or entrance_door |
windows[] | { level, polygon } |
stairs[] | Stair zones: { id, level, polygon }, plus to_level/from_level, risers, start/end, run and rise where known |
polygon | A list of polygons; each is [outer ring, …holes], each ring a closed list of [x, y] points |
crs | How coordinates are framed. Plan-local; compass orientation is not always known |
Record format
| Field | Meaning |
|---|---|
plan_id | Stable id. The prefix shows the source: sd- Swiss Dwellings, rp- ResPlan, habs- HABS, hk- Hong Kong 3D Indoor Map |
building_type | What the building is used for (absent means residential). Non-residential plans are one floor each, with level and level_name in the graph |
total_area_m2 | Net interior area (balconies and other exterior spaces excluded) |
bedrooms, bedrooms_inferred | Bedrooms, and how many of them were inferred rather than labelled by the source |
bathrooms | Full bathrooms count 1, toilet-only rooms 0.5 where the source distinguishes them |
layout_copies | How many plans in the catalogue share this exact layout, this one included |
adjacency_graph.nodes[] | Rooms: id, type, area (m²), windows, and where known fixtures, exterior, stairwell, inferred_use |
adjacency_graph.edges[] | Undirected links { from, to, connection } |
provenance | source, built, license, author, source_url and attribution text |
Connections
| connection | Meaning |
|---|---|
door | A door between the two spaces |
opening | Open connection with no wall between (e.g. an open kitchen) |
entrance_door | The front door, linking the dwelling to an exterior or shared-circulation node |
window | A window between two spaces, e.g. a room looking onto a balcony |
stair | A stair linking rooms on different levels |
adjacent | The spaces touch, but the source records no door or opening |
Rooms the source didn't label
Some sources mark private rooms only as room. These are never relabelled. They keep type: "room" with an inferred_use of bedroom, entry or unknown, based on daylight, size and connections, and inferred bedrooms are counted in bedrooms_inferred.
Errors
| Status | Body | Charged? |
|---|---|---|
| 400 | { error: "invalid_query", details, schema } | No |
| 401 | { error: "invalid_api_key" } (API key requests only) | No |
| 402 (credits) | { error: "insufficient_credits", balance_usd, price_usd, contact } | No |
| 402 | Payment terms (unpaid request, or a payment that was not accepted) | No |
| 404 | { error: "vector_not_found", plan_id } | No |
| 503 | { error: "payment_facilitator_unavailable", retryable: true }; retry after the Retry-After seconds | No |
| 500 | { error: "internal_error" } | Payment is only settled after the data is ready |
Data terms
These terms describe how the data may be used. They summarise the licences of the underlying sources, so read the licence named in each record for the full conditions.
- Licences. Every record names its licence. Only licences that allow commercial use are accepted: public domain, CC0, CC BY 4.0, the Hong Kong Government's CSDI Portal terms (
HK-CSDI-TOU), and data Archibase owns. - Attribution. CC BY 4.0 records (Swiss Dwellings, ResPlan) and Hong Kong records require attribution; Hong Kong records also acknowledge the Government's ownership of the source data. Keep the record's
attributiontext with the data or anything you publish from it. Records also note that Archibase modified the source data. - Derived and inferred fields. Room graphs, window counts and inferred room uses are derived by Archibase from the source geometry. They are checked but may contain errors. The data is provided as is, without warranty of fitness for any purpose, and is not a substitute for surveyed or professional drawings.
- Payments. Each paid request is settled on-chain and is final. Requests that fail before the data is returned are not charged.
- Removal requests. Some source plans were recovered from public listings. If you hold rights in a plan and want it removed, write to kaizim@archibase.dev with the
plan_id. Removed plans are deleted from the catalogue. - Dataset licences. For bulk access to the full catalogue (training, benchmarks, products), write to kaizim@archibase.dev.
Sources
| Source | Distinct layouts | Licence |
|---|---|---|
| Swiss DwellingsApartments in built Swiss buildings | 24,935 | CC BY 4.0Archilyse AG |
| ResPlanSouth Asian homes and apartments from real-estate listings | 16,454 | CC BY 4.0Abouagour & Garyfallidis |
| Hong Kong 3D Indoor MapFloors of offices, industrial buildings, stations, malls and public buildings | 7,124 | HK Gov. CSDI termsLands Department, HKSAR |
| HABSHistoric US houses, measured drawings | 3 | Public domainLibrary of Congress |