{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Video Analyzer: Video to Text, Transcript & OCR",
    "description": "Everything a video says, shows and writes, in one Actor. Get the transcript, the scenes, the text on screen (OCR) and an AI analysis or your own JSON fields. YouTube, TikTok, Instagram, X, Facebook, Snapchat, Vimeo, Dailymotion, Loom and Rumble.",
    "version": "2.3",
    "x-build-id": "7Uwh9FKWdOc3OvDm9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/invideoiq~ai-video-analysis/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-invideoiq-ai-video-analysis",
        "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/invideoiq~ai-video-analysis/runs": {
      "post": {
        "operationId": "runs-sync-invideoiq-ai-video-analysis",
        "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/invideoiq~ai-video-analysis/run-sync": {
      "post": {
        "operationId": "run-sync-invideoiq-ai-video-analysis",
        "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": {
          "video_urls": {
            "title": "🎬 Video URLs",
            "type": "array",
            "description": "Public video URLs, one per line: YouTube (videos and Shorts), TikTok, Instagram (Reels and posts), X (Twitter), Facebook, Snapchat (Spotlight, stories and highlights), Vimeo, Dailymotion, Loom, Rumble. For an Instagram carousel or a Snapchat highlight, add ?img_index=N to the URL to pick the video. Free Apify plan: runs analyze at most 3 videos. This limit comes from the free Apify plan, not from the Actor: any paid Apify plan removes it.",
            "items": {
              "type": "string"
            }
          },
          "transcript": {
            "title": "💬 Transcript: what is said",
            "type": "boolean",
            "description": "The words of the video, with the time of each sentence.",
            "default": true
          },
          "transcript_source": {
            "title": "Where the transcript comes from",
            "enum": [
              "auto",
              "captions",
              "speech_to_text"
            ],
            "type": "string",
            "description": "Automatic: the captions of the video when it has some (price per video), otherwise its speech is transcribed (price per minute). Captions only: a video without captions gets no transcript. Speech to text: always transcribed, even when there are captions, which is often more accurate. Each result says which one was used in transcript_source. Used only when the transcript is ticked.",
            "default": "auto"
          },
          "scenes": {
            "title": "🎞️ Scenes and OCR: what is shown and written",
            "type": "boolean",
            "description": "Each shot with its start, its end and what it shows, plus OCR: the text on screen with its time (titles, prices, captions burned into the picture, slides, signs). Works without speech too. Price per minute, OCR included.",
            "default": true
          },
          "ai_analysis": {
            "title": "✨ AI analysis",
            "enum": [
              "none",
              "insights",
              "own_fields"
            ],
            "type": "string",
            "description": "Reads what is ticked above: the transcript, the scenes and their on-screen text, or both. Insights: summary, hook, key moments, products, call to action, audience and the answer to your question. Your own fields: the data you describe below, as structured JSON. Each value comes with the moment of the video it is taken from.",
            "default": "none"
          },
          "ai_instructions": {
            "title": "Your question, or what to extract",
            "type": "string",
            "description": "With insights: a question asked of every video, for example: Is a discount code shown, and which one? With your own fields: what to extract, in plain words. The fields are then written for you when the schema below is left as it is, and saved as SCHEMA in the key-value store of the run. <a href='https://apify.com/invideoiq/ai-video-analysis#templates-to-copy' target='_blank' rel='noopener'>Templates to copy</a>"
          },
          "schema": {
            "title": "Your own fields, as a JSON Schema (optional)",
            "type": "object",
            "description": "Used when the AI analysis is set to Your own fields. The example is yours to change. <a href='https://apify.com/invideoiq/ai-video-analysis#how-to-write-your-schema' target='_blank' rel='noopener'>How to write your schema: rules and examples</a>. In short: at most 10 fields per level and 3 levels, one type per field (string, number, integer, boolean, array, object), and a description for each. It is checked before the first video: a schema with a mistake stops the run, says which field is wrong, and costs nothing. To have the fields written for you, describe them above instead."
          },
          "ai_language": {
            "title": "🌍 Language of the AI analysis",
            "type": "string",
            "description": "The language the AI analysis is written in. The transcript and the on-screen text stay in the language of the video.",
            "default": "English"
          },
          "dataset_id": {
            "title": "🔗 Results of another Actor",
            "type": "string",
            "description": "Pick the dataset of a scraper run: the links of its videos are found and analyzed, in order, after the video URLs above. Example: search a keyword with TikTok Search Scraper, then pick its results here. Works with most TikTok, Instagram, YouTube, Facebook and X scrapers. <a href='https://apify.com/invideoiq/ai-video-analysis#analyze-the-results-of-a-video-scraper' target='_blank' rel='noopener'>Step by step</a>"
          },
          "max_dataset_videos": {
            "title": "🔢 How many of its videos to analyze",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos of the dataset are analyzed, from the first one.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}