{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Driving Check API",
    "version": "1.0.0",
    "description": "Can I drive in Japan on my license? Check whether your country needs a Geneva IDP or a Japanese translation (or can't drive at all), your exact last driving day under the 1-year and 3-month rules, and whether you can convert to a Japanese license (外免切替) after the 2025-10-01 changes.\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-driving-check.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "japanDrivingCheck",
        "summary": "Can this person drive in Japan on their foreign license (Geneva IDP or Japanese translation), until which date, and can they convert it to a Japanese license (外免切替) with or without tests?",
        "description": "Applies Road Traffic Act art. 107-2 / 97-2 as described by NPA and the Tokyo police (rules as of 2026-10-27, Geneva list as of May 2026): which document a license from this country needs (1949 Geneva IDP, or a Japanese translation for Switzerland, Germany, France, Belgium, Monaco and Taiwan, or none), the 1-year-from-landing period capped by the IDP's 1-year validity and the license expiry, the residents' 3-month rule for trips abroad, and 外免切替 eligibility (住民票 required since 2025-10-01, 3+ months in the issuing country, test exemptions incl. US states, 50-question knowledge check, Tokyo fees, reported pass rates). Returns verdict (can_drive | not_yet | expired | need_document | not_valid | unclear), headline, summary, howToDrive, period {countStart, lastDay, daysLeft, limits, restarts}, conversion {canApply, blockers, tests, documents, fees, notes}, steps, warnings, sources, rulesAsOf and disclaimer.\n\nExample: https://japan-driving-check.vercel.app/api/check?country=US&usState=CA&document=idp&entryDate=2026-11-01&idpIssueDate=2026-06-15",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "Country/region that issued the driver's license: ISO code (US, GB, CN, TW, DE, HK…) or English/Japanese name.",
            "schema": {
              "type": "string",
              "description": "Country/region that issued the driver's license: ISO code (US, GB, CN, TW, DE, HK…) or English/Japanese name."
            }
          },
          {
            "name": "usState",
            "in": "query",
            "required": false,
            "description": "US licenses: issuing state code (WA, HI, OH… matter for conversion tests).",
            "schema": {
              "type": "string",
              "description": "US licenses: issuing state code (WA, HI, OH… matter for conversion tests)."
            }
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "description": "What the driver holds: idp | translation | license_only | japanese_license | auto (tell me what's needed).",
            "schema": {
              "type": "string",
              "description": "What the driver holds: idp | translation | license_only | japanese_license | auto (tell me what's needed).",
              "enum": [
                "auto",
                "idp",
                "translation",
                "license_only",
                "japanese_license"
              ],
              "default": "auto"
            }
          },
          {
            "name": "residency",
            "in": "query",
            "required": false,
            "description": "visitor (tourist/short-term), resident (residence card, on 住民票), japanese_abroad.",
            "schema": {
              "type": "string",
              "description": "visitor (tourist/short-term), resident (residence card, on 住民票), japanese_abroad.",
              "enum": [
                "visitor",
                "resident",
                "japanese_abroad"
              ],
              "default": "visitor"
            }
          },
          {
            "name": "entryDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD landing date in Japan (residents: the landing that started the count).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD landing date in Japan (residents: the landing that started the count)."
            }
          },
          {
            "name": "trips",
            "in": "query",
            "required": false,
            "description": "Residents: trips abroad since entryDate as left_returned pairs, comma separated, e.g. 2026-08-01_2026-09-10 (3-month rule).",
            "schema": {
              "type": "string",
              "description": "Residents: trips abroad since entryDate as left_returned pairs, comma separated, e.g. 2026-08-01_2026-09-10 (3-month rule)."
            }
          },
          {
            "name": "idpIssueDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD date the IDP was issued (valid 1 year).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD date the IDP was issued (valid 1 year)."
            }
          },
          {
            "name": "licenseExpiry",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD expiry of the home license.",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD expiry of the home license."
            }
          },
          {
            "name": "monthsInIssuingCountry",
            "in": "query",
            "required": false,
            "description": "Conversion: total months spent in the issuing country after getting the license (3+ needed).",
            "schema": {
              "type": "number",
              "description": "Conversion: total months spent in the issuing country after getting the license (3+ needed)."
            }
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "description": "Driver's age (ordinary license from 18; apply from 17.5).",
            "schema": {
              "type": "number",
              "description": "Driver's age (ordinary license from 18; apply from 17.5)."
            }
          },
          {
            "name": "today",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD date to check (default: today in Japan).",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD date to check (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": "japanDrivingCheckPost",
        "summary": "Can this person drive in Japan on their foreign license (Geneva IDP or Japanese translation), until which date, and can they convert it to a Japanese license (外免切替) with or without tests? (JSON body)",
        "description": "Applies Road Traffic Act art. 107-2 / 97-2 as described by NPA and the Tokyo police (rules as of 2026-10-27, Geneva list as of May 2026): which document a license from this country needs (1949 Geneva IDP, or a Japanese translation for Switzerland, Germany, France, Belgium, Monaco and Taiwan, or none), the 1-year-from-landing period capped by the IDP's 1-year validity and the license expiry, the residents' 3-month rule for trips abroad, and 外免切替 eligibility (住民票 required since 2025-10-01, 3+ months in the issuing country, test exemptions incl. US states, 50-question knowledge check, Tokyo fees, reported pass rates). Returns verdict (can_drive | not_yet | expired | need_document | not_valid | unclear), headline, summary, howToDrive, period {countStart, lastDay, daysLeft, limits, restarts}, conversion {canApply, blockers, tests, documents, fees, notes}, steps, warnings, sources, rulesAsOf and disclaimer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "country"
                ],
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "Country/region that issued the driver's license: ISO code (US, GB, CN, TW, DE, HK…) or English/Japanese name."
                  },
                  "usState": {
                    "type": "string",
                    "description": "US licenses: issuing state code (WA, HI, OH… matter for conversion tests)."
                  },
                  "document": {
                    "type": "string",
                    "description": "What the driver holds: idp | translation | license_only | japanese_license | auto (tell me what's needed).",
                    "enum": [
                      "auto",
                      "idp",
                      "translation",
                      "license_only",
                      "japanese_license"
                    ],
                    "default": "auto"
                  },
                  "residency": {
                    "type": "string",
                    "description": "visitor (tourist/short-term), resident (residence card, on 住民票), japanese_abroad.",
                    "enum": [
                      "visitor",
                      "resident",
                      "japanese_abroad"
                    ],
                    "default": "visitor"
                  },
                  "entryDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD landing date in Japan (residents: the landing that started the count)."
                  },
                  "trips": {
                    "type": "string",
                    "description": "Residents: trips abroad since entryDate as left_returned pairs, comma separated, e.g. 2026-08-01_2026-09-10 (3-month rule)."
                  },
                  "idpIssueDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD date the IDP was issued (valid 1 year)."
                  },
                  "licenseExpiry": {
                    "type": "string",
                    "description": "YYYY-MM-DD expiry of the home license."
                  },
                  "monthsInIssuingCountry": {
                    "type": "number",
                    "description": "Conversion: total months spent in the issuing country after getting the license (3+ needed)."
                  },
                  "age": {
                    "type": "number",
                    "description": "Driver's age (ordinary license from 18; apply from 17.5)."
                  },
                  "today": {
                    "type": "string",
                    "description": "YYYY-MM-DD date to check (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": "japanDrivingRules",
        "summary": "Rules for driving in Japan on a foreign license and converting it (外免切替): Geneva IDP country list, translation countries, non-issuers, 1-year and 3-month rules, test exemptions, fees, pass rates, sources",
        "description": "Returns the rules the checker applies, with NPA/Keishicho sources and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}