{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Visa Fee Calculator API",
    "version": "1.0.0",
    "description": "From October 1, 2026, Japan charges residence permit fees by the period of stay granted: ¥33,000 for a 1-year renewal at the counter, up to ¥75,000 for 5 years, and ¥200,000 for permanent residence. See your exact fee, online price, revenue stamps, and employer total.\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-visa-fee.vercel.app"
    }
  ],
  "paths": {
    "/api/fee": {
      "get": {
        "operationId": "japanResidenceFee",
        "summary": "Japan visa / residence permit fee from 2026-10-01: extension, change of status, permanent residence",
        "description": "Japan revised residence permit fees (在留許可手数料) for applications received on or after 2026-10-01. Change of status and period-of-stay extension fees now depend on the period of stay GRANTED: counter ¥10,000 (≤3 months), ¥18,000 (≤6 months), ¥25,000 (<1 year), ¥33,000 (1 year), ¥48,000 (1-3 years), ¥64,000 (3-5 years), ¥75,000 (5+ years); online ¥10,000-¥65,000 plus a ¥330/¥550 payment processing fee. Permanent residence is ¥200,000 (was ¥10,000). Applications received by 2026-09-30 keep the old ¥6,000 counter / ¥5,500 online fee. Returns the fee, online processing fee, per-person and headcount totals, ISA's revenue stamp combination for counter payment, per-year cost, renewals over a horizon, online saving, comparison tiers, notes, official sources, rulesAsOf, and a disclaimer.\n\nExample: https://japan-visa-fee.vercel.app/api/fee?permit=extension&grantedMonths=12&method=counter&applicationDate=2026-10-15",
        "parameters": [
          {
            "name": "permit",
            "in": "query",
            "required": false,
            "description": "extension (在留期間更新), change (在留資格変更), or permanent (永住許可).",
            "schema": {
              "type": "string",
              "description": "extension (在留期間更新), change (在留資格変更), or permanent (永住許可).",
              "enum": [
                "extension",
                "change",
                "permanent"
              ],
              "default": "extension"
            }
          },
          {
            "name": "grantedMonths",
            "in": "query",
            "required": false,
            "description": "Period of stay granted, in months (12 = 1 year, 36 = 3 years, 60 = 5 years). Required unless permit=permanent. Also accepts period=1y/3y/5y/6m.",
            "schema": {
              "type": "integer",
              "description": "Period of stay granted, in months (12 = 1 year, 36 = 3 years, 60 = 5 years). Required unless permit=permanent. Also accepts period=1y/3y/5y/6m.",
              "minimum": 1,
              "maximum": 600
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "description": "counter (paid in revenue stamps) or online (convenience store / bank payment + processing fee).",
            "schema": {
              "type": "string",
              "description": "counter (paid in revenue stamps) or online (convenience store / bank payment + processing fee).",
              "enum": [
                "counter",
                "online"
              ],
              "default": "counter"
            }
          },
          {
            "name": "applicationDate",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD the application was received. Before 2026-10-01 = old fee. Omit = revised fees.",
            "schema": {
              "type": "string",
              "description": "YYYY-MM-DD the application was received. Before 2026-10-01 = old fee. Omit = revised fees."
            }
          },
          {
            "name": "headcount",
            "in": "query",
            "required": false,
            "description": "Number of people (e.g. employees whose fees a company pays).",
            "schema": {
              "type": "integer",
              "description": "Number of people (e.g. employees whose fees a company pays).",
              "default": 1,
              "minimum": 1
            }
          },
          {
            "name": "horizonYears",
            "in": "query",
            "required": false,
            "description": "Years to project repeat applications at the same granted period.",
            "schema": {
              "type": "integer",
              "description": "Years to project repeat applications at the same granted period.",
              "default": 5,
              "minimum": 1,
              "maximum": 30
            }
          },
          {
            "name": "reduction",
            "in": "query",
            "required": false,
            "description": "Applicant qualifies under ISA's narrow reduction guideline (hardship AND humanitarian). Rare.",
            "schema": {
              "type": "boolean",
              "description": "Applicant qualifies under ISA's narrow reduction guideline (hardship AND humanitarian). Rare.",
              "default": false
            }
          }
        ],
        "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": "japanResidenceFeePost",
        "summary": "Japan visa / residence permit fee from 2026-10-01: extension, change of status, permanent residence (JSON body)",
        "description": "Japan revised residence permit fees (在留許可手数料) for applications received on or after 2026-10-01. Change of status and period-of-stay extension fees now depend on the period of stay GRANTED: counter ¥10,000 (≤3 months), ¥18,000 (≤6 months), ¥25,000 (<1 year), ¥33,000 (1 year), ¥48,000 (1-3 years), ¥64,000 (3-5 years), ¥75,000 (5+ years); online ¥10,000-¥65,000 plus a ¥330/¥550 payment processing fee. Permanent residence is ¥200,000 (was ¥10,000). Applications received by 2026-09-30 keep the old ¥6,000 counter / ¥5,500 online fee. Returns the fee, online processing fee, per-person and headcount totals, ISA's revenue stamp combination for counter payment, per-year cost, renewals over a horizon, online saving, comparison tiers, notes, official sources, rulesAsOf, and a disclaimer.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "permit": {
                    "type": "string",
                    "description": "extension (在留期間更新), change (在留資格変更), or permanent (永住許可).",
                    "enum": [
                      "extension",
                      "change",
                      "permanent"
                    ],
                    "default": "extension"
                  },
                  "grantedMonths": {
                    "type": "integer",
                    "description": "Period of stay granted, in months (12 = 1 year, 36 = 3 years, 60 = 5 years). Required unless permit=permanent. Also accepts period=1y/3y/5y/6m.",
                    "minimum": 1,
                    "maximum": 600
                  },
                  "method": {
                    "type": "string",
                    "description": "counter (paid in revenue stamps) or online (convenience store / bank payment + processing fee).",
                    "enum": [
                      "counter",
                      "online"
                    ],
                    "default": "counter"
                  },
                  "applicationDate": {
                    "type": "string",
                    "description": "YYYY-MM-DD the application was received. Before 2026-10-01 = old fee. Omit = revised fees."
                  },
                  "headcount": {
                    "type": "integer",
                    "description": "Number of people (e.g. employees whose fees a company pays).",
                    "default": 1,
                    "minimum": 1
                  },
                  "horizonYears": {
                    "type": "integer",
                    "description": "Years to project repeat applications at the same granted period.",
                    "default": 5,
                    "minimum": 1,
                    "maximum": 30
                  },
                  "reduction": {
                    "type": "boolean",
                    "description": "Applicant qualifies under ISA's narrow reduction guideline (hardship AND humanitarian). Rare.",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "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": "japanResidenceFeeRules",
        "summary": "Full Japan residence permit fee table from 2026-10-01 (all 7 period tiers, counter vs online, permanent residence, stamps)",
        "description": "Returns the dated fee table, payment rules, reduction rule, sources, and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}