{
  "openapi": "3.0.1",
  "info": {
    "title": "Ad Creative Intelligence — Transcript, Hook, On-Screen Text",
    "description": "Turns ad video URLs into transcripts with timestamps, on-screen text, the first-3-seconds hook and the detected CTA. Pay per analyzed video, no login, no API key.",
    "version": "0.2",
    "x-build-id": "eOE92L2aljgn6Vobw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kurilov_ai~ad-creative-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kurilov_ai-ad-creative-intelligence",
        "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/kurilov_ai~ad-creative-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-kurilov_ai-ad-creative-intelligence",
        "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/kurilov_ai~ad-creative-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-kurilov_ai-ad-creative-intelligence",
        "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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "Videos to analyze. Each item needs a direct media `url`; optional `meta` is copied to the output untouched, use it to carry your own identifiers such as `adId`. The actor does not scrape Ad Library itself — feed it URLs you already have.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "description": "Direct URL of the video file.",
                  "title": "Media URL"
                },
                "meta": {
                  "type": "object",
                  "description": "Arbitrary metadata passed through to the output record. `adId` is promoted to a top-level output field.",
                  "title": "Metadata"
                }
              }
            }
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "en",
              "es",
              "pt",
              "de",
              "fr",
              "it",
              "nl",
              "pl",
              "tr",
              "ru"
            ],
            "type": "string",
            "description": "Leave `auto` — the language is detected from the audio, and forcing a wrong language is the most common source of garbage transcripts. Set an ISO 639-1 code only when you know every video in the batch is in that language.",
            "default": "auto"
          },
          "asrModel": {
            "title": "Transcription quality",
            "enum": [
              "fast",
              "accurate"
            ],
            "type": "string",
            "description": "How hard to work on the audio. `fast` is the default and runs in 4 GB of memory; `accurate` reads noisy or music-heavy ads better but needs 8 GB, which doubles the compute cost of the run.",
            "default": "fast"
          },
          "extractOnScreenText": {
            "title": "Extract on-screen text",
            "type": "boolean",
            "description": "Run OCR over the key frames to capture captions, offers and prices burned into the video. Turn off for an audio-only, cheaper and faster pass.",
            "default": true
          },
          "maxFrames": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Upper bound on key frames sent to OCR. Frames are picked by scene-change detection, not by a fixed interval — 12 covers a typical 15–60 second ad.",
            "default": 12
          },
          "hookWindowSeconds": {
            "title": "Hook window",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Length of the opening window reported separately as the hook. Three seconds is what performance buyers benchmark against.",
            "default": 3
          },
          "skipIfNoSpeech": {
            "title": "Skip videos without speech",
            "type": "boolean",
            "description": "When on, a video with no speech is reported as `no_content` and OCR is skipped. Keep it off if you also want on-screen text from music-only creatives.",
            "default": false
          },
          "maxVideoDurationSeconds": {
            "title": "Max video duration",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Hard per-video limit. Anything longer is reported as `failed` with reason `too_long` and charged $0 — this is what stops one stray 20-minute video from eating the whole run's budget. The platform cap is 300 seconds; you can only lower it.",
            "default": 300
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Upper bound on how many videos are in flight at once. The run lowers it to what the memory you gave it can actually keep busy, so raising it mostly helps when the media host is slow.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}