{
  "openapi": "3.1.0",
  "info": {
    "title": "House Rules Check API",
    "version": "1.0.0",
    "description": "Paste your Airbnb house rules (English or Japanese) and see which ones are likely not allowed under Airbnb's new house rules policy for reservations booked from 2026-11-20 (dishes, stripping beds, trash off-site, fines, fees, ID, contracts, off-platform check-in, rules added after booking), with compliant rewrites and Japan minpaku guest-register notes.\n\nFree, no API key, CORS open. Fair use: about 120 requests per minute per IP. Also available as MCP tools at https://free-agent-tools.vercel.app/mcp"
  },
  "servers": [
    {
      "url": "https://house-rules-check.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "houseRulesCheck",
        "summary": "Which of these Airbnb house rules / requests are likely not allowed under Airbnb's house rules policy for reservations booked on or after 2026-11-20, and how to rewrite them (EN/JA, with Japan 民泊 guest-register notes)?",
        "description": "Splits pasted house rules (English or Japanese) into items and classifies each with keyword patterns based on Airbnb's help article 4168 and its 2026-10-20 announcement: likely_flagged (cleaner tasks such as washing/putting away dishes, stripping beds, laundry, taking trash off-site; fines or penalties; restricting advertised amenities; separate contracts; ID or personal info; off-platform registration; rules added after booking by message/sign), review, move_to_section (mandatory fees → Pricing, HOA/local fines → Local rules, check-in times), legal_exception (Japan: guest register and passport copy under 住宅宿泊事業法 art. 8 / 旅館業法 art. 6 if disclosed in Requests before booking), use_standard_rule (max guests, quiet hours, events, pets, smoking, commercial photography, lock up), likely_ok (dishes in the sink, gather towels, sort trash into indoor bins, turn off AC, optional add-ons, safety info, local exceptions) or no_match. Returns verdict (fix_needed | review_needed | tidy_up | looks_ok), headline, summary, policy {appliesToBookingsFrom, appliesToThisBooking, daysUntilPolicy}, counts, items [{text, finding, reasons, reasonsJa, rewrite, moveTo, japanNote}], standardRulesToSet, japanChecklist, sources, rulesAsOf and disclaimer. Likely outcomes only; Airbnb decides.\n\nExample: https://house-rules-check.vercel.app/api/check?text=Please%20wash%20the%20dishes%20before%20checkout.%0ANo%20smoking%2C%20%24250%20fine.%0AQuiet%20hours%2010pm-8am.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "House rules / requests to check, one per line (English or Japanese). Max 8000 chars, 80 items. POST may send `rules` as an array instead.",
            "schema": {
              "type": "string",
              "description": "House rules / requests to check, one per line (English or Japanese). Max 8000 chars, 80 items. POST may send `rules` as an array instead."
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "JP adds Japan legal exceptions (guest register, passport copy) and notes; other = generic.",
            "schema": {
              "type": "string",
              "description": "JP adds Japan legal exceptions (guest register, passport copy) and notes; other = generic.",
              "enum": [
                "JP",
                "other"
              ],
              "default": "JP"
            }
          },
          {
            "name": "lodging",
            "in": "query",
            "required": false,
            "description": "Japan licence type: minpaku (住宅宿泊事業法) | ryokan (旅館業法: hotel, ryokan, 簡易宿所) | unknown.",
            "schema": {
              "type": "string",
              "description": "Japan licence type: minpaku (住宅宿泊事業法) | ryokan (旅館業法: hotel, ryokan, 簡易宿所) | unknown.",
              "enum": [
                "minpaku",
                "ryokan",
                "unknown"
              ],
              "default": "unknown"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "description": "Where the rules are communicated: listing (House rules and requests section) | message | sign | in_person. Anything outside the listing can't add new rules.",
            "schema": {
              "type": "string",
              "description": "Where the rules are communicated: listing (House rules and requests section) | message | sign | in_person. Anything outside the listing can't add new rules.",
              "enum": [
                "listing",
                "message",
                "sign",
                "in_person"
              ],
              "default": "listing"
            }
          },
          {
            "name": "bookingDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD date the reservation was booked (policy covers bookings on or after 2026-11-20).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD date the reservation was booked (policy covers bookings on or after 2026-11-20)."
            }
          },
          {
            "name": "today",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (default: today in Japan).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD (default: today in Japan)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result as JSON. Always includes a `disclaimer` field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input. The body explains what to send and gives an example."
          },
          "429": {
            "description": "Too many requests from one IP. Retry after the Retry-After seconds."
          }
        }
      },
      "post": {
        "operationId": "houseRulesCheckPost",
        "summary": "Which of these Airbnb house rules / requests are likely not allowed under Airbnb's house rules policy for reservations booked on or after 2026-11-20, and how to rewrite them (EN/JA, with Japan 民泊 guest-register notes)? (JSON body)",
        "description": "Splits pasted house rules (English or Japanese) into items and classifies each with keyword patterns based on Airbnb's help article 4168 and its 2026-10-20 announcement: likely_flagged (cleaner tasks such as washing/putting away dishes, stripping beds, laundry, taking trash off-site; fines or penalties; restricting advertised amenities; separate contracts; ID or personal info; off-platform registration; rules added after booking by message/sign), review, move_to_section (mandatory fees → Pricing, HOA/local fines → Local rules, check-in times), legal_exception (Japan: guest register and passport copy under 住宅宿泊事業法 art. 8 / 旅館業法 art. 6 if disclosed in Requests before booking), use_standard_rule (max guests, quiet hours, events, pets, smoking, commercial photography, lock up), likely_ok (dishes in the sink, gather towels, sort trash into indoor bins, turn off AC, optional add-ons, safety info, local exceptions) or no_match. Returns verdict (fix_needed | review_needed | tidy_up | looks_ok), headline, summary, policy {appliesToBookingsFrom, appliesToThisBooking, daysUntilPolicy}, counts, items [{text, finding, reasons, reasonsJa, rewrite, moveTo, japanNote}], standardRulesToSet, japanChecklist, sources, rulesAsOf and disclaimer. Likely outcomes only; Airbnb decides.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "House rules / requests to check, one per line (English or Japanese). Max 8000 chars, 80 items. POST may send `rules` as an array instead."
                  },
                  "rules": {
                    "type": "array",
                    "description": "POST only: rules as an array of strings (alternative to text).",
                    "items": {
                      "type": "string"
                    }
                  },
                  "jurisdiction": {
                    "type": "string",
                    "description": "JP adds Japan legal exceptions (guest register, passport copy) and notes; other = generic.",
                    "enum": [
                      "JP",
                      "other"
                    ],
                    "default": "JP"
                  },
                  "lodging": {
                    "type": "string",
                    "description": "Japan licence type: minpaku (住宅宿泊事業法) | ryokan (旅館業法: hotel, ryokan, 簡易宿所) | unknown.",
                    "enum": [
                      "minpaku",
                      "ryokan",
                      "unknown"
                    ],
                    "default": "unknown"
                  },
                  "channel": {
                    "type": "string",
                    "description": "Where the rules are communicated: listing (House rules and requests section) | message | sign | in_person. Anything outside the listing can't add new rules.",
                    "enum": [
                      "listing",
                      "message",
                      "sign",
                      "in_person"
                    ],
                    "default": "listing"
                  },
                  "bookingDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD date the reservation was booked (policy covers bookings on or after 2026-11-20)."
                  },
                  "today": {
                    "type": "string",
                    "description": "YYYY-MM-DD (default: today in Japan)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result as JSON. Always includes a `disclaimer` field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input. The body explains what to send and gives an example."
          },
          "429": {
            "description": "Too many requests from one IP. Retry after the Retry-After seconds."
          }
        }
      }
    },
    "/api/rules": {
      "get": {
        "operationId": "houseRulesPolicy",
        "summary": "Airbnb house rules policy summary (bookings from 2026-11-20): 7 standard rules, requirements, generally-not-allowed requests, allowed examples, Japan guest-register / explanation-duty / trash rules, sources",
        "description": "Returns the rules the checker applies, with Airbnb, e-Gov and MLIT sources and the disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}