---
title: "건물 검색 (도면 포함)"
method: GET
path: "/api/v1/building"
tags: ["건물"]
---

# 건물 검색 (도면 포함)

`GET /api/v1/building`

도면이 등록된 건물 목록을 검색합니다.

### 사용처
- 키워드 기반 건물 검색
- 지도 영역(bounding box) 기반 건물 조회
- 면적, 침실/욕실 수 필터링

### 페이지네이션
- offset 기반 페이징 (0부터 시작)
- limit: 페이지 크기 (최소 1, 최대 200)
- 응답의 hasNext로 다음 페이지 존재 여부 확인

### 필터 조건
- keyword: 주소명 / 도로명 / 건물명 / 사용자 설정 건물 별칭 검색
- bottomRightLat, bottomRightLon, topLeftLat, topLeftLon: 지도 영역 필터 (4개 모두 입력하거나 모두 생략)
- minArea, maxArea: 도면 면적 범위 필터 (㎡)
- bedrooms: 침실 수 필터
- bathrooms: 욕실 수 필터
- sort: 정렬 기준 (ID_DESC, ID_ASC, UPDATED_ASC, UPDATED_DESC 등)

## Query parameters

- `offset` integer, required
- `limit` integer, required
- `sortType` 'ID_DESC' | 'ID_ASC' | 'NAME_ASC' | 'NAME_DESC' | 'UPDATED_ASC' | 'UPDATED_DESC' — 정렬 타입
- `keyword` string
- `bottomRightLat` number, double
- `bottomRightLon` number, double
- `topLeftLat` number, double
- `topLeftLon` number, double
- `minArea` number, double
- `maxArea` number, double
- `bedrooms` integer
- `bathrooms` integer

## Response `200`

모든 응답은 200으로 내려갑니다 (성공 실패 포함) (장애상황에서만 5xx 노출)

- ApiResponsePageResponseBuildingResponse
  - `result` 'SUCCESS' | 'FAIL', required — 응답 결과 타입
  - `data` PageResponseBuildingResponse
    - `content` BuildingResponse[], required — 콘텐츠 목록
      - `id` string, required — 건물 ID
      - `enterpriseId` string — 기업 ID
      - `userId` string — 사용자 ID
      - `access` string, required — 접근 유형
      - `lat` number, double, required — 위도
      - `lng` number, double, required — 경도
      - `floorplanDetails` BuildingFloorplanDetail[], required — 도면 상세 목록
        - `id` string, required — 도면 ID
        - `mapFloorplanId` string, required — 맵 도면 ID
        - `preview` string — 미리보기 이미지 URL
        - `status` 'CREATED' | 'WORKING' | 'TESTING' | 'COMPLETED' | 'FAILED', required — 도면 상태
        - `areaInfo` BuildingAreaInfo, required
          - `areaType` string, required — 면적 유형
          - `area` string, required — 면적
          - `supplyArea` number, double, required — 공급 면적 (㎡)
          - `exclusiveArea` number, double, required — 전용 면적 (㎡)
        - `assign` BuildingAssign, required
          - `userId` string — 담당자 사용자 ID
          - `email` string — 담당자 이메일
        - `mapFloorplanRoomDetail` MapFloorplanDetailRoomResponse
          - `area` number, double — 면적 (㎡)
          - `roomCounts` BuildingRoomCounts, required
            - `bedrooms` integer, required — 침실 수
            - `bathrooms` integer, required — 욕실 수
        - `createdAt` string, date-time, required — 생성일시
        - `updatedAt` string, date-time, required — 수정일시
      - `address` BuildingAddress, required
        - `numberAddress` string — 지번 주소
        - `roadAddress` string — 도로명 주소
        - `buildingCode` string — 건물 코드
        - `buildingName` string — 건물명
        - `buildingAliases` string[], required — 건물 별칭 목록
      - `createdAt` string, date-time, required — 생성일시
      - `updatedAt` string, date-time, required — 수정일시
    - `hasNext` boolean, required — 다음 페이지 존재 여부
    - `totalCount` integer, required — 전체 개수
  - `error` ErrorMessage
    - `errorCode` 'INTERNAL_ERROR' | 'BAD_REQUEST' | 'NOT_FOUND' | 'CONFLICT' | 'FORBIDDEN' — 에러 코드
    - `message` string — 에러 메시지

---

[API](https://skmtc.dev/archisketch/apis/open-api.md) · [All operations](https://skmtc.dev/archisketch/apis/open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/archisketch/open-api/revisions/f6b0eda1a99d/schema)
