{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Pet Quarantine Check API",
    "version": "1.0.0",
    "description": "Bringing a dog or cat to Japan, taking it abroad, or leaving and coming back? Get the earliest arrival date (180 days after the antibody blood draw), the 40-day AQS notice deadline, the 10-day vet-check window, the 14-day export application (mandatory for dogs and rabbits from 2027-01-01) and how many days of detention an early arrival means.\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://japan-pet-quarantine.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "japanPetQuarantineCheck",
        "summary": "Bringing a dog or cat into Japan, taking it out, or leaving and coming back: which dates work and what is due when?",
        "description": "Applies the MAFF Animal Quarantine Service (AQS, 動物検疫所) rules for dogs and cats (rules as of 2026-10-31). direction=import from a non-designated region (most countries incl. the US mainland, UK, EU, Canada, Asia): microchip (ISO, on or before the 1st shot), rabies shot #1 at 91+ days old, #2 30+ days later within #1's effective period, blood draw on/after #2 at a MAFF-designated lab (≥0.5 IU/ml, valid 2 years), earliest arrival = draw + 180 days (draw = day 0), early arrival = detention for the missing days, 40-day advance notice (NACCS), clinical inspection within 10 days before boarding, dogs only via 19 ports, register dogs with the city within 30 days. From a designated region (Iceland, Australia, New Zealand, Fiji, Hawaii, Guam): chip + residence (180 days / since birth) + notice + Form AB, no wait. direction=export: apply for export inspection 14+ days before (mandatory for dogs and rabbits exported from 2027-01-01), inspection within 10 days before departure. direction=return: prepare in Japan before leaving → no 180-day wait abroad, ≤12 h quarantine on return. Rabbits: only the 2027 dated deadlines. Returns verdict (on_track | plan | quarantine_risk | deadline_passed | redo_required), summary, steps[{step, date, status, rule}], dates {earliestArrival, antibodyValidUntil, notifyAqsBy, preDepartureInspectionFrom/To, exportApplyBy, exportInspectionFrom/To, registerDogBy}, exportApplication {mandatory, rule}, quarantine {expected, days, reason}, fastestPlan (if prep is incomplete), actions, warnings, ports (dogs), sources, disclaimer.\n\nExample: https://japan-pet-quarantine.vercel.app/api/check?direction=import&species=dog&country=US&birthDate=2026-03-01&microchipDate=2026-06-10&vaccine1Date=2026-06-10&vaccine2Date=2026-07-20&bloodDrawDate=2026-08-05&titer=2.1&arrivalDate=2027-06-15",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": true,
            "description": "import (bring a pet into Japan) | export (take it out of Japan) | return (leave Japan short-term and come back; prep done in Japan). Aliases: to_japan, leaving, round_trip, 輸入, 輸出, 一時帰国…",
            "schema": {
              "type": "string",
              "description": "import (bring a pet into Japan) | export (take it out of Japan) | return (leave Japan short-term and come back; prep done in Japan). Aliases: to_japan, leaving, round_trip, 輸入, 輸出, 一時帰国…",
              "enum": [
                "import",
                "export",
                "return"
              ]
            }
          },
          {
            "name": "species",
            "in": "query",
            "required": true,
            "description": "dog | cat | rabbit (rabbit: only the 2027 dated deadlines). Aliases: 犬, 猫, うさぎ.",
            "schema": {
              "type": "string",
              "description": "dog | cat | rabbit (rabbit: only the 2027 dated deadlines). Aliases: 犬, 猫, うさぎ.",
              "enum": [
                "dog",
                "cat",
                "rabbit"
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "import: where the pet comes from (ISO code or name). IS, AU, NZ, FJ, Hawaii (US-HI), Guam (GU) → designated; anything else → other.",
            "schema": {
              "type": "string",
              "description": "import: where the pet comes from (ISO code or name). IS, AU, NZ, FJ, Hawaii (US-HI), Guam (GU) → designated; anything else → other."
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "import: other (default, non-designated) | designated. Overrides country.",
            "schema": {
              "type": "string",
              "description": "import: other (default, non-designated) | designated. Overrides country.",
              "enum": [
                "other",
                "designated"
              ]
            }
          },
          {
            "name": "birthDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD pet's date of birth.",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD pet's date of birth."
            }
          },
          {
            "name": "microchipDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD the ISO microchip was implanted.",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD the ISO microchip was implanted."
            }
          },
          {
            "name": "microchipNumber",
            "in": "query",
            "required": false,
            "description": "Optional 15-digit chip number (checks the 900202 ban and 900-prefix duplicate warning). Not stored.",
            "schema": {
              "type": "string",
              "description": "Optional 15-digit chip number (checks the 900202 ban and 900-prefix duplicate warning). Not stored."
            }
          },
          {
            "name": "vaccine1Date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD first rabies shot counted (after the chip).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD first rabies shot counted (after the chip)."
            }
          },
          {
            "name": "vaccine1ValidUntil",
            "in": "query",
            "required": false,
            "description": "Optional YYYY-MM-DD end of shot #1's effective period (default: 1 year).",
            "schema": {
              "type": "string",
              "description": "Optional YYYY-MM-DD end of shot #1's effective period (default: 1 year)."
            }
          },
          {
            "name": "vaccine2Date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD second rabies shot.",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD second rabies shot."
            }
          },
          {
            "name": "vaccineValidUntil",
            "in": "query",
            "required": false,
            "description": "Optional YYYY-MM-DD end of the latest shot's effective period (to check the arrival / booster).",
            "schema": {
              "type": "string",
              "description": "Optional YYYY-MM-DD end of the latest shot's effective period (to check the arrival / booster)."
            }
          },
          {
            "name": "bloodDrawDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD blood draw for the rabies antibody test (MAFF-designated lab).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD blood draw for the rabies antibody test (MAFF-designated lab)."
            }
          },
          {
            "name": "titer",
            "in": "query",
            "required": false,
            "description": "Optional antibody result in IU/ml (must be ≥0.5; default: assumed passing).",
            "schema": {
              "type": "number",
              "description": "Optional antibody result in IU/ml (must be ≥0.5; default: assumed passing)."
            }
          },
          {
            "name": "residentSince",
            "in": "query",
            "required": false,
            "description": "Designated region: YYYY-MM-DD since when the pet has lived there continuously.",
            "schema": {
              "type": "string",
              "description": "Designated region: YYYY-MM-DD since when the pet has lived there continuously."
            }
          },
          {
            "name": "residentSinceBirth",
            "in": "query",
            "required": false,
            "description": "Designated region: lived there since birth (or since coming directly from Japan).",
            "schema": {
              "type": "boolean",
              "description": "Designated region: lived there since birth (or since coming directly from Japan).",
              "default": false
            }
          },
          {
            "name": "arrivalDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD planned arrival in Japan (import: required; return: the day back).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD planned arrival in Japan (import: required; return: the day back)."
            }
          },
          {
            "name": "departureDate",
            "in": "query",
            "required": false,
            "description": "export / return: YYYY-MM-DD the pet leaves Japan (required). import: optional boarding date abroad (default: arrivalDate).",
            "schema": {
              "type": "string",
              "description": "export / return: YYYY-MM-DD the pet leaves Japan (required). import: optional boarding date abroad (default: arrivalDate)."
            }
          },
          {
            "name": "today",
            "in": "query",
            "required": false,
            "description": "Override today's date (default: today in Japan).",
            "schema": {
              "type": "string",
              "description": "Override today's date (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": "japanPetQuarantineCheckPost",
        "summary": "Bringing a dog or cat into Japan, taking it out, or leaving and coming back: which dates work and what is due when? (JSON body)",
        "description": "Applies the MAFF Animal Quarantine Service (AQS, 動物検疫所) rules for dogs and cats (rules as of 2026-10-31). direction=import from a non-designated region (most countries incl. the US mainland, UK, EU, Canada, Asia): microchip (ISO, on or before the 1st shot), rabies shot #1 at 91+ days old, #2 30+ days later within #1's effective period, blood draw on/after #2 at a MAFF-designated lab (≥0.5 IU/ml, valid 2 years), earliest arrival = draw + 180 days (draw = day 0), early arrival = detention for the missing days, 40-day advance notice (NACCS), clinical inspection within 10 days before boarding, dogs only via 19 ports, register dogs with the city within 30 days. From a designated region (Iceland, Australia, New Zealand, Fiji, Hawaii, Guam): chip + residence (180 days / since birth) + notice + Form AB, no wait. direction=export: apply for export inspection 14+ days before (mandatory for dogs and rabbits exported from 2027-01-01), inspection within 10 days before departure. direction=return: prepare in Japan before leaving → no 180-day wait abroad, ≤12 h quarantine on return. Rabbits: only the 2027 dated deadlines. Returns verdict (on_track | plan | quarantine_risk | deadline_passed | redo_required), summary, steps[{step, date, status, rule}], dates {earliestArrival, antibodyValidUntil, notifyAqsBy, preDepartureInspectionFrom/To, exportApplyBy, exportInspectionFrom/To, registerDogBy}, exportApplication {mandatory, rule}, quarantine {expected, days, reason}, fastestPlan (if prep is incomplete), actions, warnings, ports (dogs), sources, disclaimer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "direction",
                  "species"
                ],
                "properties": {
                  "direction": {
                    "type": "string",
                    "description": "import (bring a pet into Japan) | export (take it out of Japan) | return (leave Japan short-term and come back; prep done in Japan). Aliases: to_japan, leaving, round_trip, 輸入, 輸出, 一時帰国…",
                    "enum": [
                      "import",
                      "export",
                      "return"
                    ]
                  },
                  "species": {
                    "type": "string",
                    "description": "dog | cat | rabbit (rabbit: only the 2027 dated deadlines). Aliases: 犬, 猫, うさぎ.",
                    "enum": [
                      "dog",
                      "cat",
                      "rabbit"
                    ]
                  },
                  "country": {
                    "type": "string",
                    "description": "import: where the pet comes from (ISO code or name). IS, AU, NZ, FJ, Hawaii (US-HI), Guam (GU) → designated; anything else → other."
                  },
                  "origin": {
                    "type": "string",
                    "description": "import: other (default, non-designated) | designated. Overrides country.",
                    "enum": [
                      "other",
                      "designated"
                    ]
                  },
                  "birthDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD pet's date of birth."
                  },
                  "microchipDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD the ISO microchip was implanted."
                  },
                  "microchipNumber": {
                    "type": "string",
                    "description": "Optional 15-digit chip number (checks the 900202 ban and 900-prefix duplicate warning). Not stored."
                  },
                  "vaccine1Date": {
                    "type": "string",
                    "description": "YYYY-MM-DD first rabies shot counted (after the chip)."
                  },
                  "vaccine1ValidUntil": {
                    "type": "string",
                    "description": "Optional YYYY-MM-DD end of shot #1's effective period (default: 1 year)."
                  },
                  "vaccine2Date": {
                    "type": "string",
                    "description": "YYYY-MM-DD second rabies shot."
                  },
                  "vaccineValidUntil": {
                    "type": "string",
                    "description": "Optional YYYY-MM-DD end of the latest shot's effective period (to check the arrival / booster)."
                  },
                  "bloodDrawDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD blood draw for the rabies antibody test (MAFF-designated lab)."
                  },
                  "titer": {
                    "type": "number",
                    "description": "Optional antibody result in IU/ml (must be ≥0.5; default: assumed passing)."
                  },
                  "residentSince": {
                    "type": "string",
                    "description": "Designated region: YYYY-MM-DD since when the pet has lived there continuously."
                  },
                  "residentSinceBirth": {
                    "type": "boolean",
                    "description": "Designated region: lived there since birth (or since coming directly from Japan).",
                    "default": false
                  },
                  "arrivalDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD planned arrival in Japan (import: required; return: the day back)."
                  },
                  "departureDate": {
                    "type": "string",
                    "description": "export / return: YYYY-MM-DD the pet leaves Japan (required). import: optional boarding date abroad (default: arrivalDate)."
                  },
                  "today": {
                    "type": "string",
                    "description": "Override today's date (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": "japanMyNumberCardRules",
        "summary": "Japan dog / cat import and export quarantine rules (AQS): non-designated steps, 180-day wait, 40-day notice, designated regions, export 14-day application (mandatory for dogs and rabbits from 2027-01-01), short stays abroad, 19 dog ports, sources",
        "description": "Returns the rules the checker applies, with ordinance articles, official sources and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}