{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Part-time Work Check API",
    "version": "1.0.0",
    "description": "Student, dependent or work visa in Japan? Check if you can take a part-time job or side gig, whether you need permission for activities outside status (資格外活動許可), if your hours fit the 28-hour rule, and what changed on 2026-10-01 for pachinko, mahjong and game centers.\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-parttime-check.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "japanPartTimeWorkCheck",
        "summary": "Can a foreign resident in Japan do this part-time job or side job on their status of residence, which permission (資格外活動許可) is needed, and are their hours within the 28-hour rule?",
        "description": "Applies the Immigration Services Agency's permission-for-activities-outside-status rules (資格外活動許可, incl. the 2026-10-01 pachinko/mahjong/game-center change for Dependent holders) to one status + job. Returns verdict (ok | ok_if_hours | apply_first | individual_permission | status_change | not_allowed | no_restriction), headline, summary, permissionNeeded (none | comprehensive | individual | status_change | not_available), hours (weeklyLimit 28, dailyLimitOnVacation 8 for students, withinLimit, rolling 7-day windows when dailyHours is given), conditions, documents, steps, warnings, sources, rulesAsOf and disclaimer.\n\nExample: https://japan-parttime-check.vercel.app/api/check?status=dependent&job=pachinko&permission=comprehensive&weeklyHours=20",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "student (留学), dependent (家族滞在), designated_dependent, job_hunting, work_visa, specified_skilled, technical_intern, working_holiday, temporary_visitor, unrestricted (PR / spouse / long-term resident). Aliases: 留学, 家族滞在, tourist, pr…",
            "schema": {
              "type": "string",
              "description": "student (留学), dependent (家族滞在), designated_dependent, job_hunting, work_visa, specified_skilled, technical_intern, working_holiday, temporary_visitor, unrestricted (PR / spouse / long-term resident). Aliases: 留学, 家族滞在, tourist, pr…",
              "enum": [
                "student",
                "dependent",
                "designated_dependent",
                "job_hunting",
                "work_visa",
                "specified_skilled",
                "technical_intern",
                "working_holiday",
                "temporary_visitor",
                "unrestricted"
              ]
            }
          },
          {
            "name": "job",
            "in": "query",
            "required": true,
            "description": "Kind of work/venue. Aliases: konbini, izakaya, uber_eats, eikaiwa, パチンコ, キャバクラ…",
            "schema": {
              "type": "string",
              "description": "Kind of work/venue. Aliases: konbini, izakaya, uber_eats, eikaiwa, パチンコ, キャバクラ…",
              "enum": [
                "restaurant",
                "izakaya_bar",
                "convenience_store",
                "retail",
                "hotel",
                "factory_warehouse",
                "cleaning",
                "office",
                "language_teacher",
                "interpreter_translator",
                "tutor",
                "delivery_employee",
                "delivery_gig",
                "freelance",
                "internship",
                "pachinko",
                "mahjong",
                "game_center",
                "hostess_bar",
                "nightclub",
                "adult"
              ]
            }
          },
          {
            "name": "permission",
            "in": "query",
            "required": false,
            "description": "Permission you already hold: none | comprehensive (28h stamp) | individual | unknown.",
            "schema": {
              "type": "string",
              "description": "Permission you already hold: none | comprehensive (28h stamp) | individual | unknown.",
              "enum": [
                "none",
                "comprehensive",
                "individual",
                "unknown"
              ],
              "default": "unknown"
            }
          },
          {
            "name": "weeklyHours",
            "in": "query",
            "required": false,
            "description": "Total hours in a 7-day period across ALL side jobs.",
            "schema": {
              "type": "number",
              "description": "Total hours in a 7-day period across ALL side jobs."
            }
          },
          {
            "name": "dailyHours",
            "in": "query",
            "required": false,
            "description": "Optional day-by-day hours, comma separated, all jobs combined; suffix v marks a school long-vacation day (students), e.g. 8v,8v,8v,8v,8v,0,0,4,4. Checks every rolling 7-day window.",
            "schema": {
              "type": "string",
              "description": "Optional day-by-day hours, comma separated, all jobs combined; suffix v marks a school long-vacation day (students), e.g. 8v,8v,8v,8v,8v,0,0,4,4. Checks every rolling 7-day window."
            }
          },
          {
            "name": "longVacation",
            "in": "query",
            "required": false,
            "description": "Students: the hours fall in the school's official long vacation (8 h/day rule).",
            "schema": {
              "type": "boolean",
              "description": "Students: the hours fall in the school's official long vacation (8 h/day rule).",
              "default": false
            }
          },
          {
            "name": "enrolled",
            "in": "query",
            "required": false,
            "description": "Students: still enrolled and attending (false after graduation/withdrawal/leave).",
            "schema": {
              "type": "boolean",
              "description": "Students: still enrolled and attending (false after graduation/withdrawal/leave).",
              "default": true
            }
          },
          {
            "name": "hasEmployeesOrOffice",
            "in": "query",
            "required": false,
            "description": "Freelance: you hire staff, set up a company or rent an office.",
            "schema": {
              "type": "boolean",
              "description": "Freelance: you hire staff, set up a company or rent an office.",
              "default": false
            }
          },
          {
            "name": "internshipEligible",
            "in": "query",
            "required": false,
            "description": "Students: final-year undergrad with ~90%+ credits, final-year master's/PhD, or credit-bearing practicum.",
            "schema": {
              "type": "boolean",
              "description": "Students: final-year undergrad with ~90%+ credits, final-year master's/PhD, or credit-bearing practicum.",
              "default": false
            }
          },
          {
            "name": "sameCategoryWork",
            "in": "query",
            "required": false,
            "description": "Work visa: the side job is the same kind of work your own status covers.",
            "schema": {
              "type": "boolean",
              "description": "Work visa: the side job is the same kind of work your own status covers.",
              "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": "japanPartTimeWorkCheckPost",
        "summary": "Can a foreign resident in Japan do this part-time job or side job on their status of residence, which permission (資格外活動許可) is needed, and are their hours within the 28-hour rule? (JSON body)",
        "description": "Applies the Immigration Services Agency's permission-for-activities-outside-status rules (資格外活動許可, incl. the 2026-10-01 pachinko/mahjong/game-center change for Dependent holders) to one status + job. Returns verdict (ok | ok_if_hours | apply_first | individual_permission | status_change | not_allowed | no_restriction), headline, summary, permissionNeeded (none | comprehensive | individual | status_change | not_available), hours (weeklyLimit 28, dailyLimitOnVacation 8 for students, withinLimit, rolling 7-day windows when dailyHours is given), conditions, documents, steps, warnings, sources, rulesAsOf and disclaimer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status",
                  "job"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "student (留学), dependent (家族滞在), designated_dependent, job_hunting, work_visa, specified_skilled, technical_intern, working_holiday, temporary_visitor, unrestricted (PR / spouse / long-term resident). Aliases: 留学, 家族滞在, tourist, pr…",
                    "enum": [
                      "student",
                      "dependent",
                      "designated_dependent",
                      "job_hunting",
                      "work_visa",
                      "specified_skilled",
                      "technical_intern",
                      "working_holiday",
                      "temporary_visitor",
                      "unrestricted"
                    ]
                  },
                  "job": {
                    "type": "string",
                    "description": "Kind of work/venue. Aliases: konbini, izakaya, uber_eats, eikaiwa, パチンコ, キャバクラ…",
                    "enum": [
                      "restaurant",
                      "izakaya_bar",
                      "convenience_store",
                      "retail",
                      "hotel",
                      "factory_warehouse",
                      "cleaning",
                      "office",
                      "language_teacher",
                      "interpreter_translator",
                      "tutor",
                      "delivery_employee",
                      "delivery_gig",
                      "freelance",
                      "internship",
                      "pachinko",
                      "mahjong",
                      "game_center",
                      "hostess_bar",
                      "nightclub",
                      "adult"
                    ]
                  },
                  "permission": {
                    "type": "string",
                    "description": "Permission you already hold: none | comprehensive (28h stamp) | individual | unknown.",
                    "enum": [
                      "none",
                      "comprehensive",
                      "individual",
                      "unknown"
                    ],
                    "default": "unknown"
                  },
                  "weeklyHours": {
                    "type": "number",
                    "description": "Total hours in a 7-day period across ALL side jobs."
                  },
                  "dailyHours": {
                    "type": "string",
                    "description": "Optional day-by-day hours, comma separated, all jobs combined; suffix v marks a school long-vacation day (students), e.g. 8v,8v,8v,8v,8v,0,0,4,4. Checks every rolling 7-day window."
                  },
                  "longVacation": {
                    "type": "boolean",
                    "description": "Students: the hours fall in the school's official long vacation (8 h/day rule).",
                    "default": false
                  },
                  "enrolled": {
                    "type": "boolean",
                    "description": "Students: still enrolled and attending (false after graduation/withdrawal/leave).",
                    "default": true
                  },
                  "hasEmployeesOrOffice": {
                    "type": "boolean",
                    "description": "Freelance: you hire staff, set up a company or rent an office.",
                    "default": false
                  },
                  "internshipEligible": {
                    "type": "boolean",
                    "description": "Students: final-year undergrad with ~90%+ credits, final-year master's/PhD, or credit-bearing practicum.",
                    "default": false
                  },
                  "sameCategoryWork": {
                    "type": "boolean",
                    "description": "Work visa: the side job is the same kind of work your own status covers.",
                    "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": "japanPartTimeWorkRules",
        "summary": "Japan part-time work permission rules (資格外活動許可): who may work, comprehensive vs individual permission, 28-hour and 8-hour limits, 2026-10-01 amusement-venue change, sources",
        "description": "Returns the rules the checker applies, with ISA sources and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with rulesAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}