{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper & Monitor",
    "description": "Tracks your competitors' Google ads from the Ads Transparency Center: new, stopped and resumed ads, in several countries at once, with a summary per advertiser.",
    "version": "0.1",
    "x-build-id": "cWYPXR7W0pIh5eydk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lyklo~google-ads-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lyklo-google-ads-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/lyklo~google-ads-monitor/runs": {
      "post": {
        "operationId": "runs-sync-lyklo-google-ads-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/lyklo~google-ads-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-lyklo-google-ads-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",
        "required": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Competitors",
            "type": "array",
            "description": "One competitor per line: a website domain (acme.com), an advertiser ID from the Ads Transparency Center (AR…), or an advertiser name. A name is matched to every advertiser with exactly that name (ignoring Inc., GmbH and similar), and the run log lists them. If none has that exact name, the run log shows the closest advertisers and their IDs.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Countries",
            "type": "array",
            "description": "Countries to check. Each competitor is checked in every country you pick, and each country gets its own results.",
            "items": {
              "type": "string",
              "enum": [
                "ANYWHERE",
                "AE",
                "AR",
                "AT",
                "AU",
                "BD",
                "BE",
                "BG",
                "BR",
                "CA",
                "CH",
                "CL",
                "CO",
                "CY",
                "CZ",
                "DE",
                "DK",
                "EE",
                "EG",
                "ES",
                "FI",
                "FR",
                "GB",
                "GR",
                "HK",
                "HR",
                "HU",
                "ID",
                "IE",
                "IL",
                "IN",
                "IS",
                "IT",
                "JP",
                "KE",
                "KR",
                "KW",
                "KZ",
                "LK",
                "LT",
                "LU",
                "LV",
                "MA",
                "MT",
                "MX",
                "MY",
                "NG",
                "NL",
                "NO",
                "NZ",
                "PE",
                "PH",
                "PK",
                "PL",
                "PT",
                "QA",
                "RO",
                "RS",
                "SA",
                "SE",
                "SG",
                "SI",
                "SK",
                "TH",
                "TR",
                "TW",
                "UA",
                "US",
                "VN",
                "ZA"
              ],
              "enumTitles": [
                "Anywhere (all countries)",
                "United Arab Emirates (AE)",
                "Argentina (AR)",
                "Austria (AT)",
                "Australia (AU)",
                "Bangladesh (BD)",
                "Belgium (BE)",
                "Bulgaria (BG)",
                "Brazil (BR)",
                "Canada (CA)",
                "Switzerland (CH)",
                "Chile (CL)",
                "Colombia (CO)",
                "Cyprus (CY)",
                "Czechia (CZ)",
                "Germany (DE)",
                "Denmark (DK)",
                "Estonia (EE)",
                "Egypt (EG)",
                "Spain (ES)",
                "Finland (FI)",
                "France (FR)",
                "United Kingdom (GB)",
                "Greece (GR)",
                "Hong Kong SAR China (HK)",
                "Croatia (HR)",
                "Hungary (HU)",
                "Indonesia (ID)",
                "Ireland (IE)",
                "Israel (IL)",
                "India (IN)",
                "Iceland (IS)",
                "Italy (IT)",
                "Japan (JP)",
                "Kenya (KE)",
                "South Korea (KR)",
                "Kuwait (KW)",
                "Kazakhstan (KZ)",
                "Sri Lanka (LK)",
                "Lithuania (LT)",
                "Luxembourg (LU)",
                "Latvia (LV)",
                "Morocco (MA)",
                "Malta (MT)",
                "Mexico (MX)",
                "Malaysia (MY)",
                "Nigeria (NG)",
                "Netherlands (NL)",
                "Norway (NO)",
                "New Zealand (NZ)",
                "Peru (PE)",
                "Philippines (PH)",
                "Pakistan (PK)",
                "Poland (PL)",
                "Portugal (PT)",
                "Qatar (QA)",
                "Romania (RO)",
                "Serbia (RS)",
                "Saudi Arabia (SA)",
                "Sweden (SE)",
                "Singapore (SG)",
                "Slovenia (SI)",
                "Slovakia (SK)",
                "Thailand (TH)",
                "Türkiye (TR)",
                "Taiwan (TW)",
                "Ukraine (UA)",
                "United States (US)",
                "Vietnam (VN)",
                "South Africa (ZA)"
              ]
            },
            "default": [
              "US"
            ]
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "monitor",
              "list",
              "advertisers"
            ],
            "type": "string",
            "description": "Changes: only what changed since the last run with the same watch name (the first run records the recently shown ads). All ads: every ad found, every run. Summaries only: one row per competitor and country, for checking whether a company advertises.",
            "default": "monitor"
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Keeps the memory of past runs separate for each watch, for example one per client. Letters, numbers and dashes.",
            "default": "default"
          },
          "formats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Leave empty for all formats.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": []
          },
          "stoppedAfterDays": {
            "title": "Count an ad as stopped after (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "An ad not shown for this many days is reported as stopped.",
            "default": 7
          },
          "includeDetails": {
            "title": "Add ad details",
            "type": "boolean",
            "description": "Adds the countries where each ad was shown (with impression ranges where Google publishes them, mainly in the EU) and the number of ad variations. Also lets the monitor spot ads that reach new countries or get new variations. Charged per returned ad that includes details.",
            "default": false
          },
          "maxAdsPerTarget": {
            "title": "Maximum ads per competitor and country",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "In Changes mode a run reads only the recently shown ads, so this matters only for very large advertisers. Raise it if the log says the cap was hit. In All ads and Summaries only modes it caps the ads read for each competitor and country.",
            "default": 500
          },
          "includeUnchanged": {
            "title": "Also return unchanged ads",
            "type": "boolean",
            "description": "In change mode, also return ads that did not change. They are charged like listed ads.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}