{
  "openapi": "3.1.0",
  "info": {
    "title": "Japan Dual Pricing Check API",
    "version": "1.0.0",
    "description": "Do tourists pay more in Japan? Resident vs non-resident prices at Himeji Castle (¥2,500 vs ¥1,000), Nanzoin, JUNGLIA, Nara Prison Museum, Kitakyushu and Kagoshima, plus the planned Nijo Castle and Kyoto City Bus prices (FY2027). Pick places, say where you live, get what you pay and why.\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-dual-pricing.vercel.app"
    }
  ],
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "japanDualPricingCheck",
        "summary": "Do tourists pay more in Japan? Resident vs non-resident prices at Himeji Castle, Nijo Castle, Kyoto City Bus and more",
        "description": "Japan dual pricing (二重価格): some Japanese tourist sites charge visitors more than local residents. Give the places (or none for all 32) and where the visitor lives: residence=overseas (tourist) or Japan with prefecture + city. Returns, per place: status (live / announced / under_review / not_adopted), which price tier applies to this visitor on the date, your price vs the cheapest resident price, planned prices for announced schemes (Nijo Castle ¥1,000 citizens / ¥2,000 others and Kyoto City Bus ¥200 / ¥360, both FY2027), what proof residents need, how foreign residents are treated (residence, not nationality), notes and official sources; plus totals and a one-line headline. Live examples: Himeji Castle (Himeji residents ¥1,000 / others ¥2,500 since 2026-03-01, under-18 free), Odawara Castle (¥500 / ¥1,000), Nanzoin (free for people living in Japan / ¥500 for overseas visitors), JUNGLIA Okinawa (¥6,930 Japan residents / ¥8,800), Nara Prison Museum (¥2,000 Nara / ¥2,500 Japan / ¥3,500 overseas), Sapporo TV Tower, Kitakyushu (4 sites) and Kagoshima City (11 sites), Miyajima visit tax. Osaka Castle dropped dual pricing (¥1,200 for all).\n\nExample: https://japan-dual-pricing.vercel.app/api/check?places=himeji-castle,odawara-castle,nanzoin&residence=overseas&date=2026-11-20",
        "parameters": [
          {
            "name": "places",
            "in": "query",
            "required": false,
            "description": "Comma-separated place ids or names, e.g. himeji-castle,nijo-castle,kyoto-city-bus,nanzoin (English, Japanese or aliases like 姫路城, 'kyoto bus'). Omit for all places (filter with area/status). POST may send an array.",
            "schema": {
              "type": "string",
              "description": "Comma-separated place ids or names, e.g. himeji-castle,nijo-castle,kyoto-city-bus,nanzoin (English, Japanese or aliases like 姫路城, 'kyoto bus'). Omit for all places (filter with area/status). POST may send an array."
            }
          },
          {
            "name": "residence",
            "in": "query",
            "required": false,
            "description": "overseas = visitor living abroad (tourist). japan = lives in Japan (any nationality); add prefecture and city for local resident prices. Giving a prefecture or city implies japan.",
            "schema": {
              "type": "string",
              "description": "overseas = visitor living abroad (tourist). japan = lives in Japan (any nationality); add prefecture and city for local resident prices. Giving a prefecture or city implies japan.",
              "enum": [
                "overseas",
                "japan"
              ],
              "default": "overseas"
            }
          },
          {
            "name": "prefecture",
            "in": "query",
            "required": false,
            "description": "Prefecture where the visitor is registered as living, e.g. kyoto, hyogo, 東京都.",
            "schema": {
              "type": "string",
              "description": "Prefecture where the visitor is registered as living, e.g. kyoto, hyogo, 東京都."
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City / ward / town of the visitor's registered address, e.g. Himeji, Kyoto (or a Kyoto ward like Sakyo-ku), Kitakyushu, Kagoshima, Miyajima.",
            "schema": {
              "type": "string",
              "description": "City / ward / town of the visitor's registered address, e.g. Himeji, Kyoto (or a Kyoto ward like Sakyo-ku), Kitakyushu, Kagoshima, Miyajima."
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Visit date YYYY-MM-DD (default: today in Japan). Before a start date the old price applies.",
            "schema": {
              "type": "string",
              "description": "Visit date YYYY-MM-DD (default: today in Japan). Before a start date the old price applies."
            }
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "description": "Visitor age. Some places are free under 18/19 (Himeji Castle, Nanzoin); otherwise adult prices are returned with a note.",
            "schema": {
              "type": "number",
              "description": "Visitor age. Some places are free under 18/19 (Himeji Castle, Nanzoin); otherwise adult prices are returned with a note.",
              "minimum": 0,
              "maximum": 120
            }
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "description": "When places is omitted: only places in this prefecture, e.g. kagoshima, kyoto.",
            "schema": {
              "type": "string",
              "description": "When places is omitted: only places in this prefecture, e.g. kagoshima, kyoto."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "When places is omitted: filter by status (live, announced, under_review, not_adopted).",
            "schema": {
              "type": "string",
              "description": "When places is omitted: filter by status (live, announced, under_review, not_adopted).",
              "enum": [
                "all",
                "live",
                "announced",
                "under_review",
                "not_adopted",
                "flat"
              ],
              "default": "all"
            }
          }
        ],
        "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": "japanDualPricingCheckPost",
        "summary": "Do tourists pay more in Japan? Resident vs non-resident prices at Himeji Castle, Nijo Castle, Kyoto City Bus and more (JSON body)",
        "description": "Japan dual pricing (二重価格): some Japanese tourist sites charge visitors more than local residents. Give the places (or none for all 32) and where the visitor lives: residence=overseas (tourist) or Japan with prefecture + city. Returns, per place: status (live / announced / under_review / not_adopted), which price tier applies to this visitor on the date, your price vs the cheapest resident price, planned prices for announced schemes (Nijo Castle ¥1,000 citizens / ¥2,000 others and Kyoto City Bus ¥200 / ¥360, both FY2027), what proof residents need, how foreign residents are treated (residence, not nationality), notes and official sources; plus totals and a one-line headline. Live examples: Himeji Castle (Himeji residents ¥1,000 / others ¥2,500 since 2026-03-01, under-18 free), Odawara Castle (¥500 / ¥1,000), Nanzoin (free for people living in Japan / ¥500 for overseas visitors), JUNGLIA Okinawa (¥6,930 Japan residents / ¥8,800), Nara Prison Museum (¥2,000 Nara / ¥2,500 Japan / ¥3,500 overseas), Sapporo TV Tower, Kitakyushu (4 sites) and Kagoshima City (11 sites), Miyajima visit tax. Osaka Castle dropped dual pricing (¥1,200 for all).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "places": {
                    "type": "string",
                    "description": "Comma-separated place ids or names, e.g. himeji-castle,nijo-castle,kyoto-city-bus,nanzoin (English, Japanese or aliases like 姫路城, 'kyoto bus'). Omit for all places (filter with area/status). POST may send an array."
                  },
                  "residence": {
                    "type": "string",
                    "description": "overseas = visitor living abroad (tourist). japan = lives in Japan (any nationality); add prefecture and city for local resident prices. Giving a prefecture or city implies japan.",
                    "enum": [
                      "overseas",
                      "japan"
                    ],
                    "default": "overseas"
                  },
                  "prefecture": {
                    "type": "string",
                    "description": "Prefecture where the visitor is registered as living, e.g. kyoto, hyogo, 東京都."
                  },
                  "city": {
                    "type": "string",
                    "description": "City / ward / town of the visitor's registered address, e.g. Himeji, Kyoto (or a Kyoto ward like Sakyo-ku), Kitakyushu, Kagoshima, Miyajima."
                  },
                  "date": {
                    "type": "string",
                    "description": "Visit date YYYY-MM-DD (default: today in Japan). Before a start date the old price applies."
                  },
                  "age": {
                    "type": "number",
                    "description": "Visitor age. Some places are free under 18/19 (Himeji Castle, Nanzoin); otherwise adult prices are returned with a note.",
                    "minimum": 0,
                    "maximum": 120
                  },
                  "area": {
                    "type": "string",
                    "description": "When places is omitted: only places in this prefecture, e.g. kagoshima, kyoto."
                  },
                  "status": {
                    "type": "string",
                    "description": "When places is omitted: filter by status (live, announced, under_review, not_adopted).",
                    "enum": [
                      "all",
                      "live",
                      "announced",
                      "under_review",
                      "not_adopted",
                      "flat"
                    ],
                    "default": "all"
                  }
                }
              }
            }
          }
        },
        "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": "japanDualPricingRules",
        "summary": "All tracked places with resident / non-resident prices, status, dates, proof rules and sources",
        "description": "Returns every tracked Japanese tourist site with dual pricing (live, announced, under review, dropped): price tiers by residence (city, prefecture, Japan, overseas), effective / planned dates, previous price, proof of residence, foreign-resident note, sources, the 47 prefecture slugs, key facts and disclaimer. No inputs.",
        "responses": {
          "200": {
            "description": "Rules JSON with dataAsOf and sources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}