{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Voice Trainer & AI Content Generator",
    "description": "Analyze LinkedIn posts to extract writing voice patterns using AI. Train AI assistants on your style. GPT-4/Claude powered.",
    "version": "1.0",
    "x-build-id": "Jrlq7XYX1fPdarFX9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~linkedin-voice-trainer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-linkedin-voice-trainer",
        "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-voice-trainer/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-linkedin-voice-trainer",
        "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-voice-trainer/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-linkedin-voice-trainer",
        "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",
        "required": [
          "task"
        ],
        "properties": {
          "linkedinProfileUrl": {
            "title": "LinkedIn Profile URL",
            "type": "string",
            "description": "LinkedIn profile URL to analyze (e.g., https://www.linkedin.com/in/johnrippy/). The actor will automatically scrape this user's posts using our LinkedIn scraper."
          },
          "linkedinEmail": {
            "title": "LinkedIn Email",
            "type": "string",
            "description": "Your LinkedIn account email (optional). Enables authenticated scraping for better results - the scraper will login automatically and extract posts."
          },
          "linkedinPassword": {
            "title": "LinkedIn Password",
            "type": "string",
            "description": "Your LinkedIn account password for automatic login. Only works if MFA/2FA is disabled."
          },
          "cookies": {
            "title": "LinkedIn Cookies (Manual)",
            "type": "string",
            "description": "JSON array of cookies exported from your browser. Use Cookie-Editor or EditThisCookie extension. Not needed if using Cookie Manager."
          },
          "cookieStorageKey": {
            "title": "Cookie Manager Storage Key",
            "type": "string",
            "description": "Key to load cookies from Cookie Manager's named KV store. Use this instead of pasting cookies manually. Run Cookie Manager actor first to capture and store your LinkedIn session."
          },
          "cookieKvStoreName": {
            "title": "Cookie Manager KV Store Name",
            "type": "string",
            "description": "Name of the Apify Key-Value Store where Cookie Manager saved the session. Default: 'cookie-sessions'.",
            "default": "cookie-sessions"
          },
          "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."
          },
          "task": {
            "title": "Task",
            "enum": [
              "analyze_voice",
              "generate_post",
              "improve_draft",
              "suggest_topics",
              "analyze_performance"
            ],
            "type": "string",
            "description": "What to do: analyze posts to create voice profile, generate posts, or improve a draft",
            "default": "analyze_voice"
          },
          "aiProvider": {
            "title": "AI Provider",
            "enum": [
              "claude",
              "openai",
              "gemini"
            ],
            "type": "string",
            "description": "Which AI provider to use for voice analysis and content generation",
            "default": "claude"
          },
          "claudeApiKey": {
            "title": "Claude API Key",
            "type": "string",
            "description": "Your Anthropic Claude API key (required if using Claude). Steps: 1) Go to console.anthropic.com 2) Click Settings > API Keys 3) Create new key 4) Copy and paste here"
          },
          "openaiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "Your OpenAI API key (required if using OpenAI). Steps: 1) Go to platform.openai.com 2) Click API Keys 3) Create new secret key 4) Copy and paste here"
          },
          "geminiApiKey": {
            "title": "Google Gemini API Key",
            "type": "string",
            "description": "Your Google Gemini API key (required if using Gemini). Steps: 1) Go to aistudio.google.com 2) Click Get API key 3) Create key in new project 4) Copy and paste here"
          },
          "aiModel": {
            "title": "AI Model (Optional)",
            "type": "string",
            "description": "Override default model. Leave empty for: Claude (claude-sonnet-4-5-20250929), OpenAI (gpt-4-turbo-preview), Gemini (gemini-1.5-pro)"
          },
          "posts": {
            "title": "Posts for Analysis",
            "type": "array",
            "description": "LinkedIn posts to analyze for voice training. Each post should have text, likes, comments, reposts."
          },
          "voiceProfile": {
            "title": "Voice Profile",
            "type": "object",
            "description": "Previously generated voice profile (for generate/improve tasks)"
          },
          "voiceProfileId": {
            "title": "Voice Profile ID",
            "type": "string",
            "description": "Load voice profile from Apify Key-Value Store by ID"
          },
          "saveVoiceProfile": {
            "title": "Save Voice Profile",
            "type": "boolean",
            "description": "Save the generated voice profile to Apify Key-Value Store for reuse",
            "default": true
          },
          "voiceProfileName": {
            "title": "Voice Profile Name",
            "type": "string",
            "description": "Name for the voice profile (used as storage key)",
            "default": "my-voice-profile"
          },
          "topic": {
            "title": "Post Topic",
            "type": "string",
            "description": "Topic for post generation (required for generate_post task)"
          },
          "draft": {
            "title": "Draft to Improve",
            "type": "string",
            "description": "Draft text to improve (required for improve_draft task)"
          },
          "feedback": {
            "title": "Improvement Feedback",
            "type": "string",
            "description": "Specific feedback for draft improvement"
          },
          "contentType": {
            "title": "Content Type",
            "enum": [
              "text",
              "image",
              "video",
              "carousel",
              "document",
              "poll"
            ],
            "type": "string",
            "description": "Type of content to optimize for",
            "default": "text"
          },
          "includeHashtags": {
            "title": "Include Hashtags",
            "type": "boolean",
            "description": "Include hashtags in generated posts",
            "default": true
          },
          "maxLength": {
            "title": "Max Post Length",
            "minimum": 100,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum character length for generated posts",
            "default": 1500
          },
          "variations": {
            "title": "Generate Variations",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of alternative versions to generate",
            "default": 1
          },
          "industry": {
            "title": "Industry Context",
            "type": "string",
            "description": "Your industry (for better topic suggestions)"
          },
          "recentTopics": {
            "title": "Recent Topics",
            "type": "array",
            "description": "Topics you've recently covered (to avoid repetition)",
            "items": {
              "type": "string"
            }
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return mock data for testing without API calls. Enable this if you don't have an AI API key yet.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to receive a POST request when the actor run finishes. Useful for integrations with Zapier, Make, n8n, or custom automation workflows."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}