{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Posts Search Scraper",
    "description": "Search public LinkedIn posts by keyword, phrase or hashtag. Get full text, author, publish time, reactions, comments, media, hashtags, mentions, reposts and search position - with the search source on every row. No LinkedIn login or cookies.",
    "version": "1.0",
    "x-build-id": "OGqTokMefRkYYw9ma"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~linkedin-posts-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-linkedin-posts-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/coregent~linkedin-posts-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-linkedin-posts-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/coregent~linkedin-posts-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-linkedin-posts-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One search per line. Plain keywords (AI agents), \"exact phrases\" in double quotes, or #hashtags. Each query is searched separately and every row keeps the query that found it. Up to 100 queries per run; identical queries are merged.",
            "default": [
              "AI agents"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max posts per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts saved (and charged) for each query. Typical values: 20, 50, 100, 500, 1000. Large values need a broad query - niche topics have fewer public posts.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "RECENCY"
            ],
            "type": "string",
            "description": "RELEVANCE: the search index's own ranking first, then deeper results in newest-first date slices. RECENCY: newest posts first (date-sliced newest to oldest).",
            "default": "RELEVANCE"
          },
          "datePosted": {
            "title": "Date posted",
            "enum": [
              "ANY_TIME",
              "PAST_24_HOURS",
              "PAST_WEEK",
              "PAST_MONTH",
              "PAST_YEAR",
              "CUSTOM"
            ],
            "type": "string",
            "description": "Only return posts published in this window. CUSTOM uses the 'Posted after' / 'Posted before' dates below. Dates are verified against each post's exact publish time.",
            "default": "ANY_TIME"
          },
          "postedAfter": {
            "title": "Posted after",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2}([T ][0-9:.]+Z?)?)$",
            "type": "string",
            "description": "Earliest publish date (YYYY-MM-DD, UTC). Used with Date posted = Custom range.",
            "default": ""
          },
          "postedBefore": {
            "title": "Posted before",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2}([T ][0-9:.]+Z?)?)$",
            "type": "string",
            "description": "Latest publish date (YYYY-MM-DD, UTC, inclusive). Used with Date posted = Custom range.",
            "default": ""
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Keep only posts written by these people. LinkedIn profile URLs (https://www.linkedin.com/in/janesmith) or profile slugs (janesmith). Filters the posts found for your queries; it does not widen the search, so include the author's name in the query (e.g. \"Jane Smith\" AI).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorCompanies": {
            "title": "Author companies (company pages)",
            "type": "array",
            "description": "Keep only posts published by these LinkedIn company pages. Company URLs (https://www.linkedin.com/company/canva), slugs (canva) or exact page names (Canva).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mentionedOrganizations": {
            "title": "Mentioned organizations",
            "type": "array",
            "description": "Keep only posts that mention at least one of these organizations, either as an @-mention or by name in the post text. The names are also added to the search to find more matching posts. Up to 10.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "contentTypes": {
            "title": "Content types",
            "type": "array",
            "description": "Keep only posts of these types. TEXT = text-only posts (no media). Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "TEXT",
                "IMAGE",
                "VIDEO",
                "ARTICLE",
                "DOCUMENT",
                "REPOST",
                "QUOTE_POST"
              ],
              "enumTitles": [
                "Text only",
                "Image",
                "Video",
                "Article / link card",
                "Document / carousel",
                "Repost",
                "Quote post"
              ]
            },
            "default": []
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Return image, video, document and article-card media objects for each post.",
            "default": true
          },
          "includeTopComments": {
            "title": "Include top comments preview",
            "type": "boolean",
            "description": "Add up to 3 top comments that LinkedIn shows publicly on the post page. A preview only - not full comment threads.",
            "default": false
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Add the post page's raw structured data and the search hit (title, snippet) under `raw`. For advanced users.",
            "default": false
          },
          "deduplicateAcrossQueries": {
            "title": "Deduplicate across queries",
            "type": "boolean",
            "description": "By default the same post can appear once per query that found it (and is charged once per query). Turn on to return each post only once per run, under the first query that found it.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to fetch public LinkedIn post pages. Apify Datacenter proxy is used by default. Apify Residential is not supported; bring your own residential provider via Custom proxy URLs if you need one.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}