{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency with ad texts (by H3.0)",
    "description": "Scrapes all ads from Google platforms linked to a specific domain or advertiser, including complete ad text. Ideal for market research, competitor analysis, and ad monitoring.",
    "version": "0.3",
    "x-build-id": "SK4OZqnTSURK7cchV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hondzyk.suda~h3-0-google-ads-transparency-by-domain-or-advertiser-id/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hondzyk.suda-h3-0-google-ads-transparency-by-domain-or-advertiser-id",
        "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/hondzyk.suda~h3-0-google-ads-transparency-by-domain-or-advertiser-id/runs": {
      "post": {
        "operationId": "runs-sync-hondzyk.suda-h3-0-google-ads-transparency-by-domain-or-advertiser-id",
        "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/hondzyk.suda~h3-0-google-ads-transparency-by-domain-or-advertiser-id/run-sync": {
      "post": {
        "operationId": "run-sync-hondzyk.suda-h3-0-google-ads-transparency-by-domain-or-advertiser-id",
        "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": [
          "region",
          "domain",
          "startDate",
          "endDate"
        ],
        "properties": {
          "region": {
            "title": "Region Code",
            "pattern": "^[A-Z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "ISO 3166-1 alpha-2 region code (e.g., CZ). Must be 2 uppercase letters."
          },
          "domain": {
            "title": "Domain",
            "pattern": "^[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",
            "minLength": 3,
            "type": "string",
            "description": "Domain to search (e.g., vodafone.cz), without www or subdirectories."
          },
          "startDate": {
            "title": "Start Date",
            "pattern": "^(\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])|\\d{8})$",
            "type": "string",
            "description": "Start date in YYYY-MM-DD or YYYYMMDD format."
          },
          "endDate": {
            "title": "End Date",
            "pattern": "^(\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])|\\d{8})$",
            "type": "string",
            "description": "End date in YYYY-MM-DD or YYYYMMDD format."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of results to scrape.",
            "default": 20000
          },
          "batchSize": {
            "title": "Output batch size",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Number of items pushed to the Output dataset at once (streamed).",
            "default": 50
          },
          "readImages": {
            "title": "Read Image Text (OCR)",
            "type": "boolean",
            "description": "Enable OCR on downloaded ad images to estimate text.",
            "default": false
          },
          "authCookies": {
            "title": "Authentication Cookies",
            "type": "array",
            "description": "Google authentication cookies (exported from logged-in browser). Required to see ads when running via API. Export cookies using browser extension (EditThisCookie, Cookie-Editor) and paste as JSON array.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "title": "Cookie Name",
                  "description": "Name of the cookie (e.g., SID, HSID)"
                },
                "value": {
                  "type": "string",
                  "title": "Cookie Value",
                  "description": "Value of the cookie"
                },
                "domain": {
                  "type": "string",
                  "title": "Cookie Domain",
                  "description": "Domain for the cookie (e.g., .google.com)"
                },
                "path": {
                  "type": "string",
                  "title": "Cookie Path",
                  "description": "Path for the cookie (usually /)"
                },
                "expires": {
                  "type": "integer",
                  "title": "Cookie Expires",
                  "description": "Expiration timestamp (Unix time in seconds, or -1 for session cookie)"
                },
                "httpOnly": {
                  "type": "boolean",
                  "title": "HTTP Only",
                  "description": "Whether the cookie is HTTP-only"
                },
                "secure": {
                  "type": "boolean",
                  "title": "Secure",
                  "description": "Whether the cookie requires HTTPS"
                },
                "sameSite": {
                  "type": "string",
                  "title": "Same Site",
                  "description": "SameSite attribute (Lax, Strict, or None)"
                }
              },
              "required": [
                "name",
                "value"
              ]
            }
          },
          "useIncognitoPages": {
            "title": "Use Incognito Pages",
            "type": "boolean",
            "description": "Use incognito browser context (default: true). Set to false to use persistent browser context for maintaining login sessions (only works for local/interactive runs).",
            "default": true
          },
          "sessionPoolId": {
            "title": "Session Pool ID",
            "type": "string",
            "description": "Apify Session Pool ID to use for authentication. If provided, will use Session Pool instead of manual cookie injection. Create a Session Pool in Apify Console, manually log in, then provide the Session Pool ID here."
          },
          "max-results": {
            "title": "Max Results (legacy)",
            "type": "integer",
            "description": "Legacy alias of maxResults. Use 'maxResults'."
          },
          "batch-size": {
            "title": "Output batch size (legacy)",
            "type": "integer",
            "description": "Legacy alias of batchSize. Use 'batchSize'."
          },
          "read-images": {
            "title": "Read Image Text (legacy)",
            "description": "Legacy alias of readImages. Accepts boolean, 0, 1, or string. Use 'readImages'."
          },
          "start-date": {
            "title": "Start Date (legacy)",
            "type": "string",
            "description": "Legacy alias of startDate. Use 'startDate'."
          },
          "end-date": {
            "title": "End Date (legacy)",
            "type": "string",
            "description": "Legacy alias of endDate. Use 'endDate'."
          },
          "auth-cookies": {
            "title": "Authentication Cookies (legacy)",
            "type": "array",
            "description": "Legacy alias of authCookies. Use 'authCookies'.",
            "items": {
              "type": "object"
            }
          },
          "use-incognito-pages": {
            "title": "Use Incognito Pages (legacy)",
            "type": "boolean",
            "description": "Legacy alias of useIncognitoPages. Use 'useIncognitoPages'."
          },
          "session-pool-id": {
            "title": "Session Pool ID (legacy)",
            "type": "string",
            "description": "Legacy alias of sessionPoolId. Use 'sessionPoolId'."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}