{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Public Comment Monitor (e-Gov パブコメ)",
    "description": "Track Japanese government public comment procedures (パブリックコメント): new draft regulations open for comment and published results, with deadlines, ministry, legal basis and document links. Monitoring mode returns only new items.",
    "version": "1.0",
    "x-build-id": "l6z9dP0ODvTccdF0c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vespa-zzz~egov-public-comments/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vespa-zzz-egov-public-comments",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/vespa-zzz~egov-public-comments/runs": {
      "post": {
        "operationId": "runs-sync-vespa-zzz-egov-public-comments",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/vespa-zzz~egov-public-comments/run-sync": {
      "post": {
        "operationId": "run-sync-vespa-zzz-egov-public-comments",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "feeds": {
            "title": "What to fetch",
            "type": "array",
            "description": "`open` = new public comment calls (意見募集案件, drafts open for comment). `results` = published results (結果公示案件: submitted comment counts, final rules, government responses).",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "results"
              ],
              "enumTitles": [
                "Open calls for comment (意見募集)",
                "Published results (結果公示)"
              ]
            },
            "default": [
              "open"
            ]
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Limit to e-Gov policy categories. When set, the per-category feeds are read (they reach further back than the all-items feed). Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "IT社会化推進",
                "経済財政政策",
                "共生社会政策",
                "国民生活の安全・安心の確保",
                "地方分権改革等",
                "選挙、政党",
                "独立行政法人等",
                "国家公務員",
                "行政手続",
                "統計",
                "地方自治",
                "地方財政、地方税",
                "司法",
                "民事",
                "刑事",
                "警察",
                "消防",
                "国土開発",
                "土地",
                "都市計画",
                "道路",
                "河川",
                "建築、住宅",
                "財務",
                "国有財産",
                "国税",
                "国債",
                "教育",
                "文化",
                "産業一般",
                "農業",
                "林業",
                "水産業",
                "鉱業",
                "工業",
                "商業",
                "金融、保険",
                "外国為替、貿易",
                "陸運",
                "海運",
                "航空",
                "貨物運送",
                "観光",
                "郵務",
                "電気通信",
                "労働",
                "環境保全",
                "厚生",
                "社会福祉",
                "社会保険",
                "防衛",
                "外事",
                "その他"
              ]
            }
          },
          "keywords": {
            "title": "Title keywords (any)",
            "type": "array",
            "description": "Keep only items whose title contains at least one of these strings, e.g. `AI`, `個人情報`, `電波`, `金融商品取引法`.",
            "items": {
              "type": "string"
            }
          },
          "ministries": {
            "title": "Ministries / agencies (any)",
            "type": "array",
            "description": "Keep only items from these organisations (partial match), e.g. `総務省`, `金融庁`, `経済産業省`, `個人情報保護委員会`.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch detail pages",
            "type": "boolean",
            "description": "Open each item page to add the case number, legal basis, procedure type, reception start, revision status and links to all documents (PDF drafts, guidelines, results). One extra request per item.",
            "default": true
          },
          "onlyNew": {
            "title": "Monitoring mode: only new items",
            "type": "boolean",
            "description": "Remember items already returned (named key-value store) and output only new ones. Schedule daily or a few times per day. Items whose detail page failed are retried next run.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "pattern": "^[a-zA-Z0-9_-]{1,50}$",
            "type": "string",
            "description": "Separate name for the \"already seen\" list, so schedules with different filters do not interfere. Letters, digits, - and _ only. Do not run two schedules with the same key at the same time.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of items to output.",
            "default": 200
          },
          "maxDetailRequests": {
            "title": "Max detail page requests per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit on detail pages fetched in one run (each page may be retried up to 3 times on temporary errors). In monitoring mode, items left over are processed by the next run.",
            "default": 300
          },
          "requestIntervalMs": {
            "title": "Delay between requests (ms)",
            "minimum": 1000,
            "type": "integer",
            "description": "Pause between requests to e-Gov. Minimum 1000 ms.",
            "default": 2000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}