{
  "description": "Search the public LinkedIn Ad Library, scrape specific ads, or count matches. Every keyword, advertiser, payer, and company-ID group becomes its own search; country, date, sort, impression, and targeting filters apply to all searches.",
  "properties": {
    "adIds": {
      "default": [],
      "description": "Numeric ad IDs or linkedin.com/ad-library/detail/... URLs. Used by mode adDetails.",
      "editor": "stringList",
      "example": [
        "1611810664"
      ],
      "items": {
        "type": "string"
      },
      "title": "Ad IDs or Detail URLs",
      "type": "array"
    },
    "advertiserMatch": {
      "default": "startsWith",
      "description": "Client-side precision for advertiser-name searches. Exact company IDs are never filtered. 'Starts with' removes partner-noise results while keeping names such as 'Microsoft in Business'.",
      "editor": "select",
      "enum": [
        "any",
        "startsWith",
        "exact"
      ],
      "enumTitles": [
        "Any match",
        "Starts with",
        "Exact name"
      ],
      "title": "Advertiser Name Match",
      "type": "string"
    },
    "advertisers": {
      "default": [],
      "description": "Advertiser names (fuzzy accountOwner search) or LinkedIn company URLs. Each name is an independent search. Use companyIds for exact matching.",
      "editor": "stringList",
      "example": [
        "Microsoft",
        "Anthropic"
      ],
      "items": {
        "type": "string"
      },
      "title": "Advertisers",
      "type": "array"
    },
    "companyIds": {
      "default": [],
      "description": "Exact numeric LinkedIn company IDs (for example, Microsoft is 1035). Multiple IDs are OR-ed in one exact search. Company URLs are accepted too.",
      "editor": "stringList",
      "example": [
        "1035",
        "3608"
      ],
      "items": {
        "type": "string"
      },
      "prefill": [
        "1035"
      ],
      "title": "LinkedIn Company IDs",
      "type": "array"
    },
    "companyUrls": {
      "default": [],
      "description": "LinkedIn company page URLs. The actor resolves each public page to its numeric organization ID and searches it exactly.",
      "editor": "stringList",
      "example": [
        "https://www.linkedin.com/company/microsoft"
      ],
      "items": {
        "type": "string"
      },
      "title": "Company URLs",
      "type": "array"
    },
    "countries": {
      "default": [],
      "description": "ISO-3166 alpha-2 delivery country codes (US, GB, DE, ...) or ALL. Multiple codes are sent in one comma-separated filter.",
      "editor": "stringList",
      "example": [
        "US",
        "DE"
      ],
      "items": {
        "type": "string"
      },
      "title": "Countries",
      "type": "array"
    },
    "dateOption": {
      "default": "last-30-days",
      "description": "LinkedIn's date window. Use custom-date-range with startDate/endDate for an exact period (maximum 12 months back).",
      "editor": "select",
      "enum": [
        "any-time",
        "last-30-days",
        "current-month",
        "current-year",
        "last-year",
        "custom-date-range"
      ],
      "enumTitles": [
        "Any time",
        "Last 30 days",
        "Current month",
        "Current year",
        "Last year",
        "Custom date range"
      ],
      "prefill": "last-30-days",
      "title": "Date Range",
      "type": "string"
    },
    "decodeShortLinks": {
      "default": false,
      "description": "Resolve lnkd.in and similar short links to their final landing URL. Adds one request per short link.",
      "editor": "checkbox",
      "title": "Decode Short Links",
      "type": "boolean"
    },
    "directUrls": {
      "default": [],
      "description": "Pasted Ad Library search URLs, ad detail URLs, or LinkedIn company page URLs. Search filters are preserved.",
      "editor": "requestListSources",
      "example": [
        {
          "url": "https://www.linkedin.com/ad-library/search?keyword=AI&countries=US"
        }
      ],
      "title": "Direct URLs",
      "type": "array"
    },
    "endDate": {
      "description": "End of a custom range (YYYY-MM-DD). Required when dateOption is custom-date-range.",
      "editor": "textfield",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "title": "End Date",
      "type": "string"
    },
    "impressionsMaxUnit": {
      "default": "none",
      "description": "Unit for the maximum impression value.",
      "editor": "select",
      "enum": [
        "none",
        "thousand",
        "million"
      ],
      "enumTitles": [
        "Units",
        "Thousands",
        "Millions"
      ],
      "title": "Maximum Impressions Unit",
      "type": "string"
    },
    "impressionsMaxValue": {
      "description": "Upper bound of the impression range (EU transparency data only). Required together with the minimum value.",
      "editor": "number",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Maximum Impressions Value",
      "type": "integer"
    },
    "impressionsMinUnit": {
      "default": "none",
      "description": "Unit for the minimum impression value.",
      "editor": "select",
      "enum": [
        "none",
        "thousand",
        "million"
      ],
      "enumTitles": [
        "Units",
        "Thousands",
        "Millions"
      ],
      "title": "Minimum Impressions Unit",
      "type": "string"
    },
    "impressionsMinValue": {
      "description": "Lower bound of the impression range (EU transparency data only). LinkedIn requires both a minimum and a maximum value.",
      "editor": "number",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Minimum Impressions Value",
      "type": "integer"
    },
    "includeDetails": {
      "default": true,
      "description": "Open each ad's detail page for full copy, CTA, landing URL, video, payer, and EU transparency data. Adds one request per ad.",
      "editor": "checkbox",
      "prefill": true,
      "title": "Include Detail Pages",
      "type": "boolean"
    },
    "maxItems": {
      "default": 50,
      "description": "Global cap on ads returned across all searches (1-4800). Each search can return at most 4,800 ads (200 pages of 24).",
      "editor": "number",
      "maximum": 4800,
      "minimum": 1,
      "prefill": 3,
      "title": "Maximum Records",
      "type": "integer"
    },
    "mode": {
      "default": "search",
      "description": "What to collect: search the library, open specific ads, process pasted URLs, or count matches only.",
      "editor": "select",
      "enum": [
        "search",
        "adDetails",
        "directUrls",
        "count"
      ],
      "enumTitles": [
        "Search the Ad Library",
        "Specific ad IDs / detail URLs",
        "Pasted Ad Library / company URLs",
        "Count matches only"
      ],
      "prefill": "search",
      "title": "Mode",
      "type": "string"
    },
    "payer": {
      "default": [],
      "description": "Search ads by the legal entity that paid for them, e.g. 'Microsoft Corporation'. Each payer is an independent search.",
      "editor": "stringList",
      "example": [
        "Microsoft Corporation"
      ],
      "items": {
        "type": "string"
      },
      "title": "Paid for by (payer)",
      "type": "array"
    },
    "searchTerms": {
      "default": [],
      "description": "One or more keyword searches, e.g. 'AI' or 'cloud computing'. Each keyword is an independent search (union), not a combination.",
      "editor": "stringList",
      "example": [
        "AI",
        "cloud computing"
      ],
      "items": {
        "type": "string"
      },
      "title": "Keywords",
      "type": "array"
    },
    "sortOrder": {
      "default": "newest",
      "description": "Newest first or oldest first.",
      "editor": "select",
      "enum": [
        "newest",
        "oldest"
      ],
      "enumTitles": [
        "Newest first",
        "Oldest first"
      ],
      "title": "Sort Order",
      "type": "string"
    },
    "startDate": {
      "description": "Start of a custom range (YYYY-MM-DD). Required when dateOption is custom-date-range.",
      "editor": "textfield",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "title": "Start Date",
      "type": "string"
    },
    "targetingExcluded": {
      "default": [],
      "description": "Filters ads that exclude any of these categories (EU transparency data only). Values: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS.",
      "editor": "stringList",
      "example": [
        "COMPANY"
      ],
      "items": {
        "type": "string"
      },
      "title": "Excluded Targeting Facets",
      "type": "array"
    },
    "targetingIncluded": {
      "default": [],
      "description": "Filters ads that target any of these categories (EU transparency data only). Values: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS.",
      "editor": "stringList",
      "example": [
        "LANGUAGE",
        "JOB"
      ],
      "items": {
        "type": "string"
      },
      "title": "Included Targeting Facets",
      "type": "array"
    }
  },
  "required": [],
  "schemaVersion": 1,
  "title": "LinkedIn Ad Library Scraper Input",
  "type": "object"
}
