{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper [NO COOKIES] ✅",
    "description": "Extract every ad your competitors run on LinkedIn - creatives, headlines, CTAs, body copy, carousels, video, targeting and run dates. 34 fields per ad. Search by brand or keyword, or paste an Ad Library URL. No login, no cookies. For B2B marketers and growth agencies.",
    "version": "0.0",
    "x-build-id": "iEu7OrwLQWzFMAPqY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unseenuser~LinkedIn-ads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unseenuser-LinkedIn-ads",
        "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/unseenuser~LinkedIn-ads/runs": {
      "post": {
        "operationId": "runs-sync-unseenuser-LinkedIn-ads",
        "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/unseenuser~LinkedIn-ads/run-sync": {
      "post": {
        "operationId": "run-sync-unseenuser-LinkedIn-ads",
        "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": {
          "companies": {
            "title": "Company names",
            "type": "array",
            "description": "One or more company names. Each name triggers a separate search — great for scraping multiple brands in one run. Names are matched as text, so a search returns every advertiser whose name contains your term, not one specific company: \"make.com\" also returns \"Slashtec.com : Make It DONE!\". Use LinkedIn company IDs below when you need exactly one advertiser, and check the advertiser column before treating results as one company's ads.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to search for. Each keyword triggers its own search.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "companyIds": {
            "title": "LinkedIn company IDs",
            "type": "array",
            "description": "Optional. Numeric LinkedIn company IDs — the reliable way to target one exact advertiser, with none of the name matching above. Find the ID in the advertiserLinkedinPage column of any previous run (linkedin.com/company/1035 → 1035). Each ID triggers its own search.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Pick one or more countries to only include ads targeted there. Leave empty for all countries. Applied to every search.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "CA",
                "AU",
                "NZ",
                "IE",
                "DE",
                "FR",
                "ES",
                "IT",
                "NL",
                "BE",
                "AT",
                "CH",
                "PT",
                "SE",
                "NO",
                "DK",
                "FI",
                "IS",
                "PL",
                "CZ",
                "SK",
                "HU",
                "RO",
                "BG",
                "GR",
                "HR",
                "SI",
                "EE",
                "LV",
                "LT",
                "UA",
                "RS",
                "IL",
                "AE",
                "SA",
                "QA",
                "KW",
                "TR",
                "EG",
                "ZA",
                "NG",
                "KE",
                "MA",
                "IN",
                "SG",
                "MY",
                "TH",
                "ID",
                "PH",
                "VN",
                "HK",
                "TW",
                "JP",
                "KR",
                "CN",
                "BR",
                "MX",
                "AR",
                "CL",
                "CO",
                "PE",
                "UY",
                "CR",
                "PA",
                "RU",
                "KZ",
                "PK",
                "BD",
                "LK",
                "NP"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Canada",
                "Australia",
                "New Zealand",
                "Ireland",
                "Germany",
                "France",
                "Spain",
                "Italy",
                "Netherlands",
                "Belgium",
                "Austria",
                "Switzerland",
                "Portugal",
                "Sweden",
                "Norway",
                "Denmark",
                "Finland",
                "Iceland",
                "Poland",
                "Czechia",
                "Slovakia",
                "Hungary",
                "Romania",
                "Bulgaria",
                "Greece",
                "Croatia",
                "Slovenia",
                "Estonia",
                "Latvia",
                "Lithuania",
                "Ukraine",
                "Serbia",
                "Israel",
                "United Arab Emirates",
                "Saudi Arabia",
                "Qatar",
                "Kuwait",
                "Turkey",
                "Egypt",
                "South Africa",
                "Nigeria",
                "Kenya",
                "Morocco",
                "India",
                "Singapore",
                "Malaysia",
                "Thailand",
                "Indonesia",
                "Philippines",
                "Vietnam",
                "Hong Kong",
                "Taiwan",
                "Japan",
                "South Korea",
                "China",
                "Brazil",
                "Mexico",
                "Argentina",
                "Chile",
                "Colombia",
                "Peru",
                "Uruguay",
                "Costa Rica",
                "Panama",
                "Russia",
                "Kazakhstan",
                "Pakistan",
                "Bangladesh",
                "Sri Lanka",
                "Nepal"
              ]
            },
            "default": []
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Only include ads that ran on or after this date."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Only include ads that ran on or before this date."
          },
          "maxResults": {
            "title": "Max ads to return (0 = all ads found)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Global cap across all searches. Set to 0 to return every ad found, with no limit. The scraper pages through results automatically until this cap is hit.",
            "default": 0
          },
          "maxResultsPerQuery": {
            "title": "Max ads per company / keyword (0 = no per-search limit)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Caps each individual search (one company name, one keyword, or one company ID) at this many ads. Set to 0 for no per-search limit. Useful when scraping many brands - stops one prolific advertiser from eating the whole global cap.",
            "default": 0
          },
          "adTypes": {
            "title": "Ad formats",
            "type": "array",
            "description": "Only keep ads in these formats. Leave empty for all formats. Non-matching ads are dropped before any detail lookup, so they cost you nothing. The list covers every format seen in real output; if you need one that is not here, open an issue.",
            "items": {
              "type": "string",
              "enum": [
                "Single Image Ad",
                "Video Ad",
                "Carousel Ad",
                "Document Ad",
                "Message Ad",
                "Event Ad",
                "Follow Company Ad"
              ],
              "enumTitles": [
                "Single Image Ad",
                "Video Ad",
                "Carousel Ad",
                "Document Ad",
                "Message Ad",
                "Event Ad",
                "Follow Company Ad"
              ]
            },
            "default": []
          },
          "fetchAdDetails": {
            "title": "Include full ad details",
            "type": "boolean",
            "description": "For every ad, also fetch the full ad page — headline, description, destination URL, CTA, targeting info, etc. Slower and roughly 2x the cost.",
            "default": false
          },
          "enrichAdvertisers": {
            "title": "Add advertiser company profiles",
            "type": "boolean",
            "description": "Look up each advertiser's LinkedIn company page and attach industry, company size, employee count, founding year, website and headquarters to every ad, plus a separate advertisers table with their description, specialties, funding history and similar-company list. Costs one extra lookup per company, not per ad.",
            "default": false
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (for AI enrichment)",
            "type": "string",
            "description": "Optional. Paste your own Anthropic API key to classify each ad's creative angle and inferred audience, and to generate a strategy summary per advertiser. Billed to your Anthropic account, not through Apify. Leave empty to skip AI enrichment entirely."
          },
          "aiModel": {
            "title": "AI model",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-5"
            ],
            "type": "string",
            "description": "Which Claude model does the AI enrichment. Only used when an Anthropic API key is supplied. Costs shown are per 1,000 ads, billed to your Anthropic account.",
            "default": "claude-haiku-4-5"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many detail fetches to run in parallel.",
            "default": 5
          },
          "searchUrls": {
            "title": "Ad Library URLs",
            "type": "array",
            "description": "Optional. Paste LinkedIn Ad Library URLs straight from your browser. A search URL (linkedin.com/ad-library/search?...) has its filters read off the URL and added to the search. A single-ad URL (linkedin.com/ad-library/detail/<id>) is fetched directly. Values you type into the fields above always take priority; a URL only fills in a filter you left empty.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "adUrls": {
            "title": "Ad URLs",
            "type": "array",
            "description": "Optional. Paste LinkedIn ad URLs (https://www.linkedin.com/ad-library/detail/<id>). These ads are fetched directly and in full. If you also filled in any search fields above, those searches run afterwards and their results are added to the same dataset.",
            "items": {
              "type": "string"
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}