{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper: Competitor Ads, No Login",
    "description": "Scrape the LinkedIn Ad Library without login. Search ads by company, keyword or payer and get ad text, CTA, images, video, run dates, impressions by country and targeting. Track your competitors' new ads.",
    "version": "0.1",
    "x-build-id": "W01iGdunbdd2XFbx2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~linkedin-ad-library/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-linkedin-ad-library",
        "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/cliqtomedia~linkedin-ad-library/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-linkedin-ad-library",
        "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/cliqtomedia~linkedin-ad-library/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-linkedin-ad-library",
        "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": {
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Advertiser names as LinkedIn shows them (\"Apify\", \"HubSpot\"). Each name is one search of the Ad Library. LinkedIn matches names loosely, so turn on Exact company match to drop look-alike advertisers. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Company page URLs or IDs",
            "type": "array",
            "description": "LinkedIn company pages (linkedin.com/company/apify) or numeric company IDs (10608457). The Actor finds the company ID and returns only that company's ads. Personal profiles are not supported. Up to 100.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words in the ad text (\"web scraping\", \"CRM\"). Each keyword is one search across all advertisers. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "payers": {
            "title": "Paid by",
            "type": "array",
            "description": "Name of the paying entity shown as \"Paid for by\" (agencies, parent companies). Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Ad Library URLs",
            "type": "array",
            "description": "Paste linkedin.com/ad-library/search?… links with your filters, or single-ad links (linkedin.com/ad-library/detail/…). Filters in a pasted search link win over the filters below. Up to 100.",
            "items": {
              "type": "string"
            }
          },
          "adIds": {
            "title": "Ad IDs",
            "type": "array",
            "description": "Numeric LinkedIn ad IDs or ad detail links, to refresh known ads. The whole list counts as one search; an ID that does not exist costs a small ad-checked fee. Up to 1000.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter codes of countries where the ads ran (US, GB, DE, …). All listed countries go into one search. Empty means all countries. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "all-time",
              "last-30-days",
              "current-month",
              "current-year",
              "last-year",
              "custom-date-range"
            ],
            "type": "string",
            "description": "When the ads ran. LinkedIn keeps ads in the library for one year after they last ran.",
            "default": "all-time"
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Start of a custom date range (YYYY-MM-DD). Needs To date as well."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "End of a custom date range (YYYY-MM-DD)."
          },
          "impressionsMin": {
            "title": "Min impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only ads with at least this many impressions (LinkedIn rounds to 1k / 1M steps). Impressions exist only for ads shown in the EU."
          },
          "impressionsMax": {
            "title": "Max impressions",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only ads with at most this many impressions."
          },
          "targetingIncluded": {
            "title": "Targeting includes",
            "type": "array",
            "description": "Keep only ads that target by these categories (LinkedIn filter, EU ads only).",
            "items": {
              "type": "string",
              "enum": [
                "LANGUAGE",
                "LOCATION",
                "AUDIENCE",
                "DEMOGRAPHIC",
                "COMPANY",
                "EDUCATION",
                "JOB",
                "INTERESTS_AND_TRAITS"
              ],
              "enumTitles": [
                "Language",
                "Location",
                "Audience",
                "Demographic",
                "Company",
                "Education",
                "Job",
                "Interests and traits"
              ]
            }
          },
          "targetingExcluded": {
            "title": "Targeting excludes",
            "type": "array",
            "description": "Keep only ads that exclude people by these categories.",
            "items": {
              "type": "string",
              "enum": [
                "LANGUAGE",
                "LOCATION",
                "AUDIENCE",
                "DEMOGRAPHIC",
                "COMPANY",
                "EDUCATION",
                "JOB",
                "INTERESTS_AND_TRAITS"
              ],
              "enumTitles": [
                "Language",
                "Location",
                "Audience",
                "Demographic",
                "Company",
                "Education",
                "Job",
                "Interests and traits"
              ]
            }
          },
          "adFormats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Keep only these formats. Empty means all. Each filtered-out ad costs a small ad-checked fee instead of the ad price.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "carousel",
                "document",
                "message",
                "article",
                "text",
                "spotlight",
                "follower",
                "event",
                "job",
                "other"
              ],
              "enumTitles": [
                "Single image",
                "Video",
                "Carousel",
                "Document",
                "Message / conversation",
                "Article / newsletter",
                "Text ad",
                "Spotlight",
                "Follower ad",
                "Event",
                "Job",
                "Other"
              ]
            }
          },
          "exactCompanyMatch": {
            "title": "Exact company match",
            "type": "boolean",
            "description": "For Company names: keep only ads whose advertiser name equals the name you typed (case and punctuation ignored). Use Company page URLs for a guaranteed exact match.",
            "default": false
          },
          "sortOrder": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order in which LinkedIn returns ads.",
            "default": "newest"
          },
          "maxAds": {
            "title": "Max ads per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each search after this many ads. You pay per ad delivered.",
            "default": 100
          },
          "includeDetails": {
            "title": "Open each ad for full details",
            "type": "boolean",
            "description": "Open every ad's detail page: full text, headline, CTA, landing URL, all images and video, payer, run dates, impressions by country and targeting. Charged as an extra ad-details event per ad. Off gives the short search-card preview only.",
            "default": true
          },
          "trackChanges": {
            "title": "Track new ads",
            "type": "boolean",
            "description": "Remember which ads each search returned. Every ad gets changeStatus new or seen and firstFoundAt; the CHANGES record lists new ad IDs. Use with a schedule to monitor competitors.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Deliver only ads not seen by the same search in earlier runs. Each skipped, already seen ad costs a small ad-checked fee instead of the ad price. Turns on change tracking.",
            "default": false
          },
          "stateName": {
            "title": "Tracking memory name",
            "type": "string",
            "description": "Name of the key-value store that keeps the tracking memory. Use different names for independent monitors. Lowercase letters, digits and hyphens.",
            "default": "linkedin-ad-library-state"
          },
          "includeAdvertiserSummary": {
            "title": "Advertiser comparison summary",
            "type": "boolean",
            "description": "Write an ADVERTISER_SUMMARY record: per advertiser ad count, formats, CTAs, landing domains, top countries, targeting categories and longest-running ads. Put 2–3 competitors in one run to compare them. Free.",
            "default": false
          },
          "concurrency": {
            "title": "Ad pages read at once",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many ad detail pages are read in parallel through the proxy. Leave empty for the default (5). Lower it if you see many retries in the run summary. Without a proxy the Actor reads one page at a time."
          },
          "requestDelayMs": {
            "title": "Pause between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra pause between requests to LinkedIn. Leave empty for the default pace (250 ms with a proxy). A longer pause makes the run slower, not cheaper."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default (Apify Proxy, datacenter IPs) works for most runs. If LinkedIn keeps refusing a request, the Actor retries it through Apify residential IPs when your account has them.",
            "default": {
              "useApifyProxy": true
            }
          },
          "deliveryConnector": {
            "title": "Send results to (optional)",
            "type": "string",
            "description": "Your Slack, Notion or other MCP connector. After the run the Actor posts a short summary there. Connect services once in Apify Console → MCP connectors."
          },
          "deliveryTarget": {
            "title": "Notion page or channel (optional)",
            "type": "string",
            "description": "Where to post the summary: a Notion page link (each run is added on top of that page) or a Slack channel ID. Leave empty to let the connector decide."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}