{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Posts Scraper",
    "description": "Searches public LinkedIn posts by keyword and returns post text, author, exact publication time, engagement counts, media and comments. No login, no cookies, no session tokens.",
    "version": "1.1",
    "x-build-id": "6AwaChnKpPDJDMtdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/renovative_basilisk~linkedin-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-renovative_basilisk-linkedin-posts-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/renovative_basilisk~linkedin-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-renovative_basilisk-linkedin-posts-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/renovative_basilisk~linkedin-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-renovative_basilisk-linkedin-posts-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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Keyword phrases to search for, one per line. Supports LinkedIn's Boolean syntax — `AND`, `OR`, `NOT`, \"quoted phrases\" and parentheses — for example `(\"machine learning\" OR \"deep learning\") NOT hiring`. Every query is evaluated against each post's text, so results really do mention what you asked for. LinkedIn caps a query at 85 characters. Up to 10 queries per run — every query is searched across every author you list and every engine, so the number of search requests grows with the product of the three. The run caps that total in proportion to \"Maximum posts\" — half of it, never fewer than 20 — and never fetches more than 200 discovery pages however large \"Maximum posts\" is.",
            "items": {
              "type": "string"
            }
          },
          "authorPublicIdentifiers": {
            "title": "Author profiles (public identifiers)",
            "maxItems": 50,
            "type": "array",
            "description": "Public identifiers of members whose posts you want — `williamhgates` from `https://www.linkedin.com/in/williamhgates`. Their public profile page is read directly, which does not depend on a search engine, and the keyword query is still applied.",
            "items": {
              "type": "string"
            }
          },
          "authorsCompanyPublicIdentifiers": {
            "title": "Author companies (public identifiers)",
            "maxItems": 50,
            "type": "array",
            "description": "Public identifiers of company pages whose posts you want — `microsoft` from `https://www.linkedin.com/company/microsoft`. Note: this is the company that *published* the post, not the employer of a member who posted.",
            "items": {
              "type": "string"
            }
          },
          "targetUrls": {
            "title": "LinkedIn URLs",
            "maxItems": 200,
            "type": "array",
            "description": "Profile, company or individual post URLs. Profile and company URLs are crawled for their recent posts; a post URL is scraped directly. Accepts localised hosts such as `uk.linkedin.com`.",
            "items": {
              "type": "string"
            }
          },
          "postedLimit": {
            "title": "Posted within",
            "enum": [
              "any",
              "1h",
              "24h",
              "week",
              "month",
              "3months",
              "6months",
              "year"
            ],
            "type": "string",
            "description": "Only keep posts published within this window. Applied from each post's own publication time, before the post is fetched — so a narrow window makes a run cheaper as well as smaller. The window is also passed to each search engine's own date filter, so discovery returns recent posts rather than the engine's all-time favourites.",
            "default": "any"
          },
          "postedLimitDate": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Keep posts published from this moment up to now. Accepts a date (`2026-01-31`), a full timestamp (`2026-01-31T14:48:00.000+09:00`) or epoch milliseconds (`1769870880000`). If you also set \"Posted within\", the stricter of the two applies."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "`Relevance` keeps the order posts were discovered in. `Newest first` orders the dataset chronologically, which is what you want for monitoring runs — and, because the order is decided before anything is fetched, it also means a capped run spends its budget on the newest posts.",
            "default": "relevance"
          },
          "scrapeComments": {
            "title": "Scrape comments",
            "type": "boolean",
            "description": "Include the comments LinkedIn renders on a post's public page — text, author, exact timestamp and per-comment like count. The total comment count is reported either way.",
            "default": false
          },
          "maxComments": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on comments kept per post. LinkedIn shows roughly ten to a signed-out visitor, so values above that have no effect.",
            "default": 10
          },
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many unique posts across all queries. This is the main dial on what a run costs: it caps the posts returned, the search-result pages read while looking for them, and the posts checked and rejected along the way — a run fetches at most five post pages per post you asked for, and each fetch is charged whether or not the post matches. 0 is accepted and still means \"no limit\", but there is no such thing: it resolves to 1,000 posts, which still authorises up to 5,000 charged post fetches — a bill of several dollars. It is deliberately not the 10,000 maximum, because nobody typing 0 has costed the run out; type 10,000 if you really mean it, and having typed it you have accepted the bill. If a run would cost more to produce than it charges, it stops early and says so rather than running to this limit.",
            "default": 100
          },
          "scrapePages": {
            "title": "Search result pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages of search-engine results to read for each query. Each page yields up to about 30 post links. Raising this widens discovery at the cost of more requests and a higher chance of being rate-limited.",
            "default": 2
          },
          "startPage": {
            "title": "Start at search page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "First page of search-engine results to read. Use it to continue where a previous run stopped.",
            "default": 1
          },
          "searchEngines": {
            "title": "Search engines used for discovery",
            "uniqueItems": true,
            "type": "array",
            "description": "LinkedIn's own post search requires a login, so keyword discovery goes through web search engines instead. Results from all selected engines are merged and de-duplicated; none of them is reliable alone, which is why several are enabled by default. Each engine is also asked for your \"Posted within\" window, so its pages hold posts the run can use. Google and Mojeek are not enabled by default: Google serves a JavaScript-only page to any client that is not a full browser, and Mojeek refuses proxied traffic outright, so their pages currently cost a fetch and return nothing. Yahoo serves Bing's index in a form that works. Clear this list to disable keyword discovery entirely and scrape only the authors and URLs you supplied.",
            "items": {
              "type": "string",
              "enum": [
                "duckduckgo",
                "yahoo",
                "bing",
                "google",
                "mojeek"
              ],
              "enumTitles": [
                "DuckDuckGo",
                "Yahoo",
                "Bing",
                "Google",
                "Mojeek"
              ]
            },
            "default": [
              "duckduckgo",
              "yahoo",
              "bing"
            ]
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests may be in flight at once. LinkedIn and the search engines both throttle aggressively; raising this increases the rate of `429` responses and retries rather than the throughput — and a throttled request is retried on a fresh proxy session, so the extra concurrency multiplies the retries rather than the results. That is why the ceiling here is 10 and not higher: past that the run reliably spends more on being blocked than it gains in speed. Leave at 5 unless you are on residential proxies and know the run is being limited by concurrency.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Strongly recommended. Search engines serve challenge pages to datacenter and shared IPs, and LinkedIn blocks them quickly; use Apify Proxy with the RESIDENTIAL group for reliable runs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "When enabled, the crawler obeys the robots.txt of every host it visits. Note that linkedin.com/robots.txt sends `Disallow: /` to all non-whitelisted user agents, so enabling this will produce ZERO results. It is exposed so you can make that determination deliberately, and so a compliance reviewer can verify the behaviour. See the Legal and compliance section of the README before running this Actor.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}