{
  "openapi": "3.0.1",
  "info": {
    "title": "PCAOB Auditor Change & Engagement Partner Monitor",
    "description": "Track auditor switches, engagement-partner rotations, SOX five-year partner tenure, first-year audits and offshore component-audit disclosure across every SEC issuer, benefit plan and fund from PCAOB Form AP filings. Return only what is new since your last run, or roll up mandate wins per firm.",
    "version": "1.1",
    "x-build-id": "AAP7OxzeBTAHGozHV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~pcaob-auditor-engagement-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-pcaob-auditor-engagement-monitor",
        "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/malonestar~pcaob-auditor-engagement-monitor/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-pcaob-auditor-engagement-monitor",
        "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/malonestar~pcaob-auditor-engagement-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-pcaob-auditor-engagement-monitor",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "changes",
              "new-filings",
              "engagements",
              "firm-rollup",
              "fund-series"
            ],
            "type": "string",
            "description": "What to return. 'changes' is the event feed derived from each issuer's own Form AP history: auditor switches, engagement-partner rotations and first-year audits. 'new-filings' returns ONLY Form APs this actor had not seen on its previous run at the same filter scope, so it needs one prior run to establish a baseline. 'engagements' returns the current audit roster with partner tenure. 'firm-rollup' returns per-audit-firm mandate wins, losses and market share. 'fund-series' explodes Investment Company filings into one row per SEC fund series.",
            "default": "changes"
          },
          "bankIssuersOnly": {
            "title": "Bank issuers only",
            "type": "boolean",
            "description": "Keep only banks, thrifts, bank holding companies and similar depository issuers (matched on the issuer name; employee benefit plans are always excluded). Useful for bank-distress and credit screens.",
            "default": false
          },
          "issuerNameContains": {
            "title": "Issuer name contains",
            "type": "string",
            "description": "Case-insensitive substring filter on the issuer name, for example 'bancorp' or 'Zillow'. Leave empty for all issuers. PCAOB never populates the ticker column, so issuers are matched by name and CIK only."
          },
          "firmNameContains": {
            "title": "Audit firm name contains",
            "type": "string",
            "description": "Case-insensitive substring filter on the audit firm name, for example 'Deloitte' or 'RSM'. Matches either the current or the prior audit firm so both sides of a switch are visible."
          },
          "sinceFilingDate": {
            "title": "Only filings on or after",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Drops Form AP filings filed before this date. Use it on scheduled runs to keep the feed to recent activity."
          },
          "latestOnly": {
            "title": "Latest filings only",
            "type": "boolean",
            "description": "Keep only rows where PCAOB's 'Latest Form AP Filing' flag is 1, dropping superseded amendment history. Turn this off to inspect every amendment of an engagement.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Hard cap on the number of dataset rows this run emits, and the thing you are billed for. Defaults to 200 - the same as the prefill - so a run with no input stays small and cheap. Raise it deliberately: a national changes sweep over the full history finds about 31,000 events.",
            "default": 200
          },
          "priorEngagements": {
            "title": "Prior engagements (optional)",
            "type": "array",
            "description": "Optional baseline for diffing without any stored run state. Each item may carry issuer_cik, issuer_id, issuer_name, audit_report_type, firm_id, audit_firm, engagement_partner and fiscal_period_end. When supplied, changes are computed against it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}