{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Title & Thumbnail Analyzer + Better Titles",
    "description": "See which titles and thumbnails win in your YouTube niche (numbers, questions, faces, text, contrast) measured in views per subscriber, then get 5 better titles and a thumbnail brief for each of your videos.",
    "version": "1.0",
    "x-build-id": "ZucwgWF82BDaUaZMB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingeniela~youtube-title-thumbnail-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingeniela-youtube-title-thumbnail-analyzer",
        "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/ingeniela~youtube-title-thumbnail-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-ingeniela-youtube-title-thumbnail-analyzer",
        "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/ingeniela~youtube-title-thumbnail-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-ingeniela-youtube-title-thumbnail-analyzer",
        "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": {
          "nicheSearches": {
            "title": "Niche searches",
            "type": "array",
            "description": "What your viewers search on YouTube. The top videos are compared.",
            "items": {
              "type": "string"
            }
          },
          "videosPerSearch": {
            "title": "Top videos per search",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Sorted by views. Shorts are skipped.",
            "default": 20
          },
          "dateFilter": {
            "title": "Uploaded in the last",
            "enum": [
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Recent videos reflect today's packaging.",
            "default": "year"
          },
          "yourVideos": {
            "title": "Your video links",
            "type": "array",
            "description": "Get 5 better titles and a thumbnail brief for each.",
            "items": {
              "type": "string"
            }
          },
          "yourChannel": {
            "title": "Or your channel",
            "type": "string",
            "description": "@handle or channel link: your latest videos are reviewed."
          },
          "yourLatestVideos": {
            "title": "How many of your latest videos",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only with a channel.",
            "default": 5
          },
          "readThumbnails": {
            "title": "Read thumbnails with AI vision",
            "type": "boolean",
            "description": "Text on the thumbnail, face, emotion, contrast, colors.",
            "default": true
          },
          "rewriteTitles": {
            "title": "Rewrite my titles",
            "type": "boolean",
            "description": "5 better titles and a thumbnail brief per video of yours.",
            "default": true
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "Spanish",
              "Portuguese",
              "French",
              "German",
              "Italian"
            ],
            "type": "string",
            "description": "Language of the rules and briefs (titles keep the video's language).",
            "default": "English"
          },
          "scraperMaxCostUsd": {
            "title": "Max spend on data collection (USD)",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit for collecting the videos (about US$0.004 per video).",
            "default": 2
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "auto",
              "anthropic",
              "openai",
              "openrouter",
              "gemini",
              "xai",
              "deepseek",
              "mistral"
            ],
            "type": "string",
            "description": "Leave all keys empty to use the built-in AI (billed per AI event).",
            "default": "auto"
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Empty = a good default for the provider. Vision needs Anthropic, OpenAI or OpenRouter with an image model."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (optional)",
            "type": "string",
            "description": "With your own key (any provider) that provider bills you and AI events are not charged."
          },
          "openaiApiKey": {
            "title": "OpenAI API key (optional)",
            "type": "string",
            "description": "Your own key from platform.openai.com."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key (optional)",
            "type": "string",
            "description": "Your own key from openrouter.ai/keys."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key (optional)",
            "type": "string",
            "description": "Your own key from aistudio.google.com/apikey."
          },
          "xaiApiKey": {
            "title": "xAI (Grok) API key (optional)",
            "type": "string",
            "description": "Your own key from console.x.ai."
          },
          "deepseekApiKey": {
            "title": "DeepSeek API key (optional)",
            "type": "string",
            "description": "Your own key from platform.deepseek.com."
          },
          "mistralApiKey": {
            "title": "Mistral API key (optional)",
            "type": "string",
            "description": "Your own key from console.mistral.ai."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}