{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Post Comments Scraper - Cheapest",
    "description": "LinkedIn Post Comments Scraper extracts LinkedIn post comments: text, exact UTC time, reactions, author name, headline and profile URL. The first ~10 comments per post need no login; add your li_at cookie for every comment, nested replies and sorting. Export JSON, CSV or Excel.",
    "version": "0.3",
    "x-build-id": "nHdGHsheGSCFpwrbf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialdataapi~linkedin-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialdataapi-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/socialdataapi~linkedin-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-socialdataapi-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/socialdataapi~linkedin-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-socialdataapi-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",
        "required": [
          "liAt"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Posts",
            "type": "array",
            "description": "One or more LinkedIn post URLs, activity URNs (urn:li:activity:123...) or bare numeric activity IDs. Each post is scraped separately, one after another.",
            "default": [
              "https://www.linkedin.com/feed/update/urn:li:activity:7289521182721093633/"
            ],
            "items": {
              "type": "string"
            }
          },
          "resultLimitPerPost": {
            "title": "🔢 Max comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on top-level comments collected per post (1-500, default 10). Logged-out, LinkedIn itself shows 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. Free plan: up to 20 comments per run (all posts together) and 200 per month; paid plans have no limit.",
            "default": 10
          },
          "sortType": {
            "title": "🔃 Sort comments by",
            "enum": [
              "RELEVANCE",
              "RECENT"
            ],
            "type": "string",
            "description": "Most relevant or most recent first. Applies to the logged-in browser only (the public page has a fixed order).",
            "default": "RELEVANCE"
          },
          "startPage": {
            "title": "🔢 Start page",
            "minimum": 1,
            "type": "integer",
            "description": "Skip the first (startPage - 1) x 10 top-level comments. Logged-out runs see about 10 comments per post, so a start page above 1 is only useful with an li_at cookie.",
            "default": 1
          },
          "postedLimit": {
            "title": "📅 Only comments newer than",
            "enum": [
              "any",
              "24h",
              "week",
              "month",
              "3months",
              "6months",
              "year"
            ],
            "type": "string",
            "description": "Drop comments older than the chosen window. Every comment carries an exact UTC timestamp, so this filter is precise on both engines. The age filter is applied before the per-post limit.",
            "default": "any"
          },
          "scrapeReplies": {
            "title": "✅ Include replies under each comment",
            "type": "boolean",
            "description": "Keep the replies nested under each comment (the comments array). Requires the li_at cookie below - LinkedIn does not show reply threads to logged-out visitors.",
            "default": false
          },
          "profileScraperMode": {
            "title": "🔧 Comment author detail",
            "enum": [
              "short",
              "full"
            ],
            "type": "string",
            "description": "Full keeps the author's headline, connection degree and picture. Short keeps name, profile URL and ids only.",
            "default": "full"
          },
          "detailedReactions": {
            "title": "✅ Exact reaction types",
            "type": "boolean",
            "description": "Logged-in only: opens each comment's reaction list to get per-type counts (LIKE, PRAISE, ...). Slower. Off: the total reaction count is reported under LIKE.",
            "default": false
          },
          "liAt": {
            "title": "🔑 LinkedIn cookie (li_at)",
            "type": "string",
            "description": "Required. Your li_at cookie (DevTools > Application > Cookies > https://www.linkedin.com) switches to a logged-in browser that loads every comment and reply in the chosen sort order. If LinkedIn rejects the cookie, the public comments are still saved. Treat it like a password."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. The actor already moves from no proxy to Apify datacenter and then residential proxies on its own, and switches to a fresh proxy when LinkedIn rate-limits a request. Set your own proxy only if you need a specific one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}