{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Post Scraper & Comments Reactions",
    "description": "LinkedIn Post Scraper extracts data from LinkedIn posts, including text, images, videos, author details, engagement metrics, timestamps, and external links. Ideal for content analysis, monitoring trends, social listening, and automating structured LinkedIn post data collection",
    "version": "0.1",
    "x-build-id": "KZperRN7whjTMwsFR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~linkedin-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-linkedin-post-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-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-linkedin-post-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-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-linkedin-post-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 post URLs (required)",
            "type": "array",
            "description": "LinkedIn post/activity URLs to scrape comments & reactions from. Company or person profile URLs also work (their recent posts are crawled). Example: https://www.linkedin.com/posts/…-activity-7300000000000000000-abcd/",
            "items": {
              "type": "string"
            }
          },
          "li_at": {
            "title": "🔑 LinkedIn li_at cookie",
            "type": "string",
            "description": "Your LinkedIn li_at session cookie (DevTools → Application → Cookies → linkedin.com → li_at while logged in). REQUIRED to fetch comments & reactions — LinkedIn login-gates that data. Without it the actor returns public post details only, with null comments/reactions. Kept secret."
          },
          "maxPostsPerSource": {
            "title": "📊 Max posts per source",
            "minimum": 1,
            "type": "integer",
            "description": "How many parent posts to collect from each URL (a single post URL = 1). Comment rows are ADDITIONAL and are not counted against this limit. Example: 10. Default is 10."
          },
          "includeComments": {
            "title": "💬 Scrape comments",
            "type": "boolean",
            "description": "Fetch each post's comments (author, text, timestamp) via LinkedIn's authenticated API. Requires li_at. Default is true.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum top-level comments to collect per post. Example: 25. Default is 25.",
            "default": 25
          },
          "includeCommentReplies": {
            "title": "↩️ Include nested replies",
            "type": "boolean",
            "description": "Also collect replies nested under each comment (linked via parentId). Default is true.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "↩️ Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on replies collected per comment. Example: 10. Default is 10.",
            "default": 10
          },
          "commentSortOrder": {
            "title": "🔀 Comment sort order",
            "enum": [
              "RELEVANCE",
              "REVERSE_CHRONOLOGICAL"
            ],
            "type": "string",
            "description": "How LinkedIn should order returned comments: most relevant, or newest first.",
            "default": "RELEVANCE"
          },
          "commenterProfileDetail": {
            "title": "👤 Commenter profile detail",
            "enum": [
              "short",
              "full"
            ],
            "type": "string",
            "description": "short = name + profile URL only (faster); full = also headline + profile picture.",
            "default": "short"
          },
          "includeReactions": {
            "title": "👍 Scrape reactions",
            "type": "boolean",
            "description": "Fetch the post's reaction total and per-type breakdown (LIKE/CELEBRATE/SUPPORT/LOVE/INSIGHTFUL/FUNNY). Requires li_at. Default is true.",
            "default": true
          },
          "reactionTypeFilter": {
            "title": "🎯 Reaction type filter",
            "enum": [
              "ALL",
              "LIKE",
              "CELEBRATE",
              "SUPPORT",
              "LOVE",
              "INSIGHTFUL",
              "FUNNY"
            ],
            "type": "string",
            "description": "Report a filtered count / reactor list for one reaction type. ALL = full breakdown (default).",
            "default": "ALL"
          },
          "includeReactorProfiles": {
            "title": "🧑‍🤝‍🧑 Include reactor profiles (best-effort)",
            "type": "boolean",
            "description": "Also try to list the individual people who reacted (name, headline, profile URL). Best-effort — the reaction breakdown counts are always returned regardless. Default is false.",
            "default": false
          },
          "maxReactorsPerPost": {
            "title": "🔢 Max reactor profiles per post",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on reactor profiles collected per post when the option above is on. Default is 25.",
            "default": 25
          },
          "crawlLinkedPosts": {
            "title": "🔍 Crawl linked posts (company/person URLs)",
            "type": "boolean",
            "description": "For company/person URLs, follow the post-URN graph to collect more posts. Ignored for single post URLs. Default is true."
          },
          "onlyPostsSince": {
            "title": "📅 Only posts since",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only include posts published on/after this date (YYYY-MM-DD)."
          },
          "includeRawHtml": {
            "title": "📦 Include raw HTML (Advanced)",
            "type": "boolean",
            "description": "Attach the raw fetched HTML to each post row. Off for cleaner output. Default is false."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Recommended for reliability at scale."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}