# Audio Loudness Analyzer & Normalizer (LUFS, True Peak) (`freecamp008/audio-loudness-analyzer`) Actor

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.

- **URL**: https://apify.com/freecamp008/audio-loudness-analyzer.md
- **Developed by:** [Camp8 fr0](https://apify.com/freecamp008) (community)
- **Categories:** AI, For creators, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 file analyzeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Audio Loudness Analyzer & Normalizer: LUFS, True Peak, LRA (EBU R128 / ITU-R BS.1770)

Measure the **loudness of any audio or video file from a URL** the way mastering engineers, streaming platforms and broadcasters do. You get integrated loudness in **LUFS**, **loudness range (LRA)**, maximum momentary and short-term loudness, **true peak (dBTP)**, sample peak, **clipping detection**, leading and trailing silence, plus a **compliance report for Spotify, YouTube, Apple Music, Apple Podcasts, Amazon Music, Tidal, Deezer, EBU R128 and ATSC A/85**. You can also **normalize each file to -14, -16, -23 or -24 LUFS** (or any custom target) and download the corrected file. Everything runs inside the Actor with ffmpeg and our own BS.1770 meter. No external APIs are used.

### What does Audio Loudness Analyzer do?

- Streams each audio or video file with ffmpeg and decodes it at its original sample rate and channel count
- Runs an **ITU-R BS.1770-4 / EBU R128 meter** (K-weighting, 400 ms momentary blocks, 3 s short-term windows, absolute and relative gating, EBU Tech 3342 loudness range)
- Measures **true peak** with 4x oversampling (2x at 96 kHz and above), the sample peak, RMS and DC offset for each channel, and stereo correlation
- Finds **clipping** (runs of full-scale samples and decoded samples above 0 dBFS) with timestamps
- Measures **silence at the start and end** of the file
- Compares the result with the **loudness targets of 9 platforms and broadcast specs**, and estimates how much each streaming service will turn the track up or down
- Optionally **normalizes** the file to a target loudness and true-peak ceiling, saves it in the format you choose, and **measures the output again** to verify it

### Key features

- **Accurate**: integrated loudness matches ffmpeg's `ebur128` filter (libebur128 method) within 0.05 LU on music, speech, podcasts and video soundtracks; LRA within 0.1 LU on files longer than about 30 seconds
- **Platform compliance report**: pass / info / warn / fail per platform, with the playback gain each streaming service will apply
- **Loudness normalization that respects dynamics**: plain gain change whenever the peaks allow it (fully transparent); otherwise ffmpeg `loudnorm` in two passes with true-peak limiting. The normalized file is measured again (typically within 0.1 LU of the target with linear gain, within 0.3 LU with loudnorm)
- **Output formats**: MP3, M4A (AAC), WAV, FLAC, Opus, or *auto* (same family as the input), at the original sample rate where the codec allows it
- **Video files work too**: MP4, MOV, MKV and WEBM. The first audio track is measured
- **Optional loudness timeline** (short-term LUFS and max momentary LUFS per interval) for charts and for finding loud or quiet passages
- **Surround aware**: 5.1 and 7.1 channel weighting per BS.1770 (LFE excluded, surrounds +1.5 dB). Mono files can optionally be measured as dual-mono
- **Fast and streaming**: analysis-only runs stream the file without saving it and handle hours of audio with little memory (a 15-minute podcast is measured in about 2 seconds of CPU time)
- **HTTP API (Standby mode)** for instant measurements from your app or AI agent

### Use cases

- **Music mastering QA**: check LUFS, true peak and clipping before uploading to Spotify, Apple Music, YouTube or a distributor
- **Podcast production**: hit -16 LUFS / -1 dBTP for Apple Podcasts and other apps, and batch-normalize episodes
- **Broadcast delivery**: verify EBU R128 (-23 LUFS) or ATSC A/85 / CALM Act (-24 LKFS) compliance of ads and programmes
- **Video platforms and UGC pipelines**: flag uploads that are too quiet, too loud or clipped, and normalize them automatically
- **Audio dataset curation**: filter or level-match large sets of clips for ML training
- **Ad loudness monitoring**: compare the loudness of commercials and the programme around them

### How to use Audio Loudness Analyzer

#### In Apify Console

1. Click **Try for free** or **Start**.
2. Paste one or more **direct links to audio or video files** into *Audio / video URLs*.
3. Leave the defaults to only analyze. To get corrected files, turn on **Normalize loudness**, pick a **Normalization target** (Streaming -14, Podcast -16, EBU R128 -23, ATSC -24 or Custom) and an **Output format**.
4. Click **Start**. Each file appears in the **Loudness reports** table. Normalized files are listed under **Normalized audio files** and linked in each row (`normalizedFileUrl`).

#### Via the Apify API

```bash
curl -X POST "https://api.apify.com/v2/acts/freecamp008~audio-loudness-analyzer/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaUrls": ["https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac"],
    "normalize": true,
    "targetPreset": "podcast",
    "outputFormat": "mp3"
  }'
```

You can also use the [apify-client](https://docs.apify.com/api/client/js/) for JavaScript or Python and read the results from the run's default dataset.

#### Standby mode (instant HTTP endpoint)

The Actor also runs as a persistent web server, so there is no start-up delay per call. Send the input fields as query parameters (arrays comma-separated) or as a JSON body. The response is `{ "count": n, "items": [...] }`.

```bash
## GET: analyze only
curl "https://freecamp008--audio-loudness-analyzer.apify.actor/?token=YOUR_API_TOKEN&mediaUrls=https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"

## POST: analyze + normalize to EBU R128
curl -X POST "https://freecamp008--audio-loudness-analyzer.apify.actor/?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mediaUrls": ["https://example.com/episode.mp3"], "normalize": true, "targetPreset": "ebu-r128", "outputFormat": "wav"}'
```

**AI agents** can call this Actor and pay per use with **x402** through Apify. No Apify account or subscription is needed: the agent pays for each call.

### Input example

```json
{
  "mediaUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac",
    "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"
  ],
  "normalize": true,
  "targetPreset": "streaming",
  "normalizationMode": "auto",
  "outputFormat": "auto",
  "outputBitrateKbps": 192,
  "includeTimeline": false,
  "silenceThresholdDb": -60,
  "maxDurationMinutes": 180
}
```

| Field | Description | Default |
|---|---|---|
| `mediaUrls` | Direct links to audio/video files | required |
| `normalize` | Also create a loudness-normalized file | `false` |
| `targetPreset` | `streaming` (-14/-1), `apple-music` (-16/-1), `podcast` (-16/-1), `podcast-mono` (-19/-1), `ebu-r128` (-23/-1), `atsc-a85` (-24/-2), `custom` | `streaming` |
| `targetLufs` / `truePeakCeilingDbtp` | Target for `custom` | `-14` / `-1` |
| `normalizationMode` | `auto` (linear when possible, else loudnorm dynamic) or `linear` (never compress) | `auto` |
| `outputFormat` | `auto`, `mp3`, `m4a`, `wav`, `flac`, `opus` | `auto` |
| `outputBitrateKbps` | Bitrate for MP3 / AAC / Opus | `192` |
| `maxFileSizeMB` | Download limit for normalization | `1000` |
| `dualMono` | Measure mono files as dual-mono (+3 LU) | `false` |
| `includeTimeline` / `timelineResolutionSec` | Short-term loudness timeline | `false` / `1` |
| `silenceThresholdDb` | Level below which the start/end counts as silence | `-60` |
| `maxDurationMinutes` | Analyze and bill at most this many minutes per file | `180` |

### Output example

One dataset item per file (platform list shortened):

```json
{
  "mediaUrl": "https://upload.wikimedia.org/wikipedia/commons/1/17/Miss_You_-_PIKASONIC-440600472.mp3",
  "fileName": "Miss_You_-_PIKASONIC-440600472.mp3",
  "durationSec": 235.06,
  "analyzedSec": 235.06,
  "integratedLufs": -10.78,
  "loudnessRangeLu": 7.02,
  "truePeakDbtp": 1.95,
  "samplePeakDbfs": 1.95,
  "momentaryMaxLufs": -6.84,
  "shortTermMaxLufs": -8.42,
  "gatingThresholdLufs": -20.86,
  "lraLowLufs": -15.72,
  "lraHighLufs": -8.7,
  "clippingDetected": true,
  "clipping": { "detected": true, "severity": "minor", "clipEvents": 0, "clippedSamples": 576, "samplesOverFullScale": 574, "clippedPerMille": 0.028, "firstClipTimesSec": [18.07, 32.38, 34.44, 35.41] },
  "leadingSilenceSec": 0.13,
  "trailingSilenceSec": 1.5,
  "entirelySilent": false,
  "summary": "-10.8 LUFS integrated, 2 dBTP true peak, LRA 7 LU. True peak above 0 dBTP (will distort on playback/transcoding). Clipping: minor. Spotify/YouTube-style -14 LUFS normalization changes it by -3.2 dB.",
  "platforms": [
    { "platform": "Spotify", "id": "spotify", "kind": "streaming", "targetLufs": -14, "maxTruePeakDbtp": -1, "loudnessDeltaLu": 3.2, "truePeakOk": false, "estimatedPlaybackGainDb": -3.2, "playsAtLufs": -14, "status": "warn", "notes": "About 3.2 dB louder than the -14 LUFS reference: the platform turns it down by ~3.2 dB. True peak 2 dBTP is above -1 dBTP: risk of distortion after lossy transcoding." },
    { "platform": "Apple Podcasts", "id": "apple-podcasts", "kind": "delivery", "targetLufs": -16, "maxTruePeakDbtp": -1, "loudnessDeltaLu": 5.2, "truePeakOk": false, "toleranceLu": 1, "requiredGainDb": -5.2, "status": "fail", "notes": "Integrated loudness -10.8 LUFS is outside -16 +/- 1 LU (apply -5.2 dB). True peak 2 dBTP exceeds -1 dBTP." }
  ],
  "audio": { "codec": "mp3", "container": "mp3", "sampleRate": 44100, "channels": 2, "channelLayout": "stereo", "bitRateKbps": 128, "hasVideo": false, "measuredAsDualMono": false },
  "perChannel": [
    { "channel": 1, "samplePeakDbfs": 1.71, "truePeakDbtp": 1.89, "rmsDbfs": -14.01, "dcOffsetPercent": -0.007 },
    { "channel": 2, "samplePeakDbfs": 1.95, "truePeakDbtp": 1.95, "rmsDbfs": -13.86, "dcOffsetPercent": -0.002 }
  ],
  "stereoCorrelation": 0.614,
  "truePeakOversampling": 4,
  "normalizedFileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/normalized-66fefb8fb0db8715",
  "normalization": {
    "preset": "podcast",
    "targetLufs": -16,
    "truePeakCeilingDbtp": -1,
    "method": "linear-gain",
    "gainDb": -4.96,
    "reachesTarget": true,
    "outputFormat": "mp3",
    "outputSampleRate": 44100,
    "outputBitrateKbps": 192,
    "outputBytes": 5643824,
    "suggestedFileName": "Miss_You_-_PIKASONIC-440600472-minus16LUFS.mp3",
    "outputIntegratedLufs": -16.04,
    "outputTruePeakDbtp": -3.2,
    "outputLoudnessRangeLu": 6.99,
    "targetErrorLu": -0.04,
    "withinTolerance": true,
    "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/normalized-66fefb8fb0db8715"
  },
  "billedMinutes": 4,
  "billedNormalizedMinutes": 4,
  "processingSec": 15.08,
  "truncated": false,
  "truncatedReason": null
}
```

Platform `status` values: **pass** (on target and peaks OK), **info** (the platform corrects the level itself, for example by turning a loud master down), **warn** (true peak too hot, or the track will play noticeably quieter than other content), **fail** (outside a delivery spec's tolerance: Apple Podcasts, EBU R128, ATSC A/85). With `includeTimeline: true` the item also has `"timeline": [{ "t": 5, "shortTermLufs": -15.4, "momentaryMaxLufs": -11.89 }, ...]`. The normalized file link has no file extension (storage keys can't contain one), so use `normalization.suggestedFileName` when saving it. If `loudnorm` can't reach an extreme target (for example -9 LUFS on speech with a -1 dBTP ceiling), the item shows the real result in `outputIntegratedLufs` and `targetErrorLu`, with `reachesTarget: false`. Files that can't be downloaded or decoded return `{ "mediaUrl", "error", "isError": true }` and are free.

### Pricing

This Actor uses **pay-per-event** pricing:

| Event | Price | Per 1,000 |
|---|---|---|
| `file-analyzed`: one file measured (full report + platform compliance) | $0.002 | **$2 per 1,000 files** |
| `audio-minute`: one started minute of audio analyzed (rounded up per file) | $0.002 | **$2 per 1,000 minutes** |
| `normalized-minute`: one started minute of normalized audio delivered (only with *Normalize loudness*) | $0.002 | **$2 per 1,000 minutes** |

Examples: checking a 3.5-minute song costs $0.002 + 4 × $0.002 = **$0.010**. Normalizing a 45-minute podcast episode costs $0.002 + 45 × $0.002 + 45 × $0.002 = **$0.182**.

Failed downloads and unreadable files are not charged. If normalization fails (for example on a silent file), you pay only for the analysis. Apify platform usage (compute units) is billed separately, according to the memory you choose and how long the run takes.

### FAQ

**How accurate are the measurements?**
The meter implements ITU-R BS.1770-4 and EBU Tech 3341/3342 (K-weighting coefficients computed for the file's own sample rate, absolute -70 LUFS and relative -10 LU gating, LRA with -20 LU relative gate and the 10th to 95th percentile). On our test set (rock and synthwave masters, a clipped master, a 15-minute podcast, a 5.1 mix, speech, a video soundtrack) integrated loudness matched ffmpeg's `ebur128` filter within 0.05 LU, and LRA within 0.1 LU on files longer than about 30 seconds (short clips can differ by up to about 0.3 LU because of percentile rounding). True peak uses 4x polyphase oversampling and matched the analytic value of a test tone within 0.06 dB. Different meters can differ by about 0.1 to 0.3 dB in true peak.

**Which normalization method is used?**
In *Auto* mode the Actor first checks whether a plain gain change reaches the target without pushing the true peak over the ceiling. If it does, only gain is applied, so the sound is unchanged, and the result is checked and fine-tuned to within 0.1 LU. If the peaks don't allow it (for example a quiet but peaky recording that should become louder), ffmpeg's `loudnorm` filter runs in two passes with gentle dynamic processing and true-peak limiting. *Linear only* mode never compresses: it applies the largest gain that keeps the peaks under the ceiling and tells you the target was not reached (`reachesTarget: false`). For MP3, AAC and Opus outputs the Actor keeps 0.5 dB extra true-peak headroom, because lossy encoding creates new inter-sample peaks.

**How fast is it, and are there limits?**
Analysis streams the file and is very fast (minutes of audio per second of CPU). Linear normalization is also fast. The `loudnorm` path processes at 192 kHz internally and runs at roughly 5 to 10 times real time per core (two passes), so a one-hour file takes about 6 to 12 minutes. Each file is capped at `maxDurationMinutes` (default 180, up to 600). Normalization downloads the file first (default limit 1,000 MB). For files over an hour with normalization, use 2 GB of memory or more.

**Which formats are supported?**
Anything ffmpeg can read over HTTP(S): MP3, WAV, AIFF, FLAC, ALAC, M4A/AAC, OGG/Vorbis, Opus, WMA, AC-3, and video containers such as MP4, MOV, MKV, WEBM and AVI (first audio track). Mono, stereo, 5.1 and 7.1 are supported. Links to web pages, YouTube or Spotify don't work: you need a direct link to the media file.

**Why can Spotify or YouTube numbers differ from what I see in their apps?**
The platform figures are estimates based on each service's published reference level (Spotify -14 LUFS, YouTube -14, Apple Music -16, Amazon -14, Tidal -14, Deezer -15). Services change their policies, sometimes use album-level normalization, and measure their own transcoded files. YouTube, Amazon, Tidal and Deezer are modeled as turning loud content down only. Spotify and Apple Music are modeled as also boosting quiet tracks, but only as far as the peaks allow.

**Is my audio private?**
Yes. All processing happens inside the Actor container with ffmpeg and our own JavaScript meter. Nothing is sent to a third-party API. Normalized files are stored only in your own Apify key-value store.

**Is it legal to analyze and normalize audio?**
Measuring loudness is fine for any file you can access. Creating normalized copies means making a derivative copy of the audio, so only process files that you own, have permission to modify, or that are public domain or openly licensed. You are responsible for the media you submit.

**Which software and licenses are used?**
ffmpeg 5.1 from Debian (run as a separate program, not linked into the Actor; LGPL/GPL) for decoding, `loudnorm` and encoding. The BS.1770 meter, true-peak oversampler and compliance logic are our own code. No models or third-party APIs are involved.

# Actor input Schema

## `mediaUrls` (type: `array`):

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.

## `normalize` (type: `boolean`):

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.

## `targetPreset` (type: `string`):

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.

## `targetLufs` (type: `number`):

Integrated loudness target, used only when <i>Normalization target</i> is <b>Custom</b>.

## `truePeakCeilingDbtp` (type: `number`):

Maximum true peak of the normalized file, used only when <i>Normalization target</i> is <b>Custom</b>.

## `normalizationMode` (type: `string`):

<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.

## `outputFormat` (type: `string`):

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.

## `outputBitrateKbps` (type: `integer`):

Bitrate of lossy output formats. Ignored for WAV and FLAC.

## `maxFileSizeMB` (type: `integer`):

Normalization downloads the file first (it needs two passes). Larger files are rejected. Analysis-only runs stream the file and have no size limit.

## `dualMono` (type: `boolean`):

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.

## `includeTimeline` (type: `boolean`):

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.

## `timelineResolutionSec` (type: `number`):

Interval between timeline points. Automatically coarsened for very long files (max ~5,000 points).

## `silenceThresholdDb` (type: `number`):

Samples below this peak level count as silence when measuring silence at the start and end of the file.

## `maxDurationMinutes` (type: `integer`):

Only the first N minutes of each file are analyzed (and billed). Longer files are marked <code>truncated: true</code>.

## Actor input object example

```json
{
  "mediaUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac"
  ],
  "normalize": false,
  "targetPreset": "streaming",
  "targetLufs": -14,
  "truePeakCeilingDbtp": -1,
  "normalizationMode": "auto",
  "outputFormat": "auto",
  "outputBitrateKbps": 192,
  "maxFileSizeMB": 1000,
  "dualMono": false,
  "includeTimeline": false,
  "timelineResolutionSec": 1,
  "silenceThresholdDb": -60,
  "maxDurationMinutes": 180
}
```

# Actor output Schema

## `loudnessReports` (type: `string`):

No description

## `normalizedFiles` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mediaUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac",
        "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("freecamp008/audio-loudness-analyzer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "mediaUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac",
        "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("freecamp008/audio-loudness-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mediaUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/a/ab/Alexi_Action_-_I_Am_Robot_%28dark_synthwave%29.flac",
    "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"
  ]
}' |
apify call freecamp008/audio-loudness-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,freecamp008/audio-loudness-analyzer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Gep3mrnkomORAHVD8/builds/wiMsGxPEcD81AC0QQ/openapi.json
