{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Competitor Monitor",
    "description": "Monitor competitor Google Ads Transparency creatives and detect new or changed ads from public transparency data.",
    "version": "0.1",
    "x-build-id": "9kKF0NiY8wBFxF3sc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jy-labs~google-ads-transparency-competitor-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jy-labs-google-ads-transparency-competitor-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/jy-labs~google-ads-transparency-competitor-monitor/runs": {
      "post": {
        "operationId": "runs-sync-jy-labs-google-ads-transparency-competitor-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/jy-labs~google-ads-transparency-competitor-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-jy-labs-google-ads-transparency-competitor-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": {
          "domains": {
            "title": "Competitor domains",
            "type": "array",
            "description": "Domains to monitor, such as adidas.com or nike.com. Use bare domains; http/https and paths are normalized away. Leave this empty when you want to query only advertiserIds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Optional Google Ads Transparency Center advertiser IDs such as AR14017378248766259201. These are queried directly and can be combined with domains. For an advertiser-ID-only run, leave domains empty or set domains to [] in API input.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Target region",
            "enum": [
              "KR",
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "JP"
            ],
            "type": "string",
            "description": "Country/region filter used by Google Ads Transparency Center.",
            "default": "KR"
          },
          "maxAdsPerDomain": {
            "title": "Max ads per domain / advertiser",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap per input source. The Actor stops paging a domain or advertiser after this many current creatives.",
            "default": 25
          },
          "includePreviewParsing": {
            "title": "Parse preview scripts",
            "type": "boolean",
            "description": "Best-effort parsing of public creative preview scripts for CTA, text snippets, and landing URLs. Coverage is partial and not guaranteed.",
            "default": true
          },
          "previousDatasetId": {
            "title": "Previous dataset ID",
            "type": "string",
            "description": "Optional dataset ID from a previous monitor run. This is the highest-priority diff baseline and overrides previousRunId and saved monitor state.",
            "default": ""
          },
          "previousRunId": {
            "title": "Previous run ID",
            "type": "string",
            "description": "Optional previous Apify run ID. The Actor resolves its default dataset for diffing. Used only when previousDatasetId is empty and overrides saved monitor state.",
            "default": ""
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "A stable name for this competitor monitor, such as nike-kr-weekly or client-a-saas-us. Use the same monitorId in a schedule so the Actor remembers the last dataset and automatically compares the next run.",
            "default": ""
          },
          "autoDiff": {
            "title": "Automatically compare with last saved run",
            "type": "boolean",
            "description": "When enabled and no previousDatasetId/previousRunId is provided, the Actor looks up the saved state for this monitorId and compares the current run with the last saved dataset. First runs become the baseline.",
            "default": true
          },
          "saveMonitorState": {
            "title": "Save this run as the next baseline",
            "type": "boolean",
            "description": "When enabled, a successful run stores its current dataset ID for the monitorId so the next scheduled run can auto-diff. Disable this for experiments you do not want to become the next baseline.",
            "default": true
          },
          "requestDelayMillis": {
            "title": "Delay between Google requests",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Conservative delay to reduce throttling risk from the public Transparency Center RPC.",
            "default": 350
          },
          "maxPreviewBytes": {
            "title": "Max preview script bytes",
            "minimum": 20000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety cap for preview script parsing. Raw preview script bodies are not stored in the dataset or monitor state.",
            "default": 250000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration. The default uses Apify Proxy to reduce public endpoint throttling; disable only for small trusted tests.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}