{
  "openapi": "3.0.1",
  "info": {
    "title": "Medicare Coverage Change Impact Report",
    "description": "Track public CMS national coverage reports and NCD/NCA records, then receive source-linked change alerts, descriptive impact reports, and JSON exports. Baselines and unchanged checks emit zero rows and zero charges. No license agreement token endpoint is used.",
    "version": "0.1",
    "x-build-id": "h603sKRoGDN9a40lQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~medicare-coverage-change-impact-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-medicare-coverage-change-impact-report",
        "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/taroyamada~medicare-coverage-change-impact-report/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-medicare-coverage-change-impact-report",
        "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/taroyamada~medicare-coverage-change-impact-report/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-medicare-coverage-change-impact-report",
        "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",
        "required": [
          "watches"
        ],
        "properties": {
          "watches": {
            "title": "National coverage watches",
            "type": "array",
            "description": "Bounded saved searches across public national CMS coverage sources. No local coverage article or LCD endpoints are included.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "title": "Watch ID",
                  "description": "Stable identifier for this recurring coverage watch.",
                  "type": "string"
                },
                "sources": {
                  "title": "Public CMS sources",
                  "description": "Use whats_new_national, ncd, nca_cal, or annual. All are public v1 list-report endpoints that do not require a document ID or license token.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "default": [
                    "whats_new_national",
                    "ncd",
                    "nca_cal"
                  ]
                },
                "documentIds": {
                  "title": "Document IDs",
                  "description": "Exact public NCD/NCA or national coverage document identifiers when available.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "keywords": {
                  "title": "Keywords",
                  "description": "Words or phrases matched against public document title, topic, status, and description fields.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "statuses": {
                  "title": "Statuses",
                  "description": "Exact public document status values to retain.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "topics": {
                  "title": "Topics",
                  "description": "Topic fragments matched against public coverage metadata.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "effectiveDateFrom": {
                  "title": "Effective date from",
                  "description": "Inclusive YYYY-MM-DD filter applied after retrieval.",
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "effectiveDateTo": {
                  "title": "Effective date to",
                  "description": "Inclusive YYYY-MM-DD filter applied after retrieval.",
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                }
              },
              "additionalProperties": false
            },
            "default": []
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Stable isolated state namespace for a recurring public CMS coverage watch.",
            "default": "medicare-national-coverage-watch"
          },
          "initialRunMode": {
            "title": "Initial run mode",
            "enum": [
              "baseline_only",
              "emit_backfill"
            ],
            "type": "string",
            "description": "baseline_only stores the first observation with zero rows; emit_backfill emits current matches for an explicit first report.",
            "default": "baseline_only"
          },
          "generateReport": {
            "title": "Generate coverage impact report",
            "type": "boolean",
            "description": "Generate one descriptive report when new or changed public coverage observations are emitted.",
            "default": true
          },
          "emitRawRows": {
            "title": "Emit coverage rows",
            "type": "boolean",
            "description": "Emit optional low-priced normalized public coverage rows for each new or changed observation.",
            "default": false
          },
          "emitExport": {
            "title": "Generate coverage export",
            "type": "boolean",
            "description": "Generate a compact JSON export when new or changed observations are emitted.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Emit unchanged observations",
            "type": "boolean",
            "description": "Accepted for compatibility, but unchanged observations always remain zero rows and zero charge.",
            "default": false
          },
          "maxRecordsPerWatch": {
            "title": "Maximum records per watch",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum public records retained per watch/source after filtering.",
            "default": 100
          },
          "maxChargeUsd": {
            "title": "Maximum charge USD",
            "minimum": 0.005,
            "maximum": 250,
            "type": "number",
            "description": "Fail closed before pushing any row if planned PPE charges exceed this cap.",
            "default": 25
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Return representative rows for all four configured event types without calling CMS, saving state, or charging PPE events.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}