{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Scraper (cached)",
    "description": "Every ad an advertiser is running, from Google's Ads Transparency Center — creative id, format, preview URL, first/last shown date. Search by advertiser name or AR… id. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "QwXMgJLEKJeag2Olx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leonguyen2808~google-ads-transparency/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leonguyen2808-google-ads-transparency",
        "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/leonguyen2808~google-ads-transparency/runs": {
      "post": {
        "operationId": "runs-sync-leonguyen2808-google-ads-transparency",
        "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/leonguyen2808~google-ads-transparency/run-sync": {
      "post": {
        "operationId": "run-sync-leonguyen2808-google-ads-transparency",
        "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": {
          "keywords": {
            "title": "Advertiser names to search",
            "type": "array",
            "description": "One per line. Looks advertisers up by name and returns their id, country and Google's own declared ad count — those rows are emitted whether or not you also fetch ads.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertiser IDs or URLs",
            "type": "array",
            "description": "One per line. Accepts an AR… id or a full Transparency Center URL (https://adstransparency.google.com/advertiser/AR…). Use this when you already know the advertiser; it skips the name lookup.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "advertisersPerKeyword": {
            "title": "Advertisers per keyword",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many name matches to keep per keyword. Google returns up to 20; each one kept then costs its own ads request.",
            "default": 5
          },
          "fetchAds": {
            "title": "Fetch the ads",
            "type": "boolean",
            "description": "On (default): return every ad for each advertiser. Off: resolve advertiser ids only — much cheaper when all you need is which advertiser matches a brand name.",
            "default": true
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser",
            "minimum": 1,
            "type": "integer",
            "description": "Google returns up to 40 per request, so this rounds up to whole pages. Pagination stops early when the advertiser runs out — it never wastes requests padding to your number.",
            "default": 100
          },
          "region": {
            "title": "Region filter (advanced, usually leave empty)",
            "type": "string",
            "description": "Google's own internal region enum, NOT a country code. Leave empty to get ads from every region. A wrong value returns zero ads with no error from Google, so this Actor does not guess one for you.",
            "default": ""
          },
          "cacheMaxAgeMinutes": {
            "title": "Accept cached results up to (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "An advertiser's ad set changes over days, not minutes, so a recent cached answer is the same answer — and serving it costs Google nothing, which is why this Actor rarely gets rate-limited. Set 0 to force a live fetch.",
            "default": 360
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy (recommended)",
            "type": "boolean",
            "description": "Recommended. Google rate-limits this endpoint per IP: ~25 requests from one address was enough to earn a 429 in testing. Rotating IPs avoids reaching that point.",
            "default": true
          },
          "apifyProxyGroups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Leave empty for datacenter proxies — sufficient here, the endpoint has no browser challenge. Use RESIDENTIAL only if datacenter IPs start getting 429s.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "apifyProxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Optional two-letter code. Leave empty unless you need requests to originate from a specific country.",
            "default": ""
          },
          "minRequestGapSeconds": {
            "title": "Minimum gap between requests (seconds)",
            "type": "string",
            "description": "Default 1.1s. Lower it only with your own proxy pool.",
            "default": "1.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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}