{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper - No Login",
    "description": "Get company ads from the public LinkedIn Ad Library, no account: pass a keyword, a company or a list of companies and get ad text, headline, creative and advertiser, plus optional CTA, landing URL, dates, impressions and targeting. Monitor new ads since the last run. $1.75 per 1,000 ads.",
    "version": "0.1",
    "x-build-id": "DXmVnstIUybAJr99U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/glasswing~linkedin-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-glasswing-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/glasswing~linkedin-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-glasswing-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/glasswing~linkedin-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-glasswing-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": {
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "A word or phrase from the ad copy, e.g. `cybersecurity` or `free trial`. Combine it with the filters below."
          },
          "advertiser": {
            "title": "Advertiser (company) name",
            "type": "string",
            "description": "Company or advertiser name as LinkedIn shows it, e.g. `Microsoft` or `HubSpot`. Works alone or together with a keyword."
          },
          "advertisers": {
            "title": "Advertisers (batch)",
            "type": "array",
            "description": "Optional: a list of company names, one per line, e.g. `HubSpot`, `Salesforce`, `Microsoft`. The Actor runs one Ad Library search per company (with the keyword, country and date filters above) and every row keeps its company in `advertiserName`. Use it to watch a whole competitor list in one run; combine with Ads per advertiser so each company gets its share of Maximum results.",
            "items": {
              "type": "string"
            }
          },
          "payer": {
            "title": "Paid for by",
            "type": "string",
            "description": "Optional: the legal entity that paid for the ads (the \"Paid for by\" line)."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional: two-letter country codes where the ads were shown, e.g. `US`, `DE`, `GB`. Leave empty for all countries.",
            "items": {
              "type": "string"
            }
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "last-30-days",
              "current-month",
              "current-year",
              "last-year",
              "custom-date-range"
            ],
            "type": "string",
            "description": "Optional: when the ads ran. LinkedIn keeps the last 12 months. For your own dates pick `Custom` and fill in Start and End date."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Optional, `YYYY-MM-DD`: ads shown on or after this day (custom date range)."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Optional, `YYYY-MM-DD`: ads shown on or before this day (custom date range)."
          },
          "startUrls": {
            "title": "Ad Library URLs or ad ids",
            "uniqueItems": true,
            "type": "array",
            "description": "LinkedIn Ad Library search URLs (copied from your browser), ad detail URLs like `https://www.linkedin.com/ad-library/detail/1584697093`, or bare ad ids. The example is skipped automatically when you fill in Keyword, Advertiser or Paid for by.",
            "default": [
              "https://www.linkedin.com/ad-library/search?keyword=cybersecurity"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many ads have been saved. Each saved company ad with status `ok` is one billable `Ad` event (plus `Ad details` when details are included).",
            "default": 20
          },
          "maxAdsPerAdvertiser": {
            "title": "Ads per advertiser",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap per search (per company in an Advertisers batch), so one big advertiser cannot use up Maximum results. Example: 10 companies, Ads per advertiser 50 and Maximum results 500 gives up to 50 ads from each. Leave empty for no cap per advertiser."
          },
          "includeDetails": {
            "title": "Include ad details",
            "type": "boolean",
            "description": "Open every ad's detail page for the advertiser's company page URL, landing URL, call to action, full ad text, paid-by, first/last shown dates, impressions by country and targeting. Billed as an extra `Ad details` event per ad. Off: the fast basic row from the search results (ad id, advertiser, format, ad text preview, headline, image/video).",
            "default": false
          },
          "onlyNewAds": {
            "title": "Only new ads (monitor mode)",
            "type": "boolean",
            "description": "Return only ads that an earlier run with this option on has not returned yet, so a scheduled run (daily or weekly) gives you just the new creatives of each competitor. Already-seen ads are skipped and never charged; a run with nothing new finishes successfully with a free `not_found` row per search. The seen ad ids are kept in a named key-value store on your own Apify account (next field). The first run returns everything, like a normal run. Ad URLs / ad ids you enter directly are always returned.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store on your account that remembers which ads were already returned. Use a different name per schedule to keep separate watch lists (e.g. `linkedin-ads-client-a`). Lowercase letters, digits and hyphens.",
            "default": "linkedin-ad-library-monitor"
          },
          "datacenterProxy": {
            "title": "Use only datacenter proxy (never residential)",
            "type": "boolean",
            "description": "Off by default. The default proxy already checks Apify datacenter addresses first and falls back to residential when none is served; turn this on only to never use residential.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy RESIDENTIAL is the default (included in the price; Apify datacenter addresses are checked first): LinkedIn blocks most server and many residential IPs on the Ad Library, so the Actor checks every proxy session in a normal Chrome browser and only uses sessions LinkedIn serves, preferring the exit countries that work best. Leave the country empty; the ads you get do not depend on the proxy country (use Countries above for that).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}