{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Linkedin Post Scraper",
    "description": "Scrape viral/trending LinkedIn posts by hashtag or keyword search. Perfect for finding content inspiration and building a library of top-performing posts in your niche. Get top posts from any LinkedIn hashtag. Find posts matching specific keywords. Output formatted for AI voice analysis",
    "version": "1.0",
    "x-build-id": "JwgDtSZJQRMQslJD8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~linkedin-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-linkedin-post-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/alizarin_refrigerator-owner~linkedin-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-linkedin-post-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/alizarin_refrigerator-owner~linkedin-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-linkedin-post-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": {
          "searchType": {
            "title": "Search Type",
            "enum": [
              "auto",
              "google_search",
              "hashtag",
              "keyword",
              "feed",
              "profile"
            ],
            "type": "string",
            "description": "How to find posts. 'auto' (RECOMMENDED) uses multiple methods with residential proxies - no cookies needed! 'google_search' finds indexed posts via Google. Other modes require LinkedIn cookies.",
            "default": "auto"
          },
          "profileUrl": {
            "title": "LinkedIn Profile URL",
            "type": "string",
            "description": "LinkedIn profile URL to scrape posts from. Example: https://www.linkedin.com/in/johnrippy/"
          },
          "profileUsername": {
            "title": "LinkedIn Username",
            "type": "string",
            "description": "LinkedIn username (the part after /in/ in the URL). Example: johnrippy"
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to scrape posts from (e.g., leadership, marketing, AI)",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Keywords to search for in posts",
            "items": {
              "type": "string"
            }
          },
          "cookies": {
            "title": "LinkedIn Cookies",
            "type": "string",
            "description": "JSON string of LinkedIn cookies for authentication"
          },
          "cookieStorageKey": {
            "title": "Cookie Manager Key",
            "type": "string",
            "description": "Storage key from Cookie Manager actor (e.g., 'linkedin-john'). Loads cookies automatically — no manual paste needed. Run the Cookie Manager actor first to capture cookies."
          },
          "cookieKvStoreName": {
            "title": "Cookie Store Name",
            "type": "string",
            "description": "Name of the Key-Value Store where Cookie Manager saved cookies. Default: 'cookie-sessions'",
            "default": "cookie-sessions"
          },
          "linkedinEmail": {
            "title": "LinkedIn Email",
            "type": "string",
            "description": "LinkedIn account email for automatic login (optional - enables authenticated scraping without manual cookie extraction)"
          },
          "linkedinPassword": {
            "title": "LinkedIn Password",
            "type": "string",
            "description": "LinkedIn account password for automatic login"
          },
          "linkedinAccessToken": {
            "title": "LinkedIn API Access Token",
            "type": "string",
            "description": "OAuth 2.0 access token from LinkedIn Developer Portal. This is the most reliable method - works from any IP with no cookies needed."
          },
          "linkedinClientId": {
            "title": "LinkedIn Client ID",
            "type": "string",
            "description": "Client ID from your LinkedIn Developer App"
          },
          "linkedinClientSecret": {
            "title": "LinkedIn Client Secret",
            "type": "string",
            "description": "Client Secret from your LinkedIn Developer App"
          },
          "activityTypes": {
            "title": "Activity Types to Scrape",
            "type": "array",
            "description": "What types of activity to scrape: posts, articles, comments, or all. Select 'all' for complete voice analysis.",
            "items": {
              "type": "string",
              "enum": [
                "posts",
                "articles",
                "comments",
                "all"
              ]
            },
            "default": [
              "posts"
            ]
          },
          "maxPostsPerSource": {
            "title": "Max Items Per Activity Type",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum items to scrape per activity type (posts, articles, comments)",
            "default": 50
          },
          "minLikes": {
            "title": "Minimum Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at least this many likes (filters for viral content)",
            "default": 100
          },
          "minComments": {
            "title": "Minimum Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at least this many comments",
            "default": 10
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "recent",
              "top"
            ],
            "type": "string",
            "description": "How to sort/filter posts",
            "default": "top"
          },
          "timeFilter": {
            "title": "Time Filter",
            "enum": [
              "past_24h",
              "past_week",
              "past_month",
              "any"
            ],
            "type": "string",
            "description": "Only get posts from this time period",
            "default": "past_week"
          },
          "includeAuthorInfo": {
            "title": "Include Author Info",
            "type": "boolean",
            "description": "Also scrape author's profile info (followers, headline)",
            "default": true
          },
          "includeCommentText": {
            "title": "Include Comment Text",
            "type": "boolean",
            "description": "Scrape actual comment text and authors, not just comment counts",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of comments to scrape per post",
            "default": 10
          },
          "includeReactionsBreakdown": {
            "title": "Include Reactions Breakdown",
            "type": "boolean",
            "description": "Get breakdown by reaction type (like, celebrate, support, love, insightful, funny)",
            "default": false
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings"
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return realistic sample data for testing the actor output format. Disable and provide authentication (cookies or LinkedIn credentials) for actual scraping.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to POST results when scraping completes (Zapier, Make, n8n, custom endpoint)"
          },
          "webhookPlatform": {
            "title": "Webhook Platform",
            "enum": [
              "zapier",
              "make",
              "n8n",
              "custom"
            ],
            "type": "string",
            "description": "Platform type for proper payload formatting",
            "default": "custom"
          },
          "webhookHeaders": {
            "title": "Custom Webhook Headers",
            "type": "object",
            "description": "Additional HTTP headers to send with webhook (e.g., {\"Authorization\": \"Bearer token\", \"X-API-Key\": \"key\"})"
          },
          "enableSentimentAnalysis": {
            "title": "Enable AI Sentiment Analysis",
            "type": "boolean",
            "description": "Use AI to analyze sentiment and tone of posts and comments",
            "default": false
          },
          "aiProvider": {
            "title": "AI Provider",
            "enum": [
              "none",
              "openai",
              "anthropic",
              "google",
              "mistral",
              "cohere"
            ],
            "type": "string",
            "description": "Which AI provider to use for sentiment analysis",
            "default": "none"
          },
          "aiApiKey": {
            "title": "AI API Key",
            "type": "string",
            "description": "API key for your chosen AI provider"
          },
          "aiModel": {
            "title": "AI Model (Optional)",
            "type": "string",
            "description": "Custom model name (leave empty for default). Examples: gpt-4o, claude-3-5-sonnet-20241022, gemini-1.5-pro"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}