{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Post Search Scraper",
    "description": "Search public LinkedIn posts by one or many keywords. Filter by date range, author, company, mentions and content type, sort by newest, skip posts you already have. Returns text, author headline, likes, comments, shares and media.",
    "version": "1.0",
    "x-build-id": "mjhH5946BszXwCImL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~linkedin-post-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-linkedin-post-search-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-post-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-linkedin-post-search-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-post-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-linkedin-post-search-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": {
          "query": {
            "title": "Search keyword",
            "maxLength": 200,
            "type": "string",
            "description": "One keyword or phrase to search in public LinkedIn posts, for example a brand, product, topic or exact quote. Use 'Search keywords' below to run several at once."
          },
          "queries": {
            "title": "Search keywords (several)",
            "maxItems": 50,
            "type": "array",
            "description": "Several keywords or phrases in one run. Posts found by more than one keyword are saved and billed once. Up to 5 keywords are searched at the same time.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum posts (total)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on posts saved and billed in this run, across all keywords. Free Apify plan runs return up to 50 posts per run; paid plans have no per-run limit beyond this value.",
            "default": 50
          },
          "maxResultsPerQuery": {
            "title": "Maximum posts per keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional cap per keyword so one keyword cannot use the whole budget. Leave empty for no per-keyword limit."
          },
          "datePosted": {
            "title": "Posted within",
            "enum": [
              "any",
              "last-hour",
              "last-day",
              "last-week",
              "last-month",
              "last-year"
            ],
            "type": "string",
            "description": "Preset freshness window. For an exact range use 'Posted after' and 'Posted before' below. 'Any time' returns all dates LinkedIn exposes.",
            "default": "last-week"
          },
          "postedAfter": {
            "title": "Posted after (exact date)",
            "type": "string",
            "description": "Only keep posts published on or after this date or time, for example 2026-11-01 or 2026-11-01T08:00:00Z. Posts without a public date are skipped when this is set."
          },
          "postedBefore": {
            "title": "Posted before (exact date)",
            "type": "string",
            "description": "Only keep posts published on or before this date or time, for example 2026-11-10. Combine with 'Posted after' for an exact date range."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance returns LinkedIn's best matches first. Newest returns the latest posts first, best for monitoring.",
            "default": "relevance"
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "",
              "videos",
              "images",
              "live_videos",
              "documents",
              "collaborative_articles",
              "jobs"
            ],
            "type": "string",
            "description": "Optional: keep only one kind of post. Leave empty for all kinds.",
            "default": ""
          },
          "authorUrls": {
            "title": "Posts written by (profile or company URLs)",
            "maxItems": 50,
            "type": "array",
            "description": "Only posts written by these LinkedIn profiles or company pages, for example https://www.linkedin.com/in/williamhgates or https://www.linkedin.com/company/microsoft. Works with or without a keyword.",
            "items": {
              "type": "string"
            }
          },
          "authorKeywords": {
            "title": "Author headline contains",
            "maxLength": 200,
            "type": "string",
            "description": "Only posts whose author headline contains these words, for example founder or CTO or recruiter."
          },
          "authorCompanies": {
            "title": "Author works at (company URLs)",
            "maxItems": 50,
            "type": "array",
            "description": "Only posts written by people who work at these companies. Company page URLs or numeric company IDs.",
            "items": {
              "type": "string"
            }
          },
          "mentioningCompanies": {
            "title": "Posts mentioning these companies",
            "maxItems": 50,
            "type": "array",
            "description": "Only posts that mention these company pages (URLs or numeric IDs).",
            "items": {
              "type": "string"
            }
          },
          "mentioningMembers": {
            "title": "Posts mentioning these people",
            "maxItems": 50,
            "type": "array",
            "description": "Only posts that mention these LinkedIn profiles (URLs or IDs).",
            "items": {
              "type": "string"
            }
          },
          "excludeDatasetId": {
            "title": "Skip posts already in this dataset",
            "type": "string",
            "description": "For monitoring: paste the dataset ID of an earlier run and posts already saved there are skipped and not billed again."
          },
          "excludePostIds": {
            "title": "Skip these post IDs",
            "maxItems": 1000,
            "type": "array",
            "description": "Post IDs or post URLs to skip, for example the IDs you stored from an earlier run.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include public comments",
            "type": "boolean",
            "description": "Include comments shown with each post when LinkedIn returns them. Turn off for smaller records.",
            "default": true
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "Compact keeps the main fields for tables and AI agents. Full also includes images, reaction breakdown, hashtags and paging details.",
            "default": "full"
          },
          "maxProviderPages": {
            "title": "Maximum result pages per keyword",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Advanced safety valve. Leave at 60 for normal runs. Each page holds up to 50 posts.",
            "default": 60
          },
          "startCursor": {
            "title": "Continue from cursor",
            "maxLength": 200,
            "type": "string",
            "description": "Paste the nextCursor value from an earlier run's summary to continue that search. Applies to the first keyword only. Leave empty for a fresh search."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}