{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper",
    "description": "[$1.50–$1.20/1,000] Scrape LinkedIn Ad Library without login by advertiser, company ID, keyword, payer, combined search or URL. Get copy, media, CTAs, payer, run days, EU impressions & targeting, with monitoring and pre-billing filters. Details included.",
    "version": "0.1",
    "x-build-id": "3SJwajJYaPHNy1rIC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexuscortex~linkedin-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexuscortex-linkedin-ad-library-scraper",
        "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/nexuscortex~linkedin-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nexuscortex-linkedin-ad-library-scraper",
        "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/nexuscortex~linkedin-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nexuscortex-linkedin-ad-library-scraper",
        "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": {
          "accountOwners": {
            "title": "Companies / advertisers",
            "type": "array",
            "description": "Advertiser names exactly as you would type them into LinkedIn Ad Library, e.g. Salesforce. Each entry is scraped as its own independent search target.",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "title": "Company IDs",
            "type": "array",
            "description": "Numeric LinkedIn company IDs such as \"3185\" or 68529. Company page URLs like https://www.linkedin.com/company/3185 are accepted too. Each ID is scraped as its own independent exact company search.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to search in ads, exactly as in LinkedIn's keyword box. Each entry is its own independent search target; use Combined searches to combine a keyword with an advertiser, company, payer or other filters.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional two-letter country codes such as US, GB or DE, or ALL. Empty means no country restriction. Applies to searches generated from the fields above, not to pasted search URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max ads",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many delivered ads in total across all targets. Each delivered ad is one charged result.",
            "default": 200
          },
          "payers": {
            "title": "Payers",
            "type": "array",
            "description": "Payer names exactly as in LinkedIn's payer search box (useful for political and EU transparency research). Each entry is its own independent search target.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "LinkedIn Ad Library or company URLs",
            "type": "array",
            "description": "Paste linkedin.com/ad-library/search?... URLs for combined searches, linkedin.com/ad-library/detail/<adId> URLs for individual ads, or linkedin.com/company/<id-or-slug> company pages. Ad Library search URLs are self-contained; company pages use the shared Countries, date, impressions and targeting fields.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Combined searches",
            "type": "array",
            "description": "Structured combined queries. Each entry needs at least one of advertiser, company ID, keyword or payer; the conditions are combined in one LinkedIn search. Omitted filter fields inherit the top-level values and explicitly set fields override them.",
            "items": {
              "type": "object",
              "properties": {
                "accountOwner": {
                  "title": "Advertiser",
                  "type": "string",
                  "description": "Advertiser name as typed in LinkedIn Ad Library.",
                  "editor": "textfield"
                },
                "companyId": {
                  "title": "Company ID",
                  "type": "string",
                  "description": "Numeric LinkedIn company ID, e.g. \"3185\".",
                  "editor": "textfield"
                },
                "keyword": {
                  "title": "Keyword",
                  "type": "string",
                  "description": "Keyword or phrase to combine in this search.",
                  "editor": "textfield"
                },
                "payer": {
                  "title": "Payer",
                  "type": "string",
                  "description": "Payer name to combine in this search.",
                  "editor": "textfield"
                },
                "countries": {
                  "title": "Countries",
                  "type": "array",
                  "description": "Optional override for this search only.",
                  "editor": "stringList"
                },
                "dateOption": {
                  "title": "Date range",
                  "type": "string",
                  "description": "Optional override for this search only.",
                  "editor": "select",
                  "enum": [
                    "last-30-days",
                    "current-month",
                    "current-year",
                    "last-year",
                    "custom-date-range"
                  ],
                  "enumTitles": [
                    "Last 30 days",
                    "This month",
                    "This year",
                    "Last year",
                    "Custom date range"
                  ]
                },
                "startDate": {
                  "title": "Custom start date",
                  "type": "string",
                  "description": "Optional YYYY-MM-DD override.",
                  "editor": "textfield",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "endDate": {
                  "title": "Custom end date",
                  "type": "string",
                  "description": "Optional YYYY-MM-DD override.",
                  "editor": "textfield",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "minImpressions": {
                  "title": "Minimum impressions",
                  "type": "integer",
                  "description": "Optional non-negative lower bound override.",
                  "minimum": 0
                },
                "maxImpressions": {
                  "title": "Maximum impressions",
                  "type": "integer",
                  "description": "Optional non-negative upper bound override.",
                  "minimum": 0
                },
                "includedTargetingFacetCategories": {
                  "title": "Included targeting facets",
                  "type": "array",
                  "description": "Optional override: ad targeting must include these facet categories.",
                  "editor": "select",
                  "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"
                    ]
                  }
                },
                "excludedTargetingFacetCategories": {
                  "title": "Excluded targeting facets",
                  "type": "array",
                  "description": "Optional override: ad targeting must exclude these facet categories.",
                  "editor": "select",
                  "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"
                    ]
                  }
                }
              },
              "required": [],
              "additionalProperties": false
            }
          },
          "dateOption": {
            "title": "Date range",
            "enum": [
              "last-30-days",
              "current-month",
              "current-year",
              "last-year",
              "custom-date-range"
            ],
            "type": "string",
            "description": "Ads that ran in this period. Applies to generated searches, not to pasted search URLs. If startDate or endDate is set, this automatically becomes a custom date range.",
            "default": "last-30-days"
          },
          "startDate": {
            "title": "Custom start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Setting this or Custom end date automatically switches Date range to custom-date-range."
          },
          "endDate": {
            "title": "Custom end date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Must not be before Custom start date."
          },
          "adFormats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Optional local filter. Deliver only these readable LinkedIn ad formats. Generic search-list formats are resolved on detail pages when Include ad details is on. Applied before charging.",
            "items": {
              "type": "string",
              "enum": [
                "Single Image Ad",
                "Video Ad",
                "Carousel Ad",
                "Document Ad",
                "Spotlight Ad",
                "Text Ad",
                "Message Ad",
                "Event Ad",
                "Follower Ad",
                "Job Ad",
                "Article Ad"
              ],
              "enumTitles": [
                "Single Image Ad",
                "Video Ad",
                "Carousel Ad",
                "Document Ad",
                "Spotlight Ad",
                "Text Ad",
                "Message Ad",
                "Event Ad",
                "Follower Ad",
                "Job Ad",
                "Article Ad"
              ]
            },
            "default": []
          },
          "minImpressions": {
            "title": "Minimum impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Optional non-negative lower total-impressions bound, e.g. 10000. Sent to LinkedIn as its native impressions filter and verified against detail-page buckets before charging when details are enabled."
          },
          "maxImpressions": {
            "title": "Maximum impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Optional non-negative upper total-impressions bound, e.g. 500000. Must not be lower than Minimum impressions."
          },
          "includedTargetingFacetCategories": {
            "title": "Included targeting facets",
            "type": "array",
            "description": "Optional LinkedIn targeting-facet filter. Deliver ads whose EU transparency data marks these categories as targeted; detail-page verification happens before charging when details are enabled.",
            "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"
              ]
            },
            "default": []
          },
          "excludedTargetingFacetCategories": {
            "title": "Excluded targeting facets",
            "type": "array",
            "description": "Optional LinkedIn targeting-facet filter. Deliver ads whose EU transparency data marks these categories as excluded; detail-page verification happens before charging when details are enabled.",
            "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"
              ]
            },
            "default": []
          },
          "includeDetails": {
            "title": "Include ad details",
            "type": "boolean",
            "description": "Read each ad's public detail page and add payer, exact format, fuller copy, landing link where public, and EU impressions/targeting when shown. One extra request per ad, no extra charge. Detail URLs are always read as detail pages.",
            "default": true
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Optional. Deliver only ads whose body, headline, advertiser, CTA, landing domain or payer matches at least one of these words or phrases. Applied before charging.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional. Drop ads whose body, headline, advertiser, CTA, landing domain or payer matches any of these words or phrases. Obvious matches skip the detail request and are never charged.",
            "items": {
              "type": "string"
            }
          },
          "landingDomains": {
            "title": "Landing page domains",
            "type": "array",
            "description": "Optional. Deliver only ads whose public destination URL is on one of these domains or a sub-domain, e.g. example.com or https://www.example.com/shop. Many non-EU ads do not expose a destination and cannot pass this filter.",
            "items": {
              "type": "string"
            }
          },
          "monitorName": {
            "title": "Monitoring name (new ads only)",
            "type": "string",
            "description": "Optional. Runs with the same name deliver and charge only ads not delivered by earlier runs. Schedule the Actor daily with a stable name to build a new-ads feed. Names may contain Chinese or special characters; they are hashed into a valid store name."
          },
          "maxAdsPerTarget": {
            "title": "Max search cards per target",
            "minimum": 1,
            "type": "integer",
            "description": "Stop scanning each target after this many unique search-result cards, whether they are delivered, duplicates or filtered out. Keeps recurring monitors bounded.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many targets to scrape at once, from 1 to 3. LinkedIn request pacing still applies inside every worker.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is recommended. With automatic Apify Proxy, the Actor starts on the regular pool and switches new sessions to residential proxies after repeated 403/429/Cloudflare blocks. Choosing your own groups or URLs disables that escalation and is respected exactly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}