{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Scraper & Competitor Ad Monitor",
    "description": "See every Google ad your competitors run: text, image and video ads from the Ads Transparency Center with dates and days running, plus a competitor report of new, stopped and longest-running ads since your last check. Search by website, advertiser name or ID.",
    "version": "0.1",
    "x-build-id": "Hxth666GCaJbnPnjM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ironlabs~google-ads-competitor-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ironlabs-google-ads-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/ironlabs~google-ads-competitor-monitor/runs": {
      "post": {
        "operationId": "runs-sync-ironlabs-google-ads-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/ironlabs~google-ads-competitor-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-ironlabs-google-ads-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",
        "required": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Competitors",
            "type": "array",
            "description": "One per line. An advertiser's verified name (\"Nike, Inc.\"), Google advertiser ID (AR…) or Transparency Center link gives that one company's ads. A website domain (nike.com) gives every ad that links to that site, including resellers and agencies. Works best with up to about 40 competitors per run. Google limits how fast one connection can ask, so bigger lists are finished automatically over several runs (see \"Finish unfinished lists\").",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerTarget": {
            "title": "Max ads per competitor",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many ads for each competitor (after filters). Google lists the most recent ads first.",
            "default": 100
          },
          "adFormats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Which ad formats to keep.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": [
              "text",
              "image",
              "video"
            ]
          },
          "activeOnly": {
            "title": "Only ads still running",
            "type": "boolean",
            "description": "Keep only ads Google showed in the last 2 days.",
            "default": false
          },
          "shownSince": {
            "title": "Shown since",
            "type": "string",
            "description": "Keep only ads last shown on or after this date (YYYY-MM-DD)."
          },
          "onlyNewAds": {
            "title": "Only new ads since last run (monitor mode)",
            "type": "boolean",
            "description": "Schedule the Actor daily or weekly and get only ads you haven't seen before. The first run returns everything as a baseline. The competitor report always shows new and stopped ads.",
            "default": false
          },
          "includeReport": {
            "title": "Competitor report",
            "type": "boolean",
            "description": "Add one summary row per competitor: ad formats, active/new/stopped ads, the longest-running ads (likely winners) and the newest ads.",
            "default": true
          },
          "includeComparison": {
            "title": "Competitor comparison",
            "type": "boolean",
            "description": "With 2 or more competitors, add one row that ranks them side by side: new and stopped ads, ad library growth, format shifts since your last run, plus plain-English highlights for client updates.",
            "default": true
          },
          "resumeUnfinished": {
            "title": "Finish unfinished lists",
            "type": "boolean",
            "description": "If an earlier run with the same competitor list stopped early (Google's request limit or your spending limit), continue with the competitors it didn't reach instead of starting over. The comparison is charged once, when the whole list is done.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Network route for requests. The run uses one IP from start to finish. It never switches IPs to get around Google's request limits: if Google says \"too many requests\", the run slows down, waits, or pauses and keeps what it collected. Residential proxy is billed by Apify at about $8 per GB, roughly 5-10 cents for a 40-competitor run.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}