{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Post Scraper",
    "description": "Scrape posts from any LinkedIn personal profile activity feed. Get post content, engagement metrics, media, and author details.",
    "version": "1.30",
    "x-build-id": "fSjSKyv5bphij2xik"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~linkedin-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~linkedin-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~linkedin-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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",
        "required": [
          "cookie"
        ],
        "properties": {
          "profileUrl": {
            "title": "Profile URL",
            "type": "string",
            "description": "LinkedIn profile URL, e.g. https://www.linkedin.com/in/williamhgates, or just the username: williamhgates. Optional when postUrl/postUrls is provided."
          },
          "postUrl": {
            "title": "Post URL",
            "type": "string",
            "description": "Single LinkedIn post URL, feed update URL, activity URN, or bare activity ID. When provided, profileUrl is not required."
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Optional list of LinkedIn post URLs, feed update URLs, activity URNs, or bare activity IDs.",
            "items": {
              "type": "string"
            }
          },
          "cookie": {
            "title": "LinkedIn Cookie",
            "type": "string",
            "description": "Your LinkedIn session cookie. Accepts either: (1) the li_at value from browser DevTools → Application → Cookies, or (2) full cookies JSON array exported from an extension like EditThisCookie."
          },
          "maxPosts": {
            "title": "Max Posts",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of posts to scrape.",
            "default": 10
          },
          "proxyUrl": {
            "title": "Custom Proxy URL (optional)",
            "type": "string",
            "description": "Optional proxy URL to use instead of Apify's built-in proxy. Format: http://user:pass@host:port or socks5://user:pass@host:port. Use a residential proxy from the same country as your LinkedIn account for best results."
          },
          "useProxy": {
            "title": "Use Proxy",
            "type": "boolean",
            "description": "Whether to use a proxy. Disable to run on Apify server IP directly (useful for testing).",
            "default": true
          },
          "scrapeInteractors": {
            "title": "Scrape Interactors",
            "type": "boolean",
            "description": "Also collect likers and commenters for each post. This makes the run significantly slower (one extra API call per post).",
            "default": false
          },
          "scrapeReactions": {
            "title": "Scrape Reactions (Likers) Separately",
            "type": "boolean",
            "description": "When Scrape Interactors is enabled, controls whether reactor list is fetched. When disabled, only commenters are collected (faster). Defaults to false so callers can opt in.",
            "default": false
          },
          "maxInteractors": {
            "title": "Max Interactors Per Post",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum number of likers + commenters to collect per post when Scrape Interactors is enabled.",
            "default": 50
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "pt",
              "it"
            ],
            "type": "string",
            "description": "Accept-Language hint sent to LinkedIn. Affects localized content where available.",
            "default": "en"
          },
          "includeReposts": {
            "title": "Include Reposts",
            "type": "boolean",
            "description": "When false, posts marked as repost/reshare are excluded from output. Defaults to true.",
            "default": true
          },
          "minReactions": {
            "title": "Minimum Reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts that received fewer than this many reactions (likes + reactions). Default 0 keeps everything.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts that received fewer than this many comments. Default 0 keeps everything.",
            "default": 0
          },
          "mediaTypes": {
            "title": "Media Types",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict emitted posts to specific media types. Leave empty to keep all.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video",
                "article",
                "document",
                "carousel",
                "poll",
                "event",
                "repost"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video",
                "Article",
                "Document",
                "Carousel",
                "Poll",
                "Event",
                "Repost"
              ]
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}