{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC XBRL Peer Financial Change Report",
    "description": "Compare selected public-company XBRL facts across a bounded ticker or CIK watchlist. Receive source-linked metric change alerts, descriptive peer variance reports, and compact exports from official SEC companyfacts or frames JSON APIs. First baselines and unchanged checks emit no rows and no charges",
    "version": "0.1",
    "x-build-id": "Y2Ze1jssVyR7EtI0Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~sec-xbrl-peer-financial-change-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-sec-xbrl-peer-financial-change-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~sec-xbrl-peer-financial-change-report/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-sec-xbrl-peer-financial-change-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~sec-xbrl-peer-financial-change-report/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-sec-xbrl-peer-financial-change-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": [
          "watchlists",
          "userAgent"
        ],
        "properties": {
          "watchlists": {
            "title": "Peer watchlists",
            "type": "array",
            "description": "Each watchlist combines selected peers and XBRL metrics. Use CIKs for deterministic identity or tickers resolved through the official SEC ticker index.",
            "default": [
              {
                "id": "software-peers",
                "peers": [
                  {
                    "ticker": "MSFT"
                  },
                  {
                    "ticker": "AAPL"
                  }
                ],
                "metrics": [
                  {
                    "taxonomy": "us-gaap",
                    "tag": "Revenues",
                    "unit": "USD",
                    "label": "Revenue",
                    "sourceMode": "companyfacts"
                  }
                ],
                "forms": [
                  "10-K",
                  "10-Q"
                ],
                "period": "latest",
                "varianceThresholdPercent": 20
              }
            ]
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Stable state namespace for a recurring peer portfolio.",
            "default": "sec-xbrl-peer-watch"
          },
          "userAgent": {
            "title": "SEC User-Agent",
            "type": "string",
            "description": "Required descriptive value, for example your-company-xbrl-watch/1.0 ops@yourcompany.com. Replace the example contact with your own application contact before production use.",
            "default": "taroyamada-sec-xbrl-peer-financial-change-report/1.0 ops@example.com"
          },
          "initialRunMode": {
            "title": "Initial run mode",
            "enum": [
              "baseline_only",
              "emit_backfill"
            ],
            "type": "string",
            "description": "baseline_only stores the first observations with zero rows; emit_backfill emits current observations as a first paid report.",
            "default": "baseline_only"
          },
          "generateReport": {
            "title": "Generate peer variance report",
            "type": "boolean",
            "description": "Emit one report-first descriptive peer variance row when selected observations change.",
            "default": true
          },
          "emitRawRows": {
            "title": "Emit raw fact rows",
            "type": "boolean",
            "description": "Optional low-priced compact XBRL fact rows for changed observations.",
            "default": false
          },
          "emitExport": {
            "title": "Generate evidence export",
            "type": "boolean",
            "description": "Emit a compact JSON export of current observations and selected changes.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Emit unchanged observations",
            "type": "boolean",
            "description": "Accepted for compatibility, but unchanged observations remain free and emit zero rows and zero charges.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum SEC requests",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard request bound including ticker index, companyfacts, and frames calls.",
            "default": 40
          },
          "requestIntervalMs": {
            "title": "Request interval milliseconds",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum delay between official SEC requests. Keep a conservative interval and respect current SEC guidance.",
            "default": 1100
          },
          "maxChargeUsd": {
            "title": "Maximum charge USD",
            "minimum": 0.005,
            "maximum": 250,
            "type": "number",
            "description": "Fail closed before delivery if planned PPE charges exceed this cap.",
            "default": 25
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Return deterministic representative rows for all event types without SEC requests, state writes, or charges.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}