{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Public Post Search Scraper",
    "description": "Search public LinkedIn posts by keyword, author or company. Get full post text, author, date, images/video, reactions and comment counts with stable post IDs. No login or cookies.",
    "version": "0.1",
    "x-build-id": "RqphbFUhMpbSbGMpd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~linkedin-public-post-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-linkedin-public-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/automation-lab~linkedin-public-post-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-linkedin-public-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/automation-lab~linkedin-public-post-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-linkedin-public-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords or phrases to find in public LinkedIn posts, one per line. Words are matched anywhere in the indexed post (title, text or URL slug), in any order. Wrap a phrase in double quotes to require it, and use OR between alternatives, for example: \"generative AI\" OR \"agentic AI\". Each query runs as its own search; posts found by several queries are returned once with every matching query listed in matchedQueries. Optional when Author or company URLs are given.",
            "items": {
              "type": "string"
            }
          },
          "authorUrls": {
            "title": "Author or company URLs",
            "type": "array",
            "description": "Optional LinkedIn profile (https://www.linkedin.com/in/...) or company (https://www.linkedin.com/company/...) URLs. Only posts published by these authors are returned. With search queries, every author is combined with every query (author AND query); without queries, the author's indexed posts are returned. The company filter uses the company's LinkedIn vanity name, so use the URL exactly as shown on LinkedIn.",
            "items": {
              "type": "string"
            }
          },
          "datePosted": {
            "title": "Date posted",
            "enum": [
              "any",
              "past-24h",
              "past-week",
              "past-month",
              "past-year"
            ],
            "type": "string",
            "description": "Keep only posts published within this period before the run started. Ignored when Posted after or Posted before is set.",
            "default": "any"
          },
          "postedAfter": {
            "title": "Posted after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Keep only posts published on or after this day (YYYY-MM-DD, UTC). Use with daily or weekly schedules for incremental exports. Overrides Date posted."
          },
          "postedBefore": {
            "title": "Posted before",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Keep only posts published on or before this day (YYYY-MM-DD, UTC). Overrides Date posted."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance keeps search order and streams results as they are found. Date returns the newest posts first; the run then reads every found post before saving, so results appear at the end of the run.",
            "default": "relevance"
          },
          "maxPostsPerQuery": {
            "title": "Max posts per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum post URLs collected from each search (each query, or each author + query combination). Posts outside the date window, deleted posts and posts already returned by another search do not add extra results, so a run can return fewer posts than this number. Public index coverage is limited, so very high values may stop early when no more results exist.",
            "default": 25
          },
          "maxPostsTotal": {
            "title": "Max posts in total",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional limit on posts saved in the whole run across all searches. 0 means no total limit (only Max posts per search applies).",
            "default": 0
          },
          "region": {
            "title": "Search region",
            "type": "string",
            "description": "Region and language of the public search index, for example us-en, uk-en, de-de, fr-fr or in-en. wt-wt means no region preference. This biases which posts are found; it does not filter by author location.",
            "default": "wt-wt"
          },
          "includeComments": {
            "title": "Include top comments",
            "type": "boolean",
            "description": "Add up to 20 public comments shown on the post page (author name, text, date, likes) to each record in topComments. This does not cost extra.",
            "default": false
          },
          "incrementalStateKey": {
            "title": "Incremental state key",
            "type": "string",
            "description": "Optional name for remembering post IDs between runs. When set, posts already returned by an earlier run with the same key are skipped and not charged again. Use one key per monitoring job, for example brand-monitoring-daily."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}