{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper: Ads & Targeting · $0.80/1K",
    "description": "LinkedIn Ad Library: search by company, keyword, payer, country, date or URL. Ad text, image, video, link, CTA, run dates, impressions by country, targeting, who paid, advertiser list, new-ads monitor, video transcript and AI analysis. No login. Hard cost cap.",
    "version": "1.0",
    "x-build-id": "Zi8FqqwWR9zmHPUpQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~linkedin-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-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/pomlabs~linkedin-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-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/pomlabs~linkedin-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-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": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Advertiser companies, one per line: name, company page address or numeric company ID.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Word or phrase searched in the ads."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Several keywords, one search each.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertiser names",
            "type": "array",
            "description": "Same as Companies.",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "title": "Company IDs",
            "type": "array",
            "description": "Numeric LinkedIn company IDs.",
            "items": {
              "type": "string"
            }
          },
          "accountOwner": {
            "title": "Account owner",
            "type": "string",
            "description": "Name of the advertiser account, as typed in the library."
          },
          "payer": {
            "title": "Paid for by",
            "type": "string",
            "description": "Name of who paid for the ad."
          },
          "payers": {
            "title": "Payers",
            "type": "array",
            "description": "Several payers, one search each.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Ad Library addresses",
            "type": "array",
            "description": "Pasted search or ad pages of the LinkedIn Ad Library, or company pages.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchUrls": {
            "title": "Search addresses",
            "type": "array",
            "description": "Same as above, as plain lines.",
            "items": {
              "type": "string"
            }
          },
          "adUrls": {
            "title": "Ad pages or IDs",
            "type": "array",
            "description": "Specific ads: address or numeric ID.",
            "items": {
              "type": "string"
            }
          },
          "adIds": {
            "title": "Ad IDs",
            "type": "array",
            "description": "Specific ads by numeric ID.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Lines from a file",
            "type": "string",
            "description": "Link to a .txt or .csv file, Google Sheet or Drive file with one company or address per line."
          },
          "searches": {
            "title": "Searches with their own filters",
            "type": "array",
            "description": "List of objects, for example [{\"company\": \"HubSpot\", \"countries\": [\"DE\"]}, {\"keyword\": \"crm\", \"startDate\": \"2026-09-01\"}]."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "2-letter codes or English names where the ads were shown. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "dateOption": {
            "title": "Period",
            "type": "string",
            "description": "all-time, last-30-days, current-month, current-year or last-year."
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "YYYY-MM-DD. The library holds the last 12 months."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "YYYY-MM-DD, up to yesterday."
          },
          "impressionsMin": {
            "title": "Minimum impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Checked on each ad page; ads without published impressions are left out."
          },
          "impressionsMax": {
            "title": "Maximum impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Checked on each ad page."
          },
          "includedTargetingFacetCategories": {
            "title": "Targeting used",
            "type": "array",
            "description": "Only ads that targeted by: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS.",
            "items": {
              "type": "string"
            }
          },
          "excludedTargetingFacetCategories": {
            "title": "Targeting not used",
            "type": "array",
            "description": "Same values: leaves out ads that targeted by them.",
            "items": {
              "type": "string"
            }
          },
          "adTypes": {
            "title": "Ad formats",
            "type": "array",
            "description": "single image, video, carousel, document, message, event, article, text, job, follow company, spotlight, conversation.",
            "items": {
              "type": "string"
            }
          },
          "includeKeywords": {
            "title": "Must contain",
            "type": "array",
            "description": "Keep only ads whose text has one of these words. Reads every ad, so it is slower than the keyword search.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop ads whose text has one of these words.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Running ads only",
            "type": "boolean",
            "description": "Only ads still being shown."
          },
          "minDaysRunning": {
            "title": "Minimum days running",
            "minimum": 0,
            "type": "integer",
            "description": "Long-running ads. Only ads that publish run dates can match (mostly ads shown in the EU)."
          },
          "includeEmployerBranding": {
            "title": "Include job ads",
            "type": "boolean",
            "description": "Turn off to leave out job and spotlight formats.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum ads in the run",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no overall cap."
          },
          "maxAdsPerSearch": {
            "title": "Maximum ads per search",
            "minimum": 0,
            "type": "integer",
            "description": "0 = every ad of the search. When both limits are empty: 40 per search."
          },
          "resultsLimit": {
            "title": "Results limit",
            "minimum": 0,
            "type": "integer",
            "description": "Same as maximum ads per search."
          },
          "skipDetails": {
            "title": "Skip ad details",
            "type": "boolean",
            "description": "Faster and cheaper: list data only, without the ad page (dates, impressions, payer, targeting, full text).",
            "default": false
          },
          "includeDetails": {
            "title": "Include ad details",
            "type": "boolean",
            "description": "On by default."
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "ads: one row per ad. advertisers: who advertises in this search, most ads first.",
            "default": "ads"
          },
          "advertiserSampleAds": {
            "title": "Ads sampled for the advertiser list",
            "minimum": 0,
            "type": "integer",
            "description": "Up to 2400. Default 240."
          },
          "analyzeAds": {
            "title": "AI marketing analysis",
            "type": "boolean",
            "description": "Hook, angle, offer, audience and call to action of each ad (extra event).",
            "default": false
          },
          "ocrImageAds": {
            "title": "Read text on images",
            "type": "boolean",
            "description": "Text written on the ad picture (extra event).",
            "default": false
          },
          "transcribeVideos": {
            "title": "Transcribe videos",
            "type": "boolean",
            "description": "Speech of video ads as text (extra event).",
            "default": false
          },
          "downloadMedia": {
            "title": "Save pictures and videos",
            "type": "boolean",
            "description": "Stores the ad files in the run's key-value store.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new-only"
            ],
            "type": "string",
            "description": "new-only returns only ads not delivered in earlier runs of the same monitor.",
            "default": "all"
          },
          "onlyNewAds": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Same as mode new-only."
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps a separate memory of seen ads for this name."
          },
          "registryKey": {
            "title": "Registry key",
            "type": "string",
            "description": "Same as monitor name."
          },
          "webhookUrl": {
            "title": "Webhook address",
            "type": "string",
            "description": "Receives a POST with the run, dataset, count and a sample when the run delivers ads."
          },
          "webhookHeaders": {
            "title": "Webhook headers",
            "type": "object",
            "description": "Headers sent with the webhook, for example an authorization token."
          },
          "compact": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Only the main fields.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leaves out fields without a value.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 0,
            "type": "integer",
            "description": "1 to 16. Default 10."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}