{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper [NO COOKIES] ✅",
    "description": "Extract every ad your competitors are running on LinkedIn - full creatives, headlines, CTAs, body copy, advertiser details, run dates. Search by keyword, advertiser name, or paste any Ad Library URL. No login, no cookies. Built for B2B marketers and growth agencies.",
    "version": "0.0",
    "x-build-id": "gQmA0TnBsPMxzlfo0"
  },
  "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.",
            "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 — useful when a company name is ambiguous. 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
          },
          "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
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many detail fetches to run in parallel.",
            "default": 5
          },
          "adUrls": {
            "title": "Ad URLs",
            "type": "array",
            "description": "Optional. Paste LinkedIn ad URLs (https://www.linkedin.com/ad-library/detail/<id>). When filled, the scraper skips search and only fetches details for these URLs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}