{
  "openapi": "3.0.1",
  "info": {
    "title": "Ads Performance and Budget Pacing Auditor",
    "description": "Audit daily ad campaign exports for spend without conversions, CPA changes and budget pacing. Download campaign findings with the supporting figures. Ready to check your next export?",
    "version": "0.1",
    "x-build-id": "zIa3RHdZxemRnNkP3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/danielmichalek~ads-performance-anomaly-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-danielmichalek-ads-performance-anomaly-auditor",
        "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/danielmichalek~ads-performance-anomaly-auditor/runs": {
      "post": {
        "operationId": "runs-sync-danielmichalek-ads-performance-anomaly-auditor",
        "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/danielmichalek~ads-performance-anomaly-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-danielmichalek-ads-performance-anomaly-auditor",
        "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": [
          "platform",
          "accountId",
          "currency",
          "conversionDefinition",
          "reportingTimezone",
          "asOfDate"
        ],
        "properties": {
          "rows": {
            "title": "Daily campaign rows (JSON)",
            "type": "array",
            "description": "Provide either rows or CSV, not both. Canonical fields: date, campaignId, spend, conversions; optional campaignName, impressions, clicks, conversionValue. One campaign/day row, max5000 rows and250 campaigns."
          },
          "csv": {
            "title": "Daily campaign export (CSV)",
            "type": "string",
            "description": "Alternative to rows. Paste a CSV with a header. Maximum3MB; explicit fieldMap can select custom source columns. Daily campaign totals only."
          },
          "delimiter": {
            "title": "CSV separator",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Used only for CSV.",
            "default": ","
          },
          "fieldMap": {
            "title": "Exact custom column mapping",
            "type": "object",
            "description": "Optional canonical-to-source names, e.g. {\"spend\":\"Total cost\"}. Explicit source columns must exist. A source column cannot be reused by different metrics.",
            "default": {}
          },
          "numberFormat": {
            "title": "Number format",
            "enum": [
              "dot-decimal",
              "comma-decimal"
            ],
            "type": "string",
            "description": "Dot decimal accepts1,234.50; comma decimal accepts1.234,50. Do not guess ambiguous separators.",
            "default": "dot-decimal"
          },
          "platform": {
            "title": "Export platform",
            "enum": [
              "google",
              "meta",
              "tiktok",
              "other"
            ],
            "type": "string",
            "description": "One platform per run. This is supplied-export analysis, not a connection to the ad account."
          },
          "accountId": {
            "title": "Account identifier",
            "type": "string",
            "description": "A non-secret account label or exact identifier used to keep one account per report."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "One uppercase three-letter currency per report. Mixed currencies are rejected; no FX conversion."
          },
          "conversionDefinition": {
            "title": "Conversion definition and attribution",
            "type": "string",
            "description": "State exactly what the conversions column counts, e.g. purchases with seven-day click attribution. Mixed definitions are rejected when declared in rows."
          },
          "reportingTimezone": {
            "title": "Account reporting timezone",
            "type": "string",
            "description": "IANA timezone used by the supplied daily date labels. Date labels are not converted from a different timezone.",
            "default": "UTC"
          },
          "asOfDate": {
            "title": "Last completely reported day",
            "type": "string",
            "description": "YYYY-MM-DD in the account reporting timezone. Rows after this date are excluded. This does not automatically prove source completeness."
          },
          "currentDays": {
            "title": "Current period days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of mature days in the comparison window.",
            "default": 7
          },
          "baselineDays": {
            "title": "Baseline period days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Prior mature period. Metrics use weighted ratios of sums, so period lengths may differ.",
            "default": 28
          },
          "conversionLagDays": {
            "title": "Additional conversion maturity lag",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Exclude this many recent days through asOfDate from conversion comparisons. Lag is an assumption, not a guarantee of final attribution.",
            "default": 1
          },
          "thresholds": {
            "title": "Alert thresholds",
            "type": "object",
            "description": "Defaults: minSpend100, minConversions5, minImpressions1000, minCoverage1, cpaIncreasePct30, roasDropPct30, ctrDropPct30, pacingTolerancePct20. Money is in the one report currency; minimum coverage1 requires every day.",
            "default": {}
          },
          "budgets": {
            "title": "Optional dated total budgets",
            "type": "array",
            "description": "Entries: campaignId,startDate,endDate,totalBudget and optional matching currency. Linear pacing requires complete daily rows since budget start. No campaign settings are changed.",
            "default": []
          },
          "maxItems": {
            "title": "Report output limit",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "One completed report and one performance-report event per run.",
            "default": 1
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}