{
  "openapi": "3.0.1",
  "info": {
    "title": "FDIC & NCUA Peer Financial Trend Report",
    "description": "Compare bounded same-source bank or credit-union peer watches across explicit quarterly metrics and periods. Receive source-linked changes, descriptive peer percentiles, reports, and exports from the keyless official FDIC BankFind API and NCUA quarterly call-report ZIPs. No financial health score, f",
    "version": "0.1",
    "x-build-id": "CD9v0SrV74PiWGzX8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~fdic-ncua-peer-financial-trend-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-fdic-ncua-peer-financial-trend-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~fdic-ncua-peer-financial-trend-report/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-fdic-ncua-peer-financial-trend-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~fdic-ncua-peer-financial-trend-report/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-fdic-ncua-peer-financial-trend-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": "Institution peer watches",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Each watch is a bounded peer group from one source. Use at least two FDIC certificate numbers or NCUA charter numbers so peer percentiles are meaningful.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "title": "Watch ID",
                  "type": "string",
                  "description": "Stable identifier for this peer group."
                },
                "source": {
                  "title": "Official source",
                  "type": "string",
                  "description": "Select one official source for every institution in this peer watch.",
                  "enum": [
                    "fdic",
                    "ncua"
                  ],
                  "enumTitles": [
                    "FDIC BankFind",
                    "NCUA quarterly call reports"
                  ],
                  "default": "fdic"
                },
                "institutions": {
                  "title": "Institutions",
                  "description": "For fdic use cert. For ncua use charterNumber. Keep every watch on one source; optional label is display-only.",
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 20,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "cert": {
                        "title": "FDIC CERT",
                        "type": "string",
                        "description": "Official FDIC certificate number; use only when source is fdic.",
                        "pattern": "^[0-9]{1,8}$"
                      },
                      "charterNumber": {
                        "title": "NCUA charter number",
                        "type": "string",
                        "description": "Official NCUA charter number; use only when source is ncua.",
                        "pattern": "^[0-9]{1,8}$"
                      },
                      "label": {
                        "title": "Display label",
                        "type": "string",
                        "description": "Optional buyer-defined label used only in the report output."
                      }
                    }
                  }
                },
                "metrics": {
                  "title": "Metrics",
                  "description": "Explicit supported fields. NCUA supports totalAssets, totalDeposits (shares and deposits), netIncome, and totalEquity (net worth). Values are observations, not scores or advice.",
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 8,
                  "items": {
                    "type": "string"
                  }
                },
                "periods": {
                  "title": "Quarter-end periods",
                  "description": "At least two explicit quarter-end dates in YYYY-MM-DD format, for example 2024-12-31 and 2025-12-31.",
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 8,
                  "items": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-(03-31|06-30|09-30|12-31)$"
                  }
                }
              },
              "required": [
                "institutions",
                "metrics",
                "periods"
              ]
            },
            "default": []
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Stable isolated state namespace for recurring checks. Use a new key for a separate portfolio.",
            "default": "fdic-ncua-peer-financial-trend-watch"
          },
          "initialRunMode": {
            "title": "Initial run mode",
            "enum": [
              "baseline_only",
              "emit_backfill"
            ],
            "type": "string",
            "description": "baseline_only saves the first snapshot with zero rows; emit_backfill emits the current bounded observations for a deliberate paid backfill.",
            "default": "baseline_only"
          },
          "generateReport": {
            "title": "Generate trend report",
            "type": "boolean",
            "description": "Emit one descriptive peer trend report when selected observations are new or changed.",
            "default": true
          },
          "emitRawRows": {
            "title": "Emit financial rows",
            "type": "boolean",
            "description": "Add one low-priced descriptive institution metric row per selected observation. Off by default.",
            "default": false
          },
          "emitExport": {
            "title": "Generate evidence export",
            "type": "boolean",
            "description": "Emit one compact JSON evidence export when selected observations are new or changed.",
            "default": false
          },
          "includeInstitutionDirectory": {
            "title": "Include institution labels",
            "type": "boolean",
            "description": "For FDIC, fetch the bounded institutions endpoint. NCUA labels come from FOICU.txt in the selected official ZIP.",
            "default": true
          },
          "emitUnchanged": {
            "title": "Emit unchanged observations",
            "type": "boolean",
            "description": "Accepted for compatibility. Unchanged checks always remain zero rows and zero charge.",
            "default": false
          },
          "maxChargeUsd": {
            "title": "Maximum charge USD",
            "minimum": 0.01,
            "maximum": 500,
            "type": "number",
            "description": "Fail closed before any push if the planned event total exceeds this cap.",
            "default": 50
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard upper bound for this run, including directory and financial requests.",
            "default": 20
          },
          "requestIntervalMs": {
            "title": "Request interval milliseconds",
            "minimum": 100,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum interval between official source requests. Keep at least 100ms.",
            "default": 250
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Return deterministic representative rows without contacting FDIC or NCUA, reading or saving state, or charging 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}