{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Company Profile Scraper & Ad Library Creatives",
    "description": "LinkedIn Company Profile Scraper & Ad Library Creatives extracts company profiles and LinkedIn ad creatives, including company details, followers, employee insights, ad content, formats, and campaign data. Ideal for competitor research, ad intelligence, and market analysis.",
    "version": "0.1",
    "x-build-id": "amrx9PXLCAjtCLY3N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~linkedin-company-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-linkedin-company-profile-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/simpleapi~linkedin-company-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-linkedin-company-profile-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/simpleapi~linkedin-company-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-linkedin-company-profile-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🏢 LinkedIn company page URLs (required)",
            "minItems": 1,
            "type": "array",
            "description": "📌 List of public LinkedIn company page URLs to process (for example: https://www.linkedin.com/company/microsoft). Each company is scraped independently and saved to the dataset as soon as it finishes. Add one or many URLs; duplicates are automatically skipped and large batches are handled via a Request Queue.",
            "items": {
              "type": "string"
            }
          },
          "maxRetries": {
            "title": "🔁 Max retries per company",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry fetching a company page (and its Ad Library data, if enabled) before giving up and saving an error row. Example: maxRetries=3 tries up to 3 times with exponential backoff. Default is 3.",
            "default": 3
          },
          "requestTimeoutSec": {
            "title": "⏱️ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for each HTTP request (company page or Ad Library page) before treating it as failed. Default is 30 seconds.",
            "default": 30
          },
          "concurrency": {
            "title": "🧵 Concurrent companies",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many companies to process in parallel (1-20). Higher values finish faster but increase the chance of LinkedIn rate-limiting. Default is 3.",
            "default": 3
          },
          "includeAds": {
            "title": "📢 Include Ad Library creatives",
            "type": "boolean",
            "description": "When ON, also fetches each company's PUBLIC LinkedIn Ad Library creative feed (ad copy, creative image URL, headline, advertiser, payer entity) plus per-ad transparency metrics (run dates, total-impressions bucket, impressions by country, ad-targeting segments). Off by default. Some transparency fields (impressions/country/targeting) are only published by LinkedIn for a subset of ads and will be null when unavailable -- never fabricated.",
            "default": false
          },
          "maxAdsPerCompany": {
            "title": "🔢 Max ads per company",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Maximum number of ads to fetch full transparency details for, per company (1-24). LinkedIn's public Ad Library search page renders at most 24 ad cards per company and has no working pagination beyond that -- this is a hard, honestly-disclosed ceiling, not a configurable actor limit. Default is 5.",
            "default": 5
          },
          "adDateRange": {
            "title": "📅 Ad date range filter",
            "enum": [
              "any",
              "last-30-days",
              "this-month",
              "this-year",
              "last-year"
            ],
            "type": "string",
            "description": "Restrict the Ad Library search to ads active within this window, matching LinkedIn's own Ad Library filters. 'Any time' returns LinkedIn's default (most recently active) result set.",
            "default": "any"
          },
          "adCountries": {
            "title": "🌍 Ad country filter",
            "type": "array",
            "description": "Optional. Restrict the Ad Library search to ads targeted at these ISO-2 country codes (e.g. US, DE, GB). Leave empty to use LinkedIn's default (no country filter).",
            "items": {
              "type": "string"
            }
          },
          "proxy": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "🛡️ Optional. Start with this proxy for requests (company pages and Ad Library pages). If LinkedIn blocks or rejects (e.g. 403, 407, 429, 999 or authwall redirects), the actor switches to Apify Residential and keeps using it for the rest of the run. Leave empty to start direct (no proxy)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}