{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Transparency & LinkedIn Ad Library Scraper",
    "description": "Scrape Google Ads Transparency Center (Search, Display, YouTube) and LinkedIn Ad Library by domain or advertiser/company name. Get ad copy, creatives, landing pages, dates, regions, impressions. Monitor competitors with 'only new ads' alerts.",
    "version": "0.1",
    "x-build-id": "Fnrs7xxZxxr32VYas"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latentlark~competitor-ads-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latentlark-competitor-ads-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/latentlark~competitor-ads-monitor/runs": {
      "post": {
        "operationId": "runs-sync-latentlark-competitor-ads-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/latentlark~competitor-ads-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-latentlark-competitor-ads-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",
        "properties": {
          "domains": {
            "title": "Domains or Google advertiser names",
            "type": "array",
            "description": "One per line. A competitor website (hubspot.com), a Google advertiser ID (AR10072600183532683265), an Ads Transparency advertiser URL, or an advertiser name (Salesforce). Used for Google.",
            "items": {
              "type": "string"
            }
          },
          "linkedinCompanies": {
            "title": "LinkedIn companies",
            "type": "array",
            "description": "One per line. Company name as the advertiser appears on LinkedIn (HubSpot), a LinkedIn company URL (linkedin.com/company/hubspot) or a numeric company ID. Used when LinkedIn is selected.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which ad libraries to check. LinkedIn is in beta.",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "linkedin"
              ],
              "enumTitles": [
                "Google Ads Transparency Center",
                "LinkedIn Ad Library"
              ]
            },
            "default": [
              "google"
            ]
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser",
            "minimum": 0,
            "type": "integer",
            "description": "Newest ads first. Keeps cost predictable on big advertisers. 0 = no limit.",
            "default": 50
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "2-letter country codes, e.g. US, DE, GB. Empty = all regions.",
            "items": {
              "type": "string"
            }
          },
          "dateRange": {
            "title": "Ads shown in",
            "enum": [
              "anytime",
              "last7days",
              "last30days",
              "last90days",
              "last365days",
              "custom"
            ],
            "type": "string",
            "description": "Only ads shown in this period. For 'Custom', set start and end date.",
            "default": "anytime"
          },
          "startDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "YYYY-MM-DD. Used when 'Ads shown in' is Custom."
          },
          "endDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "YYYY-MM-DD. Used when 'Ads shown in' is Custom."
          },
          "domainOwnerOnly": {
            "title": "Only the domain owner's ads",
            "type": "boolean",
            "description": "Google also lists ads from other advertisers (agencies, resellers) that link to the domain. On = keep only advertisers whose name matches the domain (fallback: the biggest advertiser). Off = all advertisers.",
            "default": true
          },
          "includeDetails": {
            "title": "Include details (copy, landing page, regions, impressions)",
            "type": "boolean",
            "description": "One extra lookup per ad for headline, text, CTA, landing URL, video, regions and impression ranges. Turn off for a faster creative list.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new ads since last run",
            "type": "boolean",
            "description": "Output only ads not seen in previous runs with the same monitor key. The first run saves everything as the baseline. Ideal for scheduled alerts.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name for this watchlist's memory (e.g. 'crm-competitors'). Use different keys for different schedules."
          },
          "stoppedAfterDays": {
            "title": "Mark as stopped after (days)",
            "minimum": 1,
            "type": "integer",
            "description": "stoppedRunning = true when an ad was last shown more than this many days ago.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy (LinkedIn)",
            "type": "object",
            "description": "LinkedIn blocks cloud server IPs, so LinkedIn requests go through Apify residential proxy (very little traffic: about 15 KB per ad). Google never uses the proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "debugSaveHtml": {
            "title": "Debug: save LinkedIn HTML",
            "type": "boolean",
            "description": "Save raw LinkedIn pages to the key-value store for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}