{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Ad Change Brief — BYOD Evidence Monitor",
    "description": "Compare buyer-authorized Meta, Google Ads, or LinkedIn evidence snapshots. Get one auditable competitor-ad change report with baseline truth, materiality, confidence, evidence gaps, and unsent human-review actions. No source fetching or campaign automation.",
    "version": "0.3",
    "x-build-id": "ZzTk4gvihjAomsWZ2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~competitor-ad-change-brief/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-competitor-ad-change-brief",
        "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/zinin~competitor-ad-change-brief/runs": {
      "post": {
        "operationId": "runs-sync-zinin-competitor-ad-change-brief",
        "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/zinin~competitor-ad-change-brief/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-competitor-ad-change-brief",
        "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": [
          "schemaVersion",
          "requestId",
          "watchId",
          "coverage",
          "sourceContract"
        ],
        "properties": {
          "schemaVersion": {
            "title": "Contract version",
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "The supported input contract version. Keep 1.0 unless a published migration says otherwise.",
            "default": "1.0"
          },
          "requestId": {
            "title": "Request ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Use auto for a Task-safe trusted Actor run ID; explicit values remain idempotency keys for direct callers.",
            "default": "auto"
          },
          "watchId": {
            "title": "Baseline watch ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Stable watch identity for one advertiser, source contract, and query scope. Changed methodology requires a new compatible baseline.",
            "default": "nike-us-demo-bootstrap"
          },
          "rows": {
            "title": "Canonical inline rows",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 canonical rows; use this or datasetId.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "platform",
                "advertiserId",
                "pageId",
                "adId",
                "creativeId",
                "isActive",
                "format",
                "copy",
                "cta",
                "landingDomains",
                "media",
                "offer",
                "evidence"
              ],
              "properties": {
                "platform": {
                  "title": "Platform",
                  "description": "Canonical advertising platform.",
                  "type": "string",
                  "enum": [
                    "meta",
                    "google",
                    "linkedin"
                  ]
                },
                "advertiserId": {
                  "title": "Advertiser ID",
                  "description": "Platform advertiser identity, when supplied.",
                  "type": "string",
                  "nullable": true
                },
                "pageId": {
                  "title": "Page ID",
                  "description": "Platform page identity, when supplied.",
                  "type": "string",
                  "nullable": true
                },
                "adId": {
                  "title": "Ad ID",
                  "description": "Platform ad identity, when supplied.",
                  "type": "string",
                  "nullable": true
                },
                "creativeId": {
                  "title": "Creative ID",
                  "description": "Platform creative identity, when supplied.",
                  "type": "string",
                  "nullable": true
                },
                "isActive": {
                  "title": "Active state",
                  "description": "Explicit active state when known.",
                  "type": "boolean",
                  "nullable": true
                },
                "format": {
                  "title": "Format",
                  "description": "Closed creative format when known.",
                  "type": "string",
                  "nullable": true,
                  "enum": [
                    "TEXT",
                    "IMAGE",
                    "VIDEO",
                    "CAROUSEL",
                    "COLLECTION",
                    "OTHER"
                  ]
                },
                "copy": {
                  "title": "Copy",
                  "description": "Supplied creative copy fields.",
                  "editor": "json",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "primaryText",
                    "headline",
                    "description"
                  ],
                  "properties": {
                    "primaryText": {
                      "title": "Primary text",
                      "description": "Supplied primary text.",
                      "type": "string",
                      "nullable": true
                    },
                    "headline": {
                      "title": "Headline",
                      "description": "Supplied headline.",
                      "type": "string",
                      "nullable": true
                    },
                    "description": {
                      "title": "Description",
                      "description": "Supplied description.",
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "cta": {
                  "title": "Call to action",
                  "description": "Supplied CTA label.",
                  "type": "string",
                  "nullable": true
                },
                "landingDomains": {
                  "title": "Landing domains",
                  "description": "Supplied landing domains or URLs.",
                  "type": "array",
                  "maxItems": 8,
                  "items": {
                    "type": "string"
                  }
                },
                "media": {
                  "title": "Media references",
                  "description": "Supplied media references; no URLs are fetched.",
                  "type": "array",
                  "maxItems": 8,
                  "items": {
                    "type": "string"
                  }
                },
                "offer": {
                  "title": "Offer",
                  "description": "Structured supplied offer; no prose inference.",
                  "editor": "json",
                  "type": "object",
                  "nullable": true,
                  "additionalProperties": false,
                  "required": [
                    "kind",
                    "value",
                    "currency",
                    "code"
                  ],
                  "properties": {
                    "kind": {
                      "title": "Offer kind",
                      "description": "Structured offer kind.",
                      "type": "string",
                      "nullable": true
                    },
                    "value": {
                      "title": "Offer value",
                      "description": "Structured non-negative offer value.",
                      "type": "number",
                      "nullable": true
                    },
                    "currency": {
                      "title": "Currency",
                      "description": "Structured currency code.",
                      "type": "string",
                      "nullable": true
                    },
                    "code": {
                      "title": "Offer code",
                      "description": "Structured promotion code.",
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "evidence": {
                  "title": "Evidence",
                  "description": "Buyer-provided evidence references.",
                  "editor": "json",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "sourceRef",
                    "sourceRowId"
                  ],
                  "properties": {
                    "sourceRef": {
                      "title": "Source reference",
                      "description": "Buyer-provided source reference.",
                      "type": "string",
                      "nullable": true
                    },
                    "sourceRowId": {
                      "title": "Source row ID",
                      "description": "Buyer-provided source row identity.",
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "scrapedAt": {
                  "title": "Scraped at",
                  "description": "Ignored source timestamp.",
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "datasetId": {
            "title": "Buyer Dataset ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "One buyer Dataset selected for read-only access."
          },
          "coverage": {
            "title": "Closed coverage proof",
            "required": [
              "status",
              "comparable",
              "closed",
              "evidenceRef",
              "expectedRows"
            ],
            "type": "object",
            "description": "Runtime requires a closed comparable declaration before advancing the baseline.",
            "properties": {
              "status": {
                "title": "Coverage status",
                "description": "Closed coverage outcome.",
                "type": "string",
                "enum": [
                  "complete",
                  "partial_pagination",
                  "partial_budget",
                  "source_unavailable"
                ]
              },
              "comparable": {
                "title": "Comparable",
                "description": "Whether the delivered set is comparable.",
                "type": "boolean"
              },
              "closed": {
                "title": "Closed",
                "description": "Whether the buyer attests the bounded set is closed.",
                "type": "boolean"
              },
              "evidenceRef": {
                "title": "Evidence reference",
                "description": "Buyer-readable coverage evidence reference.",
                "type": "string",
                "nullable": true,
                "maxLength": 512
              },
              "expectedRows": {
                "title": "Expected rows",
                "description": "Expected bounded row count, when known.",
                "type": "integer",
                "nullable": true,
                "minimum": 0,
                "maximum": 100
              }
            },
            "additionalProperties": false
          },
          "sourceContract": {
            "title": "Source contract",
            "required": [
              "productionActorId",
              "productionActorVersion",
              "adapter",
              "adapterVersion",
              "queryScope",
              "entityIdentity"
            ],
            "type": "object",
            "description": "Upstream Actor identity, adapter, scope, and entity contract.",
            "properties": {
              "productionActorId": {
                "title": "Production Actor ID",
                "description": "Trusted upstream evidence Actor identity.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "productionActorVersion": {
                "title": "Production Actor version",
                "description": "Upstream evidence Actor version.",
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "adapter": {
                "title": "Evidence adapter",
                "description": "Closed adapter dispatch path.",
                "type": "string",
                "enum": [
                  "meta",
                  "meta-ads",
                  "google",
                  "google-ads",
                  "linkedin",
                  "linkedin-ads"
                ]
              },
              "adapterVersion": {
                "title": "Adapter version",
                "description": "Upstream adapter version.",
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "queryScope": {
                "title": "Query scope",
                "type": "object",
                "description": "Opaque bounded upstream scope object; its digest is persisted."
              },
              "entityIdentity": {
                "title": "Entity identity",
                "type": "object",
                "description": "Opaque bounded upstream identity object; its digest is persisted."
              }
            },
            "additionalProperties": false
          },
          "maxAds": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bound the accepted evidence rows processed in one report so cost and comparison scope remain inspectable.",
            "default": 100
          },
          "maxTotalChargeUsd": {
            "title": "Maximum total charge",
            "minimum": 0,
            "type": "number",
            "description": "Caller charge cap for the Actor start and one result event; the paid path fails closed when the cap is insufficient.",
            "default": 0.055
          },
          "openrouterApiKey": {
            "title": "Optional BYOK key",
            "type": "string",
            "description": "Secret caller-owned key used only for one bounded explanation and never stored in a Dataset or report."
          },
          "analysisModel": {
            "title": "Analysis model",
            "type": "string",
            "description": "Fixed explanation model identifier used only when the optional caller-owned key is supplied.",
            "default": "openai/gpt-4o-mini"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}