{
  "openapi": "3.0.1",
  "info": {
    "title": "Dailymotion Video Downloader",
    "description": "Download Dailymotion videos to MP4 and extract metadata, stream URLs, subtitles, and thumbnails by video URL, channel, playlist, or search. MCP/API-ready.",
    "version": "1.0",
    "x-build-id": "DvIELcdiQ4onk0C1b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~dailymotion-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-dailymotion-video-downloader",
        "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/khadinakbar~dailymotion-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-dailymotion-video-downloader",
        "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/khadinakbar~dailymotion-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-dailymotion-video-downloader",
        "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": {
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "Dailymotion video pages to process. Accepts full URLs (https://www.dailymotion.com/video/x8m1234), short dai.ly links, embed URLs, or bare video IDs (x8m1234). This is the primary input — leave the channel/playlist/search fields empty when using it. NOT a channel or playlist URL; use the dedicated fields for those.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text Dailymotion search; returns matching videos newest-relevant first (e.g. 'space launch'). Used only when Video URLs is empty. Pair with Max results to bound how many are returned. NOT a URL — for a specific video use Video URLs."
          },
          "username": {
            "title": "Channel / username",
            "type": "string",
            "description": "Scrape recent videos from one Dailymotion channel by handle (euronews), @handle, or profile URL (https://www.dailymotion.com/euronews). Used only when Video URLs and Search query are empty. Combine with Max results to limit how many videos are pulled. NOT a video URL."
          },
          "playlistUrl": {
            "title": "Playlist URL or ID",
            "type": "string",
            "description": "Scrape every video in a Dailymotion playlist by URL (https://www.dailymotion.com/playlist/x5abcd) or bare playlist ID (x5abcd). Used only when the higher-priority inputs are empty. Bounded by Max results. NOT a single-video URL."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos to process for channel, playlist, or search inputs (Video URLs is capped by the list you supply). Defaults to 25. Range 1–1000. Higher values increase run time and cost.",
            "default": 25
          },
          "downloadVideo": {
            "title": "Download MP4 to storage",
            "type": "boolean",
            "description": "When enabled, the actor downloads each video's HLS stream, remuxes it to a single MP4 with ffmpeg, and saves it to the run's key-value store; the public file URL is added to each record as downloadedMp4Url. When disabled (default), only metadata and direct stream URLs are returned (faster and cheaper). Videos longer than Max download duration are skipped. Adds a per-download charge.",
            "default": false
          },
          "videoQuality": {
            "title": "Download quality",
            "enum": [
              "highest",
              "1080",
              "720",
              "480",
              "380",
              "240",
              "lowest"
            ],
            "type": "string",
            "description": "Target resolution for the MP4 download; the closest available rendition at or below the target is chosen. Only applies when Download MP4 is enabled. 'highest' picks the best available; 'lowest' the smallest. Does not affect the stream URLs returned in metadata (those always list every quality).",
            "default": "highest"
          },
          "maxDownloadDurationSec": {
            "title": "Max download duration (seconds)",
            "minimum": 10,
            "maximum": 14400,
            "type": "integer",
            "description": "Videos longer than this are skipped for MP4 download (their metadata and stream URLs are still returned). Protects run time, memory, and cost on full-length content. Defaults to 1200 (20 minutes). Only applies when Download MP4 is enabled.",
            "default": 1200
          },
          "includeSubtitles": {
            "title": "Include subtitles",
            "type": "boolean",
            "description": "When enabled (default), each record includes available subtitle tracks with language, label, and direct .srt/.vtt URL. Disable to omit the subtitles array from output. Does not download subtitle files, only links them.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}