{
 "openapi": "3.1.0",
 "info": {
  "title": "렌탈위키 렌탈료 공개 데이터",
  "version": "1.0.0",
  "description": "판매처가 공개한 가전 렌탈 월 렌탈료를 렌탈위키가 매일 수집·집계한 읽기 전용 데이터입니다. 인증 없음, 카드 할인 전 정상 요금 기준, 순위나 추천이 아닙니다. 파일 형식과 필드 뜻: /data/schema.json, 수집·집계 방법: /methodology. 이용 시 '출처: 렌탈위키(rental.wiki), 기준일 YYYY-MM-DD' 를 표기해 주세요.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://rental.wiki/data-license"
  }
 },
 "servers": [
  {
   "url": "https://rental.wiki"
  }
 ],
 "externalDocs": {
  "description": "데이터 이용 안내",
  "url": "https://rental.wiki/data-license"
 },
 "paths": {
  "/data/price-index.json": {
   "get": {
    "summary": "렌탈료 시세 지수",
    "description": "품목별 월 렌탈료 분포(최저·중앙값·최고), 약정기간·의무사용기간 분포, 관리방식별 값. asOf 가 기준일.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "렌탈료 시세 지수",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/market/index.json": {
   "get": {
    "summary": "주간 리포트 목록",
    "description": "ISO 주차별 리포트 목록과 수집일(asOf), 진행 중 여부.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "주간 리포트 목록",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/market/{week}.json": {
   "get": {
    "summary": "주간 렌탈료 시세 리포트",
    "description": "약정별 중앙값·사분위, 같은 상품의 전주 대비 변화, 판매처별·관리방식별 값, 판매처 간 가격 차이(sellerGap). 마감된 주는 바뀌지 않음.",
    "parameters": [
     {
      "name": "week",
      "in": "path",
      "required": true,
      "description": "ISO 주차",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-W\\d{2}$"
      },
      "example": "2026-W45"
     }
    ],
    "responses": {
     "200": {
      "description": "주간 렌탈료 시세 리포트",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/daily/index.json": {
   "get": {
    "summary": "일별 변동 목록",
    "description": "수집일마다 전 수집일 대비 인하·인상 상품 수.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "일별 변동 목록",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/daily/{day}.json": {
   "get": {
    "summary": "일별 렌탈료 변동",
    "description": "그날 변동이 큰 상품, 품목별·판매처별 수. 같은 판매처 가격끼리만 비교.",
    "parameters": [
     {
      "name": "day",
      "in": "path",
      "required": true,
      "description": "수집일",
      "schema": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "example": "2026-11-13"
     }
    ],
    "responses": {
     "200": {
      "description": "일별 렌탈료 변동",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/history/{id}.json": {
   "get": {
    "summary": "상품별 가격 이력",
    "description": "값이 바뀐 날만 기록한 점(points): d 날짜, m 정상 최저가, c 카드 적용가, o 판매처 최저가, s 판매처별 최저가.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "상품 번호",
      "schema": {
       "type": "string",
       "pattern": "^\\d+$"
      },
      "example": "1064"
     }
    ],
    "responses": {
     "200": {
      "description": "상품별 가격 이력",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/offer-compare.json": {
   "get": {
    "summary": "판매처 가격비교",
    "description": "판매처 3곳 이상이 렌탈하는 모델의 약정별 최저가와 판매처 수.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "판매처 가격비교",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/quality.json": {
   "get": {
    "summary": "데이터 품질 지표",
    "description": "수집 규모, 상품 연결률, 최신성, 수집 안정성, 결측일(continuity).",
    "parameters": [],
    "responses": {
     "200": {
      "description": "데이터 품질 지표",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/corrections.json": {
   "get": {
    "summary": "정정 기록",
    "description": "공개 후 바로잡은 데이터·문구와 이유.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "정정 기록",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/schema.json": {
   "get": {
    "summary": "데이터 파일 형식",
    "description": "history·daily 파일의 형식 버전과 필드 뜻.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "데이터 파일 형식",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "없는 파일"
     }
    }
   }
  },
  "/data/csv/{file}": {
   "get": {
    "summary": "CSV 내려받기",
    "description": "category-prices.csv(품목별 시세), product-lowest-prices.csv(상품별 최저가), price-history.csv(가격 이력).",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "category-prices.csv",
        "product-lowest-prices.csv",
        "price-history.csv"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "CSV",
      "content": {
       "text/csv": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "summary": "MCP 서버 (JSON-RPC 2.0, Streamable HTTP)",
    "description": "읽기 전용 MCP 도구 8개: search_products(렌탈 상품 검색), get_product_price(상품 최저 렌탈료 조회), get_category_stats(품목별 렌탈료 시세), get_price_history(상품 가격 이력), compare_sellers(판매처별 렌탈료 비교), calc_total_cost(약정 총액 계산), get_price_changes(일별 렌탈료 변동 조회), get_market_week(주간 렌탈료 시세 조회). 결과마다 source_url·as_of·citation·license 가 붙습니다. GET 은 405.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "jsonrpc",
         "method"
        ],
        "properties": {
         "jsonrpc": {
          "const": "2.0"
         },
         "id": {},
         "method": {
          "type": "string",
          "examples": [
           "initialize",
           "tools/list",
           "tools/call"
          ]
         },
         "params": {
          "type": "object"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC 응답",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    },
    "x-mcp-tools": [
     {
      "name": "search_products",
      "title": "렌탈 상품 검색",
      "inputSchema": {
       "type": "object",
       "properties": {
        "query": {
         "type": "string",
         "description": "검색어 (예: 정수기, 코웨이, WP610NWA)"
        },
        "brand": {
         "type": "string",
         "description": "브랜드 이름으로 좁히기 (정확히 일치)"
        },
        "category": {
         "type": "string",
         "description": "품목 이름으로 좁히기 (예: 정수기)"
        },
        "limit": {
         "type": "integer",
         "minimum": 1,
         "maximum": 20,
         "description": "결과 수 (기본 10, 최대 20)"
        }
       },
       "required": [
        "query"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "get_product_price",
      "title": "상품 최저 렌탈료 조회",
      "inputSchema": {
       "type": "object",
       "properties": {
        "id": {
         "type": "integer",
         "minimum": 1,
         "description": "상품 번호 (search_products 의 id)"
        }
       },
       "required": [
        "id"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "get_category_stats",
      "title": "품목별 렌탈료 시세",
      "inputSchema": {
       "type": "object",
       "properties": {
        "category": {
         "type": "string",
         "description": "품목 이름 또는 slug"
        }
       },
       "required": [
        "category"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "get_price_history",
      "title": "상품 가격 이력",
      "inputSchema": {
       "type": "object",
       "properties": {
        "id": {
         "type": "integer",
         "minimum": 1,
         "description": "상품 번호"
        },
        "limit": {
         "type": "integer",
         "minimum": 1,
         "maximum": 200,
         "description": "최근 N점 (기본/최대 200)"
        }
       },
       "required": [
        "id"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "compare_sellers",
      "title": "판매처별 렌탈료 비교",
      "inputSchema": {
       "type": "object",
       "properties": {
        "id": {
         "type": "integer",
         "minimum": 1,
         "description": "상품 번호 (search_products 의 id)"
        }
       },
       "required": [
        "id"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "calc_total_cost",
      "title": "약정 총액 계산",
      "inputSchema": {
       "type": "object",
       "properties": {
        "id": {
         "type": "integer",
         "minimum": 1,
         "description": "상품 번호 (search_products 의 id)"
        },
        "months": {
         "type": "integer",
         "minimum": 6,
         "maximum": 120,
         "description": "약정 개월 (예: 36, 48, 60, 72)"
        },
        "care": {
         "type": "string",
         "enum": [
          "방문",
          "자가"
         ],
         "description": "관리방식 (생략하면 전부)"
        }
       },
       "required": [
        "id",
        "months"
       ],
       "additionalProperties": false
      }
     },
     {
      "name": "get_price_changes",
      "title": "일별 렌탈료 변동 조회",
      "inputSchema": {
       "type": "object",
       "properties": {
        "day": {
         "type": "string",
         "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
         "description": "수집일 (예: 2026-11-13). 생략하면 목록"
        },
        "days": {
         "type": "integer",
         "minimum": 1,
         "maximum": 30,
         "description": "목록으로 받을 최근 수집일 수 (기본 7)"
        }
       },
       "additionalProperties": false
      }
     },
     {
      "name": "get_market_week",
      "title": "주간 렌탈료 시세 조회",
      "inputSchema": {
       "type": "object",
       "properties": {
        "week": {
         "type": "string",
         "pattern": "^\\d{4}-W\\d{2}$",
         "description": "ISO 주차 (예: 2026-W45). 생략하면 마감된 최근 주"
        },
        "kind": {
         "type": "string",
         "description": "품목 slug 또는 이름 (예: water-purifier, 정수기)"
        }
       },
       "additionalProperties": false
      }
     }
    ]
   }
  }
 }
}