{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency Center API - Competitor Ads",
    "description": "Google Ads Transparency Center API and ad library: advertiser ads by domain with full creatives, formats, regions and dates. Track new or stopped ads.",
    "version": "0.2",
    "x-build-id": "RwHT6sP3ddgAve6s1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ocius-data~google-ads-transparency-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ocius-data-google-ads-transparency-reliable",
        "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/ocius-data~google-ads-transparency-reliable/runs": {
      "post": {
        "operationId": "runs-sync-ocius-data-google-ads-transparency-reliable",
        "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/ocius-data~google-ads-transparency-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-ocius-data-google-ads-transparency-reliable",
        "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": {
          "searchQueries": {
            "title": "Advertiser names or domains",
            "type": "array",
            "description": "Advertiser names (for example Nike) or website domains (for example nike.com). A domain returns every ad that points to that website. A name is matched against the Transparency Center advertiser search. You are charged once per unique ad saved.",
            "items": {
              "type": "string"
            }
          },
          "advertiserIds": {
            "title": "Advertiser IDs",
            "type": "array",
            "description": "Transparency Center advertiser IDs (for example AR11877675844556029953) or advertiser page URLs. The ID is the part after /advertiser/ in the URL.",
            "items": {
              "type": "string"
            }
          },
          "maxAdvertisersPerQuery": {
            "title": "Advertisers per name search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "When you search by name, how many matching advertisers to scrape. 1 keeps only the best match (an exact name match is preferred). Not used for domains or advertiser IDs.",
            "default": 1
          },
          "region": {
            "title": "Region (country code)",
            "pattern": "^([A-Za-z]{2}|anywhere|ANYWHERE)?$",
            "type": "string",
            "description": "Two-letter country code, such as US, GB, CO, ES, BR or MX. Only ads shown in that country are returned. Leave empty for all regions.",
            "default": ""
          },
          "dateFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this date (YYYY-MM-DD). Set it together with Shown until, or leave both empty for all dates. Google applies dates in Pacific time."
          },
          "dateTo": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this date (YYYY-MM-DD). Set it together with Shown from."
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "",
              "TEXT",
              "IMAGE",
              "VIDEO"
            ],
            "type": "string",
            "description": "Return only ads of this format, as in the Transparency Center format filter.",
            "default": ""
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "",
              "SEARCH",
              "YOUTUBE",
              "SHOPPING",
              "MAPS",
              "PLAY"
            ],
            "type": "string",
            "description": "Return only ads shown on this Google platform. Google only applies this filter to ads shown since 4 September 2023.",
            "default": ""
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser or domain",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of ads saved for each advertiser or domain. The limit is applied in code, so you never pay for more ads than this.",
            "default": 50
          },
          "fetchDetails": {
            "title": "Fetch ad details",
            "type": "boolean",
            "description": "Open each ad to add the regions where it was shown (with first and last shown dates and, in the EU, impression ranges and platforms), the ad text (headline, description, call to action), image and video URLs, and the landing page. Turn off for a faster list with dates, format and preview links only. The price per ad is the same.",
            "default": true
          },
          "fullCreative": {
            "title": "Full creative (premium)",
            "type": "boolean",
            "description": "Read every variation of each ad and return the complete creative: all headlines, descriptions and calls to action, every image URL with its size, every YouTube video URL and every landing page, plus one entry per variation. Turns on ad details automatically. Adds the premium \"ad-creative-full\" event for each ad that has at least one creative asset; ads without assets are not charged for it. See the Pricing section.",
            "default": false
          },
          "advertiserSummary": {
            "title": "Advertiser summary (one row per advertiser)",
            "type": "boolean",
            "description": "Return one row per advertiser instead of one row per ad: ads scanned, active ads, ads per format, regions and platforms (from the ads opened when Fetch ad details is on, up to 100 per advertiser), and first and last seen dates. Max ads per advertiser sets how many of the most recent ads are scanned. Cannot be combined with Full creative or monitoring mode. Charged with the advertiser-summary event; while that event is not listed in the Pricing section, summary rows are not charged.",
            "default": false
          },
          "monitorChanges": {
            "title": "Only new or stopped ads since the last run",
            "type": "boolean",
            "description": "Monitoring mode. The Actor keeps a snapshot of each advertiser or domain in a named key-value store and returns only ads that are NEW, STOPPED or RESUMED since the previous run. The first run saves the current ads as the baseline. Unchanged ads are free. Schedule the Actor (for example daily) to track competitors. In this mode, Max ads per advertiser is how many of the most recent ads are checked per run.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "Name of the key-value store that keeps one snapshot per advertiser or domain (and per region, format and platform filter) between runs. Use a different name for each independent monitoring setup. Lowercase letters, digits and hyphens.",
            "default": "google-ads-monitor"
          },
          "stoppedAfterDays": {
            "title": "Stopped after (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "An ad counts as active when Google shows it as last shown within this many days, and as STOPPED once its last shown date is older. Also used for the isActive field in every row.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run in parallel. Higher is faster but more likely to be rate-limited by Google.",
            "default": 4
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many times a rate-limited or failed request is retried with a new session and IP address, after the first attempt.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "By default the Actor starts with Apify datacenter proxies and switches automatically to residential proxies (in the selected region, if any) when Google rate-limits requests.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}