{
  "openapi": "3.0.1",
  "info": {
    "title": "Linkedin Profile Scraper",
    "description": "Scrape LinkedIn profiles and their recent posts for personal branding analysis. Perfect for building a voice profile of your LinkedIn presence or analyzing top performers in your niche.",
    "version": "1.0",
    "x-build-id": "65Ss1TP8YdYz5u22W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~linkedin-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-linkedin-profile-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-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-linkedin-profile-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-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-linkedin-profile-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": {
          "scrapeType": {
            "title": "Scrape Type",
            "enum": [
              "profile",
              "company"
            ],
            "type": "string",
            "description": "Type of LinkedIn page to scrape",
            "default": "profile"
          },
          "profileUrls": {
            "title": "Profile URLs",
            "type": "array",
            "description": "LinkedIn profile URLs to scrape (e.g., https://linkedin.com/in/username)",
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Company URLs",
            "type": "array",
            "description": "LinkedIn company page URLs to scrape (e.g., https://linkedin.com/company/companyname)",
            "items": {
              "type": "string"
            }
          },
          "cookies": {
            "title": "LinkedIn Cookies (Recommended)",
            "type": "string",
            "description": "JSON array of cookies exported from your browser. Use Cookie-Editor or EditThisCookie extension. Required if MFA/2FA is enabled on your LinkedIn account."
          },
          "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": "Your LinkedIn email for automatic login. Only works if MFA/2FA is disabled."
          },
          "linkedinPassword": {
            "title": "LinkedIn Password",
            "type": "string",
            "description": "Your LinkedIn password for automatic login"
          },
          "linkedinAccessToken": {
            "title": "LinkedIn OAuth Access Token",
            "type": "string",
            "description": "OAuth 2.0 access token from your LinkedIn Developer App. Create one at https://developer.linkedin.com - requires 'r_liteprofile' and 'r_basicprofile' scopes. Best for scraping your own profile."
          },
          "maxPosts": {
            "title": "Max Posts Per Profile",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of recent posts to scrape per profile",
            "default": 20
          },
          "includeComments": {
            "title": "Include Top Comments",
            "type": "boolean",
            "description": "Also scrape top comments on each post (slower)",
            "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
          },
          "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"
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings"
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return mock data for testing without real 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\"})"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}