{
  "openapi": "3.0.1",
  "info": {
    "title": "Post Comments Engagements Scraper Linkedin: Filter Spam & Ads",
    "description": "LinkedIn Post Comments & Engagements Scraper extracts comments, reactions, engagement metrics, and author details while filtering spam and promotional ads. Ideal for audience research, engagement analysis, content performance tracking, sentiment insights, and B2B lead generation.",
    "version": "0.1",
    "x-build-id": "1ijC9c3JKdPmpGYNt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~post-comments-engagements-scraper-linkedin/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-post-comments-engagements-scraper-linkedin",
        "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/scrapio~post-comments-engagements-scraper-linkedin/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-post-comments-engagements-scraper-linkedin",
        "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/scrapio~post-comments-engagements-scraper-linkedin/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-post-comments-engagements-scraper-linkedin",
        "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": {
          "startUrls": {
            "title": "🔗 Posts to screen",
            "type": "array",
            "description": "LinkedIn post URLs, activity URNs (urn:li:activity:123…) or bare numeric activity IDs — one per line. Add MULTIPLE posts from the same author or company: duplicate clustering runs across every post in the run, so a copy-paste comment only becomes visible when more than one post is present.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "📊 Comments to read per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on comments read per post (1–500). Logged-out, LinkedIn itself serves a guest roughly the first 9–10 comments per post, so a higher number only changes the result when an li_at cookie is supplied. The base actor's resultLimitPerPost key is still accepted and takes precedence when present.",
            "default": 100
          },
          "promotionalHandling": {
            "title": "📣 Promotional comments — what to do with them",
            "enum": [
              "flag",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Flag keeps every comment and adds the score. Exclude drops comments at or above the threshold — those rows are NOT pushed and NOT billed, so a filtered run costs you nothing for the rows you asked to discard. Only returns the pitches by themselves, for moderation or reporting.",
            "default": "flag"
          },
          "promotionalThreshold": {
            "title": "🎚️ Promotional score cut-off",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "A comment counts as promotional when its score reaches this value (0–1). The score is the sum of the published lexicon weights that fired: outbound link 0.35, contact prompt 0.40, self-promo phrase 0.30, price/offer 0.25, service list 0.35 (needs 3+ service terms), duplicate across posts 0.30. Default 0.5, so any two rules together flag a comment.",
            "default": 0.5
          },
          "dedupeHandling": {
            "title": "♻️ Copy-paste comments — what to do with them",
            "enum": [
              "flag",
              "collapse",
              "only"
            ],
            "type": "string",
            "description": "Flag keeps every comment and adds duplicateClusterId / duplicateCount. Collapse keeps the earliest comment of each duplicate cluster and drops the rest — dropped rows are NOT pushed and NOT billed. Only returns the duplicated bodies alone, which is the fastest way to see which accounts are spraying the same line.",
            "default": "flag"
          },
          "duplicateSimilarity": {
            "title": "🔬 Near-duplicate similarity",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "How alike two comments must be to land in the same cluster (0.5–1). Bodies are compared after case, punctuation, emoji, URLs and whitespace are normalised away; 1 means only identical normalised bodies cluster, 0.9 (default) also catches a line with a word or an emoji swapped. Comments shorter than 15 normalised characters are never clustered.",
            "default": 0.9
          },
          "lowEffortMaxChars": {
            "title": "💤 Low-effort comment length",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "A comment whose normalised body is this many characters or shorter (or is nothing but emoji) is marked lowEffortComment = true. This is a label only — it never removes or charges anything. Default 25.",
            "default": 25
          },
          "emitDuplicateClusters": {
            "title": "🧾 Also write a duplicate-cluster summary",
            "type": "boolean",
            "description": "Writes one record per duplicate cluster (member count, posts spanned, authors, sample text, comment IDs) to a separate child dataset named after the run. The child dataset is never billed. Off by default.",
            "default": false
          },
          "commentOrder": {
            "title": "🔀 Comment order",
            "enum": [
              "REVERSE_CHRONOLOGICAL",
              "RELEVANCE"
            ],
            "type": "string",
            "description": "Order requested from LinkedIn on the cookie path. Logged-out, LinkedIn serves a fixed guest slice and ignores any order parameter, so this only changes the result when an li_at cookie is supplied. The base actor's sortOrder key is still accepted and takes precedence when present.",
            "default": "REVERSE_CHRONOLOGICAL"
          },
          "liAt": {
            "title": "🍪 LinkedIn cookie (li_at) — optional",
            "type": "string",
            "description": "Leave empty to run logged-out, which is the default and the tested path. This actor contains no built-in credential. Supplying your own li_at cookie lifts LinkedIn's ~10-comments-per-post guest ceiling and adds nested replies, per-reaction-type counts and the edited/pinned markers; it is used only on the requests that need it."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. The actor already escalates direct → datacenter → residential on its own and rotates the exit IP when LinkedIn answers with HTTP 999."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}