How to Handle Missing Audio Features in MeloData

Before using audio features to sort a playlist, decide what should happen when a track has no value for the field you are sorting on.

MeloData reports missing audio features as null. Treating that as zero can send unknown tracks to one end of a ranking and make the result look more certain than the data supports.

Keep unavailable values separate. If tempo is required, omit tracks without a finite tempo from that calculation or show that the value is missing. If valence is optional, use the available features and leave valence out when it's null.

Check the response source as well. Archive data and live preview analysis have different field coverage. A value derived from an audio preview describes that preview, which may differ from the full track.

An uncached track may first return HTTP 202. Follow Retry-After, use a bounded retry loop, and handle a later metadata-only or unavailable result. A loading indicator should not depend on every track eventually receiving every feature.

The current MeloData documentation describes these states. Start there when deciding which fields your integration can require.

Keep missing values out of a tempo calculation

For a completed response with a features object, check for a finite numeric BPM before using it. This JavaScript example keeps missing or invalid values as null:

function bpmForRanking(data) {
  const bpm = data?.features?.bpm;
  return typeof bpm === "number" && Number.isFinite(bpm)
    ? bpm
    : null;
}

Don't use Number(value) for this check. In JavaScript, Number(null) is zero. That conversion loses the distinction between a missing measurement and a numeric result.

Check the response state first

The feature endpoint is GET /api/v1/tracks/{isrc}/features. Use this order when handling its response:

  1. If the HTTP status is 202, respect Retry-After and apply your retry limit. There isn't a completed feature record yet.
  2. Handle HTTP errors separately from successful data responses.
  3. For a successful response, check data.status for partial or unavailable before treating it as a completed analysis.
  4. For a completed analysis, inspect data.source and the individual feature values. Partial and unavailable responses don't include the same fields as a completed record.

A partial result may still contain a catalog BPM, but it isn't a full audio analysis. Decide whether that source is appropriate for your feature before mixing it with measured values.

Live analysis uses an audio preview, so a measurement may describe a different section from the one your listener hears. The MeloData documentation explains source-specific coverage and the preview-window limits.

More MeloData Posts

More posts

MeloData Now Has 1.85 Million Tracks Ready
MeloData now includes the full AcousticBrainz archive, about 1.85 million tracks. What changed, which fields are null, and where key comes from on archive rows.
October 1, 2026
Fill a PDF Form in n8n with FormRail
An importable n8n workflow that handles binary PDF bytes, JSON requests, file responses and stable retry keys.
September 13, 2026
Detect a Website's Booking and Payment Tools with an API
Use Voltenworks Lookup to inspect public software signals, read their supporting evidence, and handle incomplete results.
September 10, 2026