{
  "openapi": "3.0.1",
  "info": {
    "title": "Audio Loudness Analyzer & Normalizer (LUFS, True Peak)",
    "description": "Measure integrated LUFS, loudness range, true peak, clipping and silence of audio or video URLs (EBU R128 / ITU-R BS.1770), check Spotify, YouTube, Apple Podcasts and broadcast compliance, and normalize to -14, -16 or -23 LUFS. No external APIs.",
    "version": "1.0",
    "x-build-id": "wiMsGxPEcD81AC0QQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~audio-loudness-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-audio-loudness-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/freecamp008~audio-loudness-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-audio-loudness-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/freecamp008~audio-loudness-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-audio-loudness-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",
        "required": [
          "mediaUrls"
        ],
        "properties": {
          "mediaUrls": {
            "title": "Audio / video URLs",
            "type": "array",
            "description": "Direct links to audio or video files (MP3, WAV, FLAC, M4A, AAC, OGG, OPUS, MP4, MOV, MKV, WEBM, ...). Each file becomes one loudness report. For video files the first audio track is measured. The link must return the media file itself, not a web page with a player.",
            "items": {
              "type": "string"
            }
          },
          "normalize": {
            "title": "Normalize loudness (create a corrected file)",
            "type": "boolean",
            "description": "Also produce a loudness-normalized copy of each file at the target below, saved to the key-value store (<code>normalizedFileUrl</code>). The output is measured again to verify it hits the target. Billed per normalized minute.",
            "default": false
          },
          "targetPreset": {
            "title": "Normalization target",
            "enum": [
              "streaming",
              "apple-music",
              "podcast",
              "podcast-mono",
              "ebu-r128",
              "atsc-a85",
              "custom"
            ],
            "type": "string",
            "description": "Target integrated loudness and true-peak ceiling. <b>Streaming</b>: -14 LUFS / -1 dBTP (Spotify, YouTube, Tidal, Amazon). <b>Podcast</b>: -16 LUFS / -1 dBTP (Apple Podcasts). <b>EBU R128</b>: -23 LUFS / -1 dBTP. <b>ATSC A/85</b>: -24 LKFS / -2 dBTP. <b>Custom</b>: use the two fields below.",
            "default": "streaming"
          },
          "targetLufs": {
            "title": "Custom target loudness (LUFS)",
            "minimum": -40,
            "maximum": -5,
            "type": "number",
            "description": "Integrated loudness target, used only when <i>Normalization target</i> is <b>Custom</b>.",
            "default": -14
          },
          "truePeakCeilingDbtp": {
            "title": "Custom true-peak ceiling (dBTP)",
            "minimum": -9,
            "maximum": 0,
            "type": "number",
            "description": "Maximum true peak of the normalized file, used only when <i>Normalization target</i> is <b>Custom</b>.",
            "default": -1
          },
          "normalizationMode": {
            "title": "Normalization mode",
            "enum": [
              "auto",
              "linear"
            ],
            "type": "string",
            "description": "<b>Auto</b>: plain gain change (fully transparent) whenever the peaks allow it; otherwise ffmpeg loudnorm two-pass with gentle dynamic processing and true-peak limiting so the target is always reached. <b>Linear only</b>: never compress or limit; if the peaks would exceed the ceiling, apply only as much gain as fits and report that the target was not reached.",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "auto",
              "mp3",
              "m4a",
              "wav",
              "flac",
              "opus"
            ],
            "type": "string",
            "description": "Format of the normalized file. <b>Auto</b> keeps the input's family (MP3 to MP3, FLAC to FLAC, WAV to WAV, AAC/M4A to M4A, Ogg/Opus/WebM to Opus, video to M4A). The original sample rate is kept where the codec allows it (Opus is always 48 kHz; MP3 at most 48 kHz). WAV and FLAC are 16-bit with dither.",
            "default": "auto"
          },
          "outputBitrateKbps": {
            "title": "Output bitrate for MP3 / AAC / Opus (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "Bitrate of lossy output formats. Ignored for WAV and FLAC.",
            "default": 192
          },
          "maxFileSizeMB": {
            "title": "Max file size for normalization (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Normalization downloads the file first (it needs two passes). Larger files are rejected. Analysis-only runs stream the file and have no size limit.",
            "default": 1000
          },
          "dualMono": {
            "title": "Measure mono files as dual-mono",
            "type": "boolean",
            "description": "Mono files are played on two speakers by most players. With this on, a mono file is measured as if it were the same signal on left and right (+3 LU), as many podcast tools do. Has no effect on stereo or multichannel files.",
            "default": false
          },
          "includeTimeline": {
            "title": "Include loudness timeline",
            "type": "boolean",
            "description": "Add a <code>timeline</code> array with short-term loudness (3 s window) and the maximum momentary loudness for every interval, for charts and finding loud or quiet passages.",
            "default": false
          },
          "timelineResolutionSec": {
            "title": "Timeline resolution (seconds)",
            "minimum": 0.1,
            "maximum": 60,
            "type": "number",
            "description": "Interval between timeline points. Automatically coarsened for very long files (max ~5,000 points).",
            "default": 1
          },
          "silenceThresholdDb": {
            "title": "Silence threshold (dBFS)",
            "minimum": -90,
            "maximum": -20,
            "type": "number",
            "description": "Samples below this peak level count as silence when measuring silence at the start and end of the file.",
            "default": -60
          },
          "maxDurationMinutes": {
            "title": "Max duration per file (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Only the first N minutes of each file are analyzed (and billed). Longer files are marked <code>truncated: true</code>.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}