{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Content Generator (TikTok, LinkedIn YouTube, Blog)",
    "description": "Turn global chaos into strategic content. Generate viral TikTok scripts, SEO blog outlines, and LinkedIn thought leadership from real-time intelligence using premium AI models via OpenRouter (GPT-5.1, Claude 4.6, Gemini 3.1).",
    "version": "0.0",
    "x-build-id": "9SehZT1y4xE3azwx1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/visita~social-content-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-visita-social-content-generator",
        "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/visita~social-content-generator/runs": {
      "post": {
        "operationId": "runs-sync-visita-social-content-generator",
        "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/visita~social-content-generator/run-sync": {
      "post": {
        "operationId": "run-sync-visita-social-content-generator",
        "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": [
          "target_niche",
          "output_format"
        ],
        "properties": {
          "target_niche": {
            "title": "📍 News Niche",
            "enum": [
              "World News",
              "Health & Fitness",
              "Social Media & Creator Economy",
              "Gaming & Esports",
              "Tech & AI",
              "Global Markets (Finance)",
              "Venture Capital & Startups",
              "Education & EdTech",
              "FoodTech & Agriculture",
              "Luxury & Lifestyle",
              "Retail & Ecommerce",
              "Real Estate & Property",
              "Nuclear Energy",
              "Energy",
              "Motoring & Auto",
              "Crypto",
              "Web3"
            ],
            "type": "string",
            "description": "Select the specific niche to pull intelligence from.<br><b>Visita Intelligence Mode:</b> Fetches the latest articles from the Visita Intelligence database for this niche.",
            "default": "World News"
          },
          "location_filter": {
            "title": "🌍 Location Filter",
            "enum": [
              "Global (All)",
              "International Only (Exclude SA)",
              "South Africa Only"
            ],
            "type": "string",
            "description": "Filter the intelligence by region.",
            "default": "Global (All)"
          },
          "force_regenerate": {
            "title": "🔄 Force Regeneration",
            "type": "boolean",
            "description": "If checked, the AI will <b>ignore deduplication</b> and rewrite content even if the trend has been processed before. Useful for re-doing a specific format.",
            "default": false
          },
          "max_topics_to_process": {
            "title": "Max Topics",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limit the number of topic clusters to process.",
            "default": 10
          },
          "output_format": {
            "title": "🎨 Content Format",
            "enum": [
              "TikTok",
              "YouTube Script",
              "Blog Outline",
              "LinkedIn Post",
              "Instagram Reel",
              "Newsletter Deep Dive",
              "Ad Copy (Facebook/IG)",
              "Article Summary"
            ],
            "type": "string",
            "description": "Choose the specific format you want to generate.",
            "default": "TikTok"
          },
          "target_audience": {
            "title": "Target Audience",
            "type": "string",
            "description": "Who is this for? (e.g., 'Investors', 'Gamers', 'Policy Makers')."
          },
          "content_tone": {
            "title": "Tone of Voice",
            "enum": [
              "Provocative & Contrarian",
              "Educational & Authoritative",
              "Empathetic & Human",
              "Humorous & Sarcastic",
              "Urgent & News-Breaking",
              "Professional & Analytical"
            ],
            "type": "string",
            "description": "Select the persona for the AI.",
            "default": "Educational & Authoritative"
          },
          "openai_model": {
            "title": "🧠 AI Model",
            "enum": [
              "google/gemini-3.1-pro-preview",
              "openai/gpt-5.1",
              "anthropic/claude-opus-4.6"
            ],
            "type": "string",
            "description": "Premium models (GPT-5.1, Claude 4.6) provide the best reasoning. All models are routed via OpenRouter.",
            "default": "openai/gpt-5.1"
          },
          "creativity_level": {
            "title": "Creativity (Temperature)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Higher values (70-90) are better for creative scripts. Lower values (20-40) are better for factual news.",
            "default": 75
          },
          "dry_run": {
            "title": "🧪 Mock Mode (Free/Test)",
            "type": "boolean",
            "description": "If checked, the Actor will NOT call Supabase or OpenRouter. It will return a single dummy result immediately. Perfect for automated testing to avoid costs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}