{"openapi":"3.1.0","info":{"title":"주거 생활","version":"1.0"},"servers":[{"url":"https://apis.openapi.sk.com/puzzle/residence"}],"components":{"securitySchemes":{"sec0":{"type":"apiKey","in":"header","x-default":"e8wHh2tya84M88aReEpXCa5XTQf3xgo01aZG39k5","name":"appkey"}},"parameters":{"ContentTypeJson":{"name":"Content-Type","description":"application/json","in":"header","required":true,"schema":{"type":"string","default":"application/json"}},"AppKey":{"name":"appKey","in":"header","description":"대시보드>앱>앱키(appKey) 탭에서 조회","required":true,"schema":{"type":"string"}},"KaptCode":{"name":"kaptCode","in":"path","description":"아파트 코드입니다. 국토교통부 공동주택관리정보시스템 기준입니다.","schema":{"type":"string","default":"A13805002"},"required":true},"Category":{"name":"category","in":"path","description":"카테고리 목록에서 조회를 원하는 분류값을 영문으로 입력합니다.","schema":{"type":"string","default":"mart","enum":["school","kindergarden","academy","mart","shoppingmall","move-from","move-to","start-subway-station","destination-subway-station","workplace"]},"required":true},"SchoolType":{"name":"schoolType","in":"query","description":"학교 순위를 조회할 때 학교 종류(e:초등학교, m:중학교, h:고등학교)를 선택합니다.","schema":{"type":"string","default":"e","enum":["e","m","h"]}}},"schemas":{"ResponseStatus":{"type":"object","description":"응답 상태입니다.","properties":{"code":{"type":"string","description":"응답 코드입니다.\n00: 성공\n"},"message":{"type":"string","description":"요청(request) 성공 여부 메시지입니다.\nsuccess: 성공.\n"},"totalCount":{"type":"integer","description":"검색 결과 데이터 건수입니다."}}},"Apt":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"}},"required":["kaptCode","kaptName"]},"YpRate":{"type":"object","properties":{"ypId":{"type":"string","description":"yp id"},"ypName":{"type":"string","description":"yp 이름"},"rate":{"type":"number","description":"rate"}},"required":["ypId","ypName","rate"]},"AptYpRateStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/YpRate"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"PoiRate":{"type":"object","description":"장소 ID와 장소명, 이용 비율입니다.","properties":{"poiId":{"type":"string","description":"poi id"},"poiName":{"type":"string","description":"poi 이름"},"rate":{"type":"number","description":"rate"}},"required":["poiId","poiName","rate"]},"AptPoiRateStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/PoiRate"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"SimilarAptRawMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"apt code"},"kaptName":{"type":"string","description":"apt 이름"},"similarity":{"type":"number","description":"rate"}},"required":["kaptCode","kaptName","similarity"]},"AptSimilarAptRawMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"raw":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/SimilarAptRawMonthly"}},"yearMonth":{"type":"string","description":"기준 월"}},"required":["kaptCode","kaptName","raw","yearMonth"]},"SubwayStationRate":{"type":"object","properties":{"stationCode":{"type":"string","description":"station code"},"stationName":{"type":"string","description":"station 이름"},"rate":{"type":"number","description":"rate"}},"required":["stationCode","stationName","rate"]},"AptSubwayStationStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/SubwayStationRate"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"},"gender":{"type":"string","description":"성별 (male:남성, female:여성, all:전체)","enum":["male","female","all"]},"ageGrp":{"type":"string","description":"연령대 (10:10대, 20:20대, 30:30대, 40:40대, 50:50대, 60_over:60대이상, all:전체)","enum":["10","20","30","40","50","60_over","all"]}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate","gender","ageGrp"]},"Rate":{"type":"object","properties":{"rate":{"type":"number","description":"rate"}},"required":["rate"]},"AptSubwayUseRateStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","allOf":[{"$ref":"#/components/schemas/Rate"}]},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"DistrictRate":{"type":"object","properties":{"districtCode":{"type":"string","description":"법정동 코드"},"districtName":{"type":"string","description":"법정동 이름"},"rate":{"type":"number","description":"rate"},"avgDuration":{"type":"number","description":"평균 머무른 시간(초)"}},"required":["districtCode","districtName","rate","avgDuration"]},"AptWorkplaceStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/DistrictRate"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"AptMoveStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/Apt"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"DemoStat":{"type":"object","properties":{"gender":{"type":"string","description":"성별"},"avgAge":{"type":"number","description":"평균연령"},"ctpAvgAge":{"type":"number","description":"시도 평균연령"},"sigAvgAge":{"type":"number","description":"시군구 평균연령"}},"required":["gender","avgAge","ctpAvgAge","sigAvgAge"]},"AptResidentDemoStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/DemoStat"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"FeatureLift":{"type":"object","properties":{"feature":{"type":"string","description":"demo feature"},"lift":{"type":"number","description":"lift"}},"required":["feature","lift"]},"AptResidentFeatureStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/FeatureLift"}},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","yearMonth","statStartDate","statEndDate"]},"AptSchoolStatMonthly":{"type":"object","properties":{"kaptCode":{"type":"string","description":"아파트 코드(국토부 기준)"},"kaptName":{"type":"string","description":"아파트 이름(국토부 기준)"},"stat":{"description":"통계 데이터","type":"array","items":{"$ref":"#/components/schemas/PoiRate"}},"schoolType":{"type":"string","description":"학교 종류"},"yearMonth":{"type":"string","description":"기준 월"},"statStartDate":{"type":"string","description":"통계 시작일"},"statEndDate":{"type":"string","description":"통계 종료일"}},"required":["kaptCode","kaptName","stat","schoolType","yearMonth","statStartDate","statEndDate"]}}},"security":[{"sec0":[]}],"paths":{"/meta/apts":{"get":{"tags":["Apartment"],"summary":"데이터 제공 가능 아파트","description":"* 주거 생활 데이터를 제공하는 아파트의 코드와 아파트명을 조회합니다.\n","operationId":"apts","parameters":[{"$ref":"#/components/parameters/ContentTypeJson"},{"$ref":"#/components/parameters/AppKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"contents":{"type":"array","items":{"$ref":"#/components/schemas/Apt"}}}},"examples":{"Result":{"value":"{\n \"status\": {\n \"code\": \"00\",\n \"message\": \"success\",\n \"totalCount\": 1\n },\n \"contents\": [\n {\n \"kaptCode\": \"A10024502\",\n \"kaptName\": \"신대증흥S클래스10단지아파트\"\n }\n ]\n}"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"examples":{"InvalidParameter":{"value":{"error":{"code":"400","message":"INVALID_PARAMETER_NAME"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}},"examples":{"Unauthorized":{"value":{"error":{"id":"401","category":"gw","code":"UNAUTHORIZED","message":"Unauthorized"}}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/paths/~1meta~1apts/get/responses/401/content/application~1json/schema"},"examples":{"ForbiddenAppKey":{"value":{"error":{"id":"403","category":"gw","code":"INVALID_API_KEY","message":"Forbidden"}}},"ForbiddenIP":{"value":{"error":{"id":"403","category":"gw","code":"ACCESS_DENIED","message":"Authorized IP Address only"}}},"ForbiddenURL":{"value":{"error":{"id":"403","category":"gw","code":"MISSING_AUTHENTICATION_TOKEN","message":"Missing Authentication Token"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/paths/~1meta~1apts/get/responses/400/content/application~1json/schema"},"examples":{"NotFound":{"value":{"error":{"code":"404","message":"NOT_FOUND_DATA"}}}}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/paths/~1meta~1apts/get/responses/401/content/application~1json/schema"},"examples":{"Throttled":{"value":{"error":{"id":"429","category":"gw","code":"THROTTLED","message":"Too Many Requests"}}},"QuataExceeded":{"value":{"error":{"id":"429","category":"gw","code":"QUOTA_EXCEEDED","message":"Limit Exceeded"}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/paths/~1meta~1apts/get/responses/401/content/application~1json/schema"},"examples":{"InternalServerError":{"value":{"error":{"id":"500","category":"gw","code":"API_CONFIGURATION_ERROR","message":"Internal server error"}}}}}}},"504":{"description":"Gateway Timeout","content":{"application/json":{"schema":{"$ref":"#/paths/~1meta~1apts/get/responses/401/content/application~1json/schema"},"examples":{"GatewayTimeout":{"value":{"error":{"id":"504","category":"gw","code":"INTEGRATION_FAILURE","message":"Network error communicating with endpoint"}}}}}}}},"deprecated":false}},"/categories/{category}/stat/monthly/apts/{kaptCode}":{"get":{"tags":["Life style"],"summary":"주거생활 카테고리별 순위","description":"* 특정 아파트 주민의 교육(학교, 유아교육, 학원), 쇼핑(대형마트, 쇼핑몰), 이사(이사 온 아파트, 이사 간 아파트), 지하철 출발역·도착역, 근무지역 등 다양한 주거생활의 순위 정보를 제공합니다.\n","operationId":"aptcategories","parameters":[{"$ref":"#/components/parameters/ContentTypeJson"},{"$ref":"#/components/parameters/AppKey"},{"$ref":"#/components/parameters/Category"},{"$ref":"#/components/parameters/KaptCode"},{"$ref":"#/components/parameters/SchoolType"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"contents":{"oneOf":[{"$ref":"#/components/schemas/AptYpRateStatMonthly"},{"$ref":"#/components/schemas/AptPoiRateStatMonthly"},{"$ref":"#/components/schemas/AptSimilarAptRawMonthly"},{"$ref":"#/components/schemas/AptSubwayStationStatMonthly"},{"$ref":"#/components/schemas/AptWorkplaceStatMonthly"},{"$ref":"#/components/schemas/AptMoveStatMonthly"},{"$ref":"#/components/schemas/AptSchoolStatMonthly"}]}}},"examples":{"Result":{"value":"{\n \"status\": {\n \"code\": \"00\",\n \"message\": \"success\",\n \"totalCount\": 1\n },\n \"contents\": [\n {\n \"kaptCode\": \"A13805002\",\n \"kaptName\": \"올림픽선수기자촌아파트\",\n \"stat\": [\n {\n \"ypId\": \"3650775\",\n \"ypName\": \"시대인재학원 입시R&D센터\",\n \"rate\": 3.3185\n },\n {\n \"ypId\": \"1976893\",\n \"ypName\": \"이은재어학원 본관\",\n \"rate\": 2.9408\n },\n {\n \"ypId\": \"3782459\",\n \"ypName\": \"깊은생각 송파본원\",\n \"rate\": 2.7924\n },\n {\n \"ypId\": \"5567783\",\n \"ypName\": \"새움수학원\",\n \"rate\": 2.7789\n },\n {\n \"ypId\": \"2317943\",\n \"ypName\": \"구주이배수학학원 송파점\",\n \"rate\": 2.6305\n }\n ],\n \"yearMonth\": \"202304\",\n \"statStartDate\": \"20230201\",\n \"statEndDate\": \"20230430\"\n }\n ]\n}"}}}}},"400":{"$ref":"#/paths/~1meta~1apts/get/responses/400"},"401":{"$ref":"#/paths/~1meta~1apts/get/responses/401"},"403":{"$ref":"#/paths/~1meta~1apts/get/responses/403"},"404":{"$ref":"#/paths/~1meta~1apts/get/responses/404"},"429":{"$ref":"#/paths/~1meta~1apts/get/responses/429"},"500":{"$ref":"#/paths/~1meta~1apts/get/responses/500"},"504":{"$ref":"#/paths/~1meta~1apts/get/responses/504"}},"deprecated":false}},"/resident/subway-use-rate/stat/monthly/apts/{kaptCode}":{"get":{"tags":["Resident"],"summary":"지하철 이용 비율","description":"* 특정 아파트 주민 중 최근 3개월 동안 지하철을 이용한 주민의 비율을 제공합니다.\n","operationId":"aptsubwayuserate","parameters":[{"$ref":"#/components/parameters/ContentTypeJson"},{"$ref":"#/components/parameters/AppKey"},{"$ref":"#/components/parameters/KaptCode"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"contents":{"$ref":"#/components/schemas/AptSubwayUseRateStatMonthly"}}},"examples":{"Result":{"value":"{\n \"status\": {\n \"code\": \"00\",\n \"message\": \"success\",\n \"totalCount\": 1\n },\n \"contents\": [\n {\n \"kaptCode\": \"A13805002\",\n \"kaptName\": \"올림픽선수기자촌아파트\",\n \"stat\": {\n \"rate\": 21.523\n },\n \"yearMonth\": \"202304\",\n \"statStartDate\": \"20230201\",\n \"statEndDate\": \"20230430\"\n }\n ]\n}"}}}}},"400":{"$ref":"#/paths/~1meta~1apts/get/responses/400"},"401":{"$ref":"#/paths/~1meta~1apts/get/responses/401"},"403":{"$ref":"#/paths/~1meta~1apts/get/responses/403"},"404":{"$ref":"#/paths/~1meta~1apts/get/responses/404"},"429":{"$ref":"#/paths/~1meta~1apts/get/responses/429"},"500":{"$ref":"#/paths/~1meta~1apts/get/responses/500"},"504":{"$ref":"#/paths/~1meta~1apts/get/responses/504"}},"deprecated":false}},"/resident/age/stat/monthly/apts/{kaptCode}":{"get":{"tags":["Resident"],"summary":"거주자 평균 나이","description":"* 특정 아파트 주민의 평균 나이를 제공합니다.\n","operationId":"aptresidentage","parameters":[{"$ref":"#/components/parameters/ContentTypeJson"},{"$ref":"#/components/parameters/AppKey"},{"$ref":"#/components/parameters/KaptCode"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"contents":{"$ref":"#/components/schemas/AptResidentDemoStatMonthly"}}},"examples":{"Result":{"value":"{\n \"status\": {\n \"code\": \"00\",\n \"message\": \"success\",\n \"totalCount\": 1\n },\n \"contents\": [\n {\n \"kaptCode\": \"A13805002\",\n \"kaptName\": \"올림픽선수기자촌아파트\",\n \"stat\": [\n {\n \"gender\": \"male\",\n \"avgAge\": 47.10608552631579,\n \"ctpAvgAge\": 46.71051679606173,\n \"sigAvgAge\": 46.36388996628577\n },\n {\n \"gender\": \"female\",\n \"avgAge\": 46.66177669111654,\n \"ctpAvgAge\": 47.22532359178899,\n \"sigAvgAge\": 46.16058659909418\n }\n ],\n \"yearMonth\": \"202304\",\n \"statStartDate\": \"20230201\",\n \"statEndDate\": \"20230430\"\n }\n ]\n}"}}}}},"400":{"$ref":"#/paths/~1meta~1apts/get/responses/400"},"401":{"$ref":"#/paths/~1meta~1apts/get/responses/401"},"403":{"$ref":"#/paths/~1meta~1apts/get/responses/403"},"404":{"$ref":"#/paths/~1meta~1apts/get/responses/404"},"429":{"$ref":"#/paths/~1meta~1apts/get/responses/429"},"500":{"$ref":"#/paths/~1meta~1apts/get/responses/500"},"504":{"$ref":"#/paths/~1meta~1apts/get/responses/504"}},"deprecated":false}},"/resident/demo-feature/stat/monthly/apts/{kaptCode}":{"get":{"tags":["Resident"],"summary":"거주자 특징","description":"* 동일 시도 대비 해당 아파트 주민 구성의 비율이 높은 Life stage(영유아, 초등학생, 중학생, 고등학생, 대학생, 1인가구, 신혼부부, 시니어) 값을 제공합니다.\n","operationId":"aptresidentdemo","parameters":[{"$ref":"#/components/parameters/ContentTypeJson"},{"$ref":"#/components/parameters/AppKey"},{"$ref":"#/components/parameters/KaptCode"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"contents":{"$ref":"#/components/schemas/AptResidentFeatureStatMonthly"}}},"examples":{"Result":{"value":"{\n \"status\": {\n \"code\": \"00\",\n \"message\": \"success\",\n \"totalCount\": 1\n },\n \"contents\": [\n {\n \"kaptCode\": \"A13805002\",\n \"kaptName\": \"올림픽선수기자촌아파트\",\n \"stat\": [\n {\n \"feature\": \"대학생\",\n \"lift\": 1.44\n },\n {\n \"feature\": \"고등학생\",\n \"lift\": 1.31\n },\n {\n \"feature\": \"중학생\",\n \"lift\": 1.24\n },\n {\n \"feature\": \"60+\",\n \"lift\": 1.06\n }\n ],\n \"yearMonth\": \"202304\",\n \"statStartDate\": \"20230201\",\n \"statEndDate\": \"20230430\"\n }\n ]\n}"}}}}},"400":{"$ref":"#/paths/~1meta~1apts/get/responses/400"},"401":{"$ref":"#/paths/~1meta~1apts/get/responses/401"},"403":{"$ref":"#/paths/~1meta~1apts/get/responses/403"},"404":{"$ref":"#/paths/~1meta~1apts/get/responses/404"},"429":{"$ref":"#/paths/~1meta~1apts/get/responses/429"},"500":{"$ref":"#/paths/~1meta~1apts/get/responses/500"},"504":{"$ref":"#/paths/~1meta~1apts/get/responses/504"}},"deprecated":false}}},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true,"samples-enabled":true},"x-readme-fauxas":true}