{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Post Comments Scraper By Keyword & Engagement Filter",
    "description": "💬 Scrape LinkedIn post comments & replies in bulk. 👍 Get likes, reactions, author names & profile links. 📅 Filter by date. 🔗 Add multiple posts at once. No login required by default.",
    "version": "0.1",
    "x-build-id": "o5fUU31IHUiDzD13X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~linkedin-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-linkedin-post-comments-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/scrapio~linkedin-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-linkedin-post-comments-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/scrapio~linkedin-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-linkedin-post-comments-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": {
          "postUrls": {
            "title": "🎯 LinkedIn posts to analyse",
            "type": "array",
            "description": "One or more LinkedIn post URLs, activity URNs or bare activity IDs. Example: https://www.linkedin.com/feed/update/urn:li:activity:7289521182721093633/ — each post is scanned separately. (The base key `startUrls` is still accepted.)",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "🔢 Comments to scan per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many top-level comments to pull per post BEFORE filtering. Logged-out the public page serves roughly 9-10; a li_at cookie raises the ceiling. Default 10.",
            "default": 10
          },
          "filterKeywords": {
            "title": "🔍 Must contain any of these words",
            "type": "array",
            "description": "Case-insensitive. A comment is kept only if its text contains at least one of these. Example: [\"pricing\", \"demo\", \"how much\"]. Leave empty to keep everything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Drop comments containing any of these",
            "type": "array",
            "description": "Case-insensitive. Useful for stripping congratulation noise. Example: [\"congrats\", \"great post\", \"thanks for sharing\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minReactions": {
            "title": "👍 Minimum reactions on the comment",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments with at least this many reactions. Exact per-comment reaction counts are read from the public post page. Example: 5. Default 0 (no threshold).",
            "default": 0
          },
          "minCommentLength": {
            "title": "📏 Minimum comment length (characters)",
            "minimum": 0,
            "type": "integer",
            "description": "The cheapest way to remove one-word replies and emoji-only comments. Example: 80. Default 0 (no threshold).",
            "default": 0
          },
          "excludeAuthorComments": {
            "title": "🙋 Exclude the post author's own comments",
            "type": "boolean",
            "description": "Drops comments written by the person who published the post — their replies are usually not leads. The author identity comes from the same page as the comments, so this costs no extra request.",
            "default": false
          },
          "postedFrom": {
            "title": "📅 Comments posted on or after",
            "type": "string",
            "description": "Exact date range, made possible by the absolute comment timestamps this actor derives. Accepts 2025-01-27, an ISO timestamp, or a relative value like \"7 days\". Leave empty for no lower bound."
          },
          "postedTo": {
            "title": "📅 Comments posted on or before",
            "type": "string",
            "description": "Upper bound of the date range. Accepts 2025-02-28, an ISO timestamp, or a relative value like \"1 day\". Leave empty for no upper bound."
          },
          "postedLimit": {
            "title": "⏱️ Quick age bucket",
            "enum": [
              "any",
              "24h",
              "week",
              "month",
              "3months",
              "6months",
              "year"
            ],
            "type": "string",
            "description": "A coarse shortcut applied on top of the date range above. Leave as 'Any' when you use the exact range.",
            "default": "any"
          },
          "minBuyingSignalScore": {
            "title": "🎯 Minimum buying-signal score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only comments scoring at least this much. 25+ = a real intent term fired, 50+ = several. Every kept row carries the matched terms and their weights so the number is auditable. Default 0 (keep all, still scored).",
            "default": 0
          },
          "buyingSignalKeywords": {
            "title": "➕ Extra buying-signal terms",
            "type": "array",
            "description": "Your own intent terms added to the built-in lexicon, each worth 20 points and reported by name in the score breakdown. Example: [\"switch from\", \"migrate off\", \"renewal\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "aiEnrichment": {
            "title": "🤖 Add AI sentiment, intent label & summary",
            "type": "boolean",
            "description": "OFF by default and entirely optional — it requires your own provider API key. The rule-based scoring above works without it; with AI off the three AI columns are null, never guessed.",
            "default": false
          },
          "aiModel": {
            "title": "🧩 AI model / provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "o3-mini",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-2.5-flash",
              "grok-3-mini",
              "deepseek-chat",
              "sonar",
              "mistral-small-latest"
            ],
            "type": "string",
            "description": "Provider is auto-detected from the model name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheap mini/flash/haiku models are plenty for classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 Provider API key",
            "type": "string",
            "description": "Your own key for the provider chosen above. Falls back to the matching environment variable (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY, PERPLEXITY_API_KEY, MISTRAL_API_KEY). Leave empty to keep AI off."
          },
          "includeReplies": {
            "title": "↩️ Include nested replies",
            "type": "boolean",
            "description": "Replies are only reachable through the authenticated engine, so this needs a li_at cookie. Logged-out the public page exposes no reply threads. (Base key `scrapeReplies` is still accepted.)",
            "default": false
          },
          "authorDetailLevel": {
            "title": "👤 Commenter detail level",
            "enum": [
              "short",
              "full"
            ],
            "type": "string",
            "description": "Full adds headline and profile picture on the authenticated engine. Logged-out, headlines are not exposed by LinkedIn and stay null. (Base key `profileScraperMode` is still accepted.)",
            "default": "short"
          },
          "liAtCookie": {
            "title": "🍪 LinkedIn li_at cookie (optional escalation)",
            "type": "string",
            "description": "Optional. Without it the actor runs fully logged-out and returns the public comment slice. With it, the authenticated engine reaches the full comment list and nested replies. (Base key `liAt` is still accepted.)"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. The actor escalates direct → datacenter → residential on its own when LinkedIn throttles (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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}