{
  "openapi": "3.0.1",
  "info": {
    "title": "Post Comments Engagements Scraper Linkedin By Comment Language",
    "description": "Extract engagement data from LinkedIn post comments using this scraper. Collect commenter names, comment text, likes, replies, timestamps, and profile URLs. Ideal for lead generation, audience insights, brand monitoring, and analyzing discussions on LinkedIn posts.",
    "version": "0.1",
    "x-build-id": "FFEDUfFoxSkG4fUtZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~post-comments-engagements-scraper-linkedin/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-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/scraper-engine~post-comments-engagements-scraper-linkedin/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-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/scraper-engine~post-comments-engagements-scraper-linkedin/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-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": "🔗 LinkedIn post URLs or activity IDs",
            "type": "array",
            "description": "One LinkedIn post per line. Full post URLs (https://www.linkedin.com/feed/update/urn:li:activity:7461916737781964800/), urn:li:activity: / urn:li:ugcPost: URNs and bare numeric activity IDs all work. Multilingual threads on global-brand posts give the richest language mix.",
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "🔢 Comments to read per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on comments read from each post (1–500, default 100). Logged out LinkedIn serves a guest roughly the first 9–10 top-level comments per post whatever you set here — the real number read is always reported per row as commentsAvailable vs commentsTotal.",
            "default": 100
          },
          "includeLanguages": {
            "title": "✅ Keep only these languages",
            "type": "array",
            "description": "ISO 639-1 codes, one per line — for example en, pt, es, fr, ar, ja, ru. Leave empty to keep every language. Example: en + pt returns only the English and Portuguese comments and leaves the rest out of your dataset and out of your bill.",
            "items": {
              "type": "string"
            }
          },
          "excludeLanguages": {
            "title": "🚫 Drop these languages",
            "type": "array",
            "description": "ISO 639-1 codes to remove, one per line — for example en to keep only the non-English side of a thread. Applied after the keep list. Excluded comments are summarised in an uncharged accounting row so you can always see what was removed and why.",
            "items": {
              "type": "string"
            }
          },
          "undetectedLanguageHandling": {
            "title": "❓ Comments with no detectable language",
            "enum": [
              "keep",
              "exclude"
            ],
            "type": "string",
            "description": "What to do with comments too short or too ambiguous to label (emoji-only replies, 'Congrats!', a bare name). Keep them (default) so nothing disappears silently, or exclude them when you only want confidently-labelled text. Excluding still records them in the uncharged accounting row.",
            "default": "keep"
          },
          "minLanguageConfidence": {
            "title": "🎯 Minimum language confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "0–1, default 0.65. Below this the language is set to null with languageGuardReason = low_confidence rather than guessed. Raising it to 0.9 gives fewer but safer labels; lowering it to 0.3 labels far more comments and will mislabel some of them.",
            "default": 0.65
          },
          "minCharsForLanguage": {
            "title": "✂️ Minimum letters before a language is claimed",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Default 12 letters, counted after URLs, @mentions, #hashtags and emoji are stripped out. Detectors are unreliable on very short text — raw, '👍' scores Japanese and 'Congrats!' scores English at 0.17 — so anything shorter is returned as languageGuardReason = too_short instead of a confident wrong label.",
            "default": 12
          },
          "translateToEnglish": {
            "title": "🌐 Translate comments to English",
            "type": "boolean",
            "description": "Off by default. When on, each kept comment is translated into a new textEnglish column — the original text column is never overwritten. Requires your own AI provider key below; without one textEnglish stays null and translationStatus says no_api_key.",
            "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",
              "gpt-4.1",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-2.5-flash",
              "gemini-2.5-pro",
              "grok-3-mini",
              "grok-3",
              "deepseek-chat",
              "sonar",
              "sonar-pro",
              "mistral-small-latest",
              "mistral-large-latest"
            ],
            "type": "string",
            "description": "Provider is detected from the model name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. The cheap mini/flash/haiku models are more than enough for comment translation.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI provider API key",
            "type": "string",
            "description": "Your own key for the provider matching the model above. Stored as a secret. Can also be supplied as an environment variable: ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY / GOOGLE_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY, PERPLEXITY_API_KEY or MISTRAL_API_KEY."
          },
          "liAt": {
            "title": "🍪 LinkedIn li_at cookie (optional)",
            "type": "string",
            "description": "Leave empty — the actor runs logged out by default and no cookie is stored anywhere in it. Supplying your own li_at switches to the authenticated engine, which lifts the ~9–10 comments per post guest ceiling and adds nested replies, per-reaction-type counts and the edited/pinned flags. Stored as a secret and sent only to LinkedIn."
          },
          "sortOrder": {
            "title": "🔀 Comment sort order",
            "enum": [
              "REVERSE_CHRONOLOGICAL",
              "RELEVANCE"
            ],
            "type": "string",
            "description": "Only applies on the cookie path — logged out, LinkedIn ignores comment sort parameters and always serves the same top slice.",
            "default": "REVERSE_CHRONOLOGICAL"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. By default requests go direct and escalate automatically to Apify datacenter and then residential proxies if LinkedIn throttles (HTTP 999) or serves a guest wall. Set a proxy here to start from it instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}