{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center Scraper",
    "description": "Scrape Google Ads Transparency Center ads by domain or advertiser across 237 regions. Filter text, image, and video creatives on YouTube, Search, Display, Shopping, Maps, and Play.",
    "version": "0.3",
    "x-build-id": "DLPRztYw9CiyEP8vH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~google-ads-transparency-center-vn/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-google-ads-transparency-center-vn",
        "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/lentic_clockss~google-ads-transparency-center-vn/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-google-ads-transparency-center-vn",
        "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/lentic_clockss~google-ads-transparency-center-vn/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-google-ads-transparency-center-vn",
        "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": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "fixture",
              "real"
            ],
            "type": "string",
            "description": "Use real for live Transparency Center requests. fixture is for deterministic smoke tests only.",
            "default": "real"
          },
          "region": {
            "title": "Region",
            "pattern": "^(anywhere|[A-Za-z]{2})$",
            "type": "string",
            "description": "Two-letter country code or 'anywhere'. Supports all Transparency Center regions (237 countries/territories).",
            "default": "VN"
          },
          "targets": {
            "title": "Targets",
            "minItems": 1,
            "type": "array",
            "description": "One or more Transparency Center targets. Every target is processed in order.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "searchMode",
                "searchValue"
              ],
              "properties": {
                "searchMode": {
                  "title": "Search mode",
                  "type": "string",
                  "description": "Only domain and advertiser targets are supported in stage one.",
                  "enum": [
                    "domain",
                    "advertiser"
                  ]
                },
                "searchValue": {
                  "title": "Search value",
                  "type": "string",
                  "description": "The domain or advertiser value sent to Transparency Center.",
                  "minLength": 1
                },
                "targetLabel": {
                  "title": "Target label",
                  "type": "string",
                  "description": "Optional reporting label for grouping output rows."
                }
              }
            }
          },
          "maxCreativesPerTarget": {
            "title": "Max creatives per target",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound for creatives emitted per target across paginated RPC pages.",
            "default": 30
          },
          "includeCreativeDetails": {
            "title": "Include creative details",
            "type": "boolean",
            "description": "When true, fetch and merge GetCreativeById detail payloads.",
            "default": true
          },
          "includeVariantContent": {
            "title": "Include variant content",
            "type": "boolean",
            "description": "When true, fetch and parse variant content payloads.",
            "default": true
          },
          "includeRawJson": {
            "title": "Include raw JSON",
            "type": "boolean",
            "description": "When true, preserve raw search/creative/advertiser RPC fragments on each dataset item.",
            "default": false
          },
          "fixtures": {
            "title": "Fixture bundle",
            "type": "object",
            "description": "Optional fixture override for deterministic local validation. When omitted in fixture mode, the Actor uses built-in smoke payloads packaged in src/default_fixtures.py."
          },
          "session": {
            "title": "Session bootstrap",
            "type": "object",
            "description": "Optional live-mode session material such as cookies, headers, and user agent."
          },
          "rpcIds": {
            "title": "RPC overrides",
            "type": "object",
            "description": "Optional RPC path overrides (alias of rpcPaths) for search_creatives, get_creative_by_id, and get_advertiser_by_id."
          },
          "baseUrl": {
            "title": "Base URL override",
            "type": "string",
            "description": "Optional override for the Transparency Center origin. Leave empty for production.",
            "default": "https://adstransparency.google.com"
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 1,
            "maximum": 120,
            "type": "number",
            "description": "HTTP timeout for live-mode requests.",
            "default": 30
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Enable extra debug logging and write DEBUG_ARTIFACTS to the key-value store.",
            "default": false
          },
          "keepDebugArtifacts": {
            "title": "Keep debug artifacts",
            "type": "boolean",
            "description": "Keep DEBUG_ARTIFACTS in the key-value store after the run.",
            "default": false
          },
          "rpcPaths": {
            "title": "RPC path overrides",
            "type": "object",
            "description": "Optional RPC path overrides for search_creatives, search_suggestions, get_creative_by_id, and get_advertiser_by_id. rpcIds is accepted as an alias."
          },
          "maxPagesPerTarget": {
            "title": "Max pages per target",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum SearchCreatives RPC pages to fetch per target (40 creatives/page).",
            "default": 5
          },
          "creativeFormats": {
            "title": "Creative formats",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by ad creative format(s). Leave empty or omit for all formats (text, image, video).",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": []
          },
          "platforms": {
            "title": "Ad platforms",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by Google surface/platform(s). Leave empty or omit for all platforms.",
            "items": {
              "type": "string",
              "enum": [
                "youtube",
                "search",
                "display",
                "shopping",
                "maps",
                "play"
              ],
              "enumTitles": [
                "YouTube",
                "Search",
                "Display",
                "Shopping",
                "Maps",
                "Play"
              ]
            },
            "default": []
          },
          "strictErrors": {
            "title": "Strict errors",
            "type": "boolean",
            "description": "When true, fail the run on creative/advertiser/variant lookup errors instead of continuing with warnings.",
            "default": false
          },
          "workerBaseUrl": {
            "title": "Worker base URL override",
            "type": "string",
            "description": "Optional HTTPS override for the VPS worker. Host must be allowlisted (default gatc.opendata.best)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}