{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Posts Scraper",
    "description": "Scrape public LinkedIn posts from keyword searches, company feeds, and exact post URLs. Returns post text, author, engagement, media, comments preview, provider provenance, and run summaries. Charged $0.006 per post.",
    "version": "0.1",
    "x-build-id": "dFLJapTOzebuP43Dt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~linkedin-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~linkedin-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~linkedin-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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",
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords or phrases to search in public LinkedIn posts, for example ai agents or open source CRM. Uses Google-indexed public LinkedIn results via ScrapeCreators. Defaults to an empty list. Not for private LinkedIn feeds or logged-in-only posts.",
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Company page URLs",
            "type": "array",
            "description": "Public LinkedIn company pages whose recent posts should be scraped, for example https://www.linkedin.com/company/shopify. Accepts one URL per line. Defaults to an empty list. Not for personal profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Exact post URLs",
            "type": "array",
            "description": "Exact public LinkedIn post, feed update, or article URLs to fetch, for example https://www.linkedin.com/posts/example_activity-7354600338621906944. Defaults to an empty list. Invalid or non-post LinkedIn URLs are skipped.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of post records to save across all sources. This is the hard cap for billable post-scraped events. Default is 100. Use lower values for canaries or agent calls.",
            "default": 100
          },
          "datePosted": {
            "title": "Search date filter",
            "enum": [
              "any",
              "last-hour",
              "last-day",
              "last-week",
              "last-month",
              "last-year"
            ],
            "type": "string",
            "description": "Freshness filter for keyword search results. Supported values mirror the upstream public-search provider, such as last-week or last-month. Default is last-month. Does not filter company feeds or exact post URLs.",
            "default": "last-month"
          },
          "maxSearchPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Advanced cap for ScrapeCreators search pagination. Default is 5 pages and maximum is 60. Lower it when testing cursor behavior. Not used for company URLs or exact post URLs.",
            "default": 5
          },
          "maxPagesPerCompany": {
            "title": "Maximum pages per company",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "How many provider pages to fetch for each LinkedIn company URL. Default is 2 and maximum is 7 because public company-post coverage is shallow. SociaVault company fallback only returns one page. Not used for search queries.",
            "default": 2
          },
          "startCursor": {
            "title": "Start cursor",
            "maxLength": 200,
            "type": "string",
            "description": "Optional ScrapeCreators cursor from a previous keyword-search run. Paste the cursor when continuing a search. Leave empty for a fresh search. Not used for company feeds or exact post URLs."
          },
          "providerOrder": {
            "title": "Provider order",
            "enum": [
              "scrapecreators-first",
              "sociavault-first",
              "scrapecreators-only",
              "sociavault-only"
            ],
            "type": "string",
            "description": "Choose which managed provider is tried first for company feeds and post-detail enrichment. ScrapeCreators first is recommended for broad post discovery. Default is scrapecreators-first. Search mode requires ScrapeCreators.",
            "default": "scrapecreators-first"
          },
          "enrichPostDetails": {
            "title": "Enrich post details",
            "type": "boolean",
            "description": "Fetch each discovered post detail when a provider supports it. This can add fuller text, engagement counts, media, and comments preview. Default is enabled. Disable it for cheaper, faster discovery-only runs.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments preview",
            "type": "boolean",
            "description": "Include up to five public comments returned inside each post detail payload. Default is false to keep records compact for agents. This is a preview only, not exhaustive comment scraping. Use the comments actor for full comment rows.",
            "default": false
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "Compact mode keeps the main fields for MCP and tables. Full mode also includes image lists, company extras, author images, and richer provenance. Default is full. Raw provider payloads still require includeRawData.",
            "default": "full"
          },
          "includeRawData": {
            "title": "Include raw provider data",
            "type": "boolean",
            "description": "Attach raw provider payloads to each dataset item. Default is false because raw payloads are large and less useful for agents. Enable only for debugging or custom downstream parsing. Does not expose provider API keys.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}