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.

EndpointPriceReturns
GET /api/v1/plans/search$0.02Up to 100 plans with room graphs, counts and provenance
GET /api/v1/plans/{plan_id}/vector$0.10One plan's room polygons, doors, windows and stairs
GET /.well-known/x402.jsonfreeMachine-readable discovery: prices, payment terms, JSON Schemas
GET /api/v1/samplefreeA fixed sample of real plans in the same format, with free geometry at /api/v1/sample/{plan_id}/vector
GET /api/v1/countfreeHow many plans a search would match (same filters as search), so you can size a query before paying
GET /api/v1/accountfreeBalance of an API key
GET /llms.txtfreePlain-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.

  1. Call an endpoint without payment. A valid request returns 402 Payment Required with a PAYMENT-REQUIRED header (base64 JSON) and the same terms in the body: amount in USDC base units (6 decimals), asset, network and recipient.
  2. Sign the payment with an x402 client and repeat the request with the PAYMENT-SIGNATURE header (X-PAYMENT is also accepted).
  3. The response carries the data and a PAYMENT-RESPONSE header 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"

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.

GET https://api.archibase.dev/api/v1/plans/search: $0.02 per call. Results are sorted by area, smallest first.

ParameterTypeMeaning
bedroomsinteger 0–20Exact bedroom count (labelled plus inferred; see bedrooms_inferred)
m2_min, m2_maxnumberNet interior area bounds in m², inclusive
sqft_min, sqft_maxnumberSame in square feet. Don't mix with the m² bounds
builttrue / falseOnly plans of constructed buildings, or only unbuilt designs
sourcestringdataset, habs, commissioned, synthetic, ai_generated
building_typestringresidential, office, retail, transport, government, sports, hospitality, healthcare, cultural, education, industrial, mixed, other
stylestringArchitectural style where known (most records are unspecified)
include_duplicatestrue / falseDefault false: one plan per layout. True returns every copy
unitsmetric / imperialimperial returns total_sqft and room areas in sqft
limitinteger 1–100Maximum 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.

FieldMeaning
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
polygonA list of polygons; each is [outer ring, …holes], each ring a closed list of [x, y] points
crsHow coordinates are framed. Plan-local; compass orientation is not always known

Record format

FieldMeaning
plan_idStable id. The prefix shows the source: sd- Swiss Dwellings, rp- ResPlan, habs- HABS, hk- Hong Kong 3D Indoor Map
building_typeWhat 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_m2Net interior area (balconies and other exterior spaces excluded)
bedrooms, bedrooms_inferredBedrooms, and how many of them were inferred rather than labelled by the source
bathroomsFull bathrooms count 1, toilet-only rooms 0.5 where the source distinguishes them
layout_copiesHow 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 }
provenancesource, built, license, author, source_url and attribution text

Connections

connectionMeaning
doorA door between the two spaces
openingOpen connection with no wall between (e.g. an open kitchen)
entrance_doorThe front door, linking the dwelling to an exterior or shared-circulation node
windowA window between two spaces, e.g. a room looking onto a balcony
stairA stair linking rooms on different levels
adjacentThe 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

StatusBodyCharged?
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
402Payment 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 secondsNo
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.

Sources

SourceDistinct layoutsLicence
Swiss DwellingsApartments in built Swiss buildings24,935CC BY 4.0Archilyse AG
ResPlanSouth Asian homes and apartments from real-estate listings16,454CC BY 4.0Abouagour & Garyfallidis
Hong Kong 3D Indoor MapFloors of offices, industrial buildings, stations, malls and public buildings7,124HK Gov. CSDI termsLands Department, HKSAR
HABSHistoric US houses, measured drawings3Public domainLibrary of Congress