{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ads Scraper",
    "description": "LinkedIn Ads Scraper SD - LinkedIn Ads Scraper is a marketing intelligence tool that extracts LinkedIn ads by keyword, advertiser, payer, country and date: ad text, creative, format, advertiser, run dates, impressions, country split and targeting. No login.",
    "version": "1.0",
    "x-build-id": "pcHIaqeInGfOqI91i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~linkedin-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-linkedin-ads-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/neuro-scraper~linkedin-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-linkedin-ads-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/neuro-scraper~linkedin-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-linkedin-ads-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases in the ads, one search per line, e.g. \"software\" or \"cloud security\".",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers (company or person)",
            "type": "array",
            "description": "Advertiser names, one per line, e.g. \"Microsoft\". Combined with every keyword when both are given.",
            "items": {
              "type": "string"
            }
          },
          "payers": {
            "title": "Payers",
            "type": "array",
            "description": "The organisation that paid for the ads (\"Paid for by\"), one per line.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Ad Library links",
            "type": "array",
            "description": "LinkedIn Ad Library search links (https://www.linkedin.com/ad-library/search?keyword=software&countries=US) - every filter in the link is kept - or single ad links (https://www.linkedin.com/ad-library/detail/1643453274).",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes where the ads ran, e.g. US, GB, DE. Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "dateOption": {
            "title": "Date range",
            "enum": [
              "last-30-days",
              "current-month",
              "current-year",
              "last-year",
              "custom-date-range"
            ],
            "type": "string",
            "description": "When the ads ran."
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "First day, e.g. 2026-10-01. Setting a start or end date switches to a custom range."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "Last day, e.g. 2026-11-14."
          },
          "impressionsMinValue": {
            "title": "Min impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at least this many impressions (in the unit below)."
          },
          "impressionsMinUnit": {
            "title": "Min impressions unit",
            "enum": [
              "none",
              "thousand",
              "million"
            ],
            "type": "string",
            "description": "Unit of the minimum.",
            "default": "thousand"
          },
          "impressionsMaxValue": {
            "title": "Max impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at most this many impressions (in the unit below)."
          },
          "impressionsMaxUnit": {
            "title": "Max impressions unit",
            "enum": [
              "none",
              "thousand",
              "million"
            ],
            "type": "string",
            "description": "Unit of the maximum.",
            "default": "thousand"
          },
          "adFormats": {
            "title": "Ad formats (optional)",
            "type": "array",
            "description": "Keep only these formats, e.g. \"Video Ad\", \"Single Image Ad\", \"Carousel Ad\", \"Document Ad\", \"Text Ad\", \"Message Ad\" (matched on each ad).",
            "items": {
              "type": "string"
            }
          },
          "scrapeAdDetails": {
            "title": "Scrape ad details",
            "type": "boolean",
            "description": "Open each ad for advertiser link, payer, run dates, impressions, impressions by country, targeting, video files and CTA (one extra request per ad).",
            "default": true
          },
          "maxItemsPerSearch": {
            "title": "Max ads per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each keyword / advertiser / link after this many ads (the limit applies to every search). Pages of 24 are followed to the end.",
            "default": 50
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new-only"
            ],
            "type": "string",
            "description": "New ads only keeps a registry of every ad earlier runs returned and gives only ads never seen before - for scheduled monitoring.",
            "default": "all"
          },
          "registryKey": {
            "title": "Registry name (new ads only)",
            "type": "string",
            "description": "Name of the registry of already-seen ads. Empty = derived from your searches, so the same search finds its own registry."
          },
          "includedTargetingFacetCategories": {
            "title": "Targeting uses (optional)",
            "type": "array",
            "description": "Keep only ads whose targeting uses one of these categories: Audience, Demographic, Company, Education, Job, Member Interests. Needs the ad details (switched on automatically).",
            "items": {
              "type": "string"
            }
          },
          "excludedTargetingFacetCategories": {
            "title": "Targeting does not use (optional)",
            "type": "array",
            "description": "Drop ads whose targeting uses one of these categories (Audience, Demographic, Company, Education, Job, Member Interests).",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run at the same time; the ad details of each page are opened in parallel too.",
            "default": 5
          },
          "minDelay": {
            "title": "Pause between pages (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Extra pause before each further results page of a search. 0 = as fast as possible.",
            "default": 0
          },
          "maxItems": {
            "title": "Max ads in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop the run after this many ads.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is recommended and is the default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}