How 30-Second Song Previews Work on Chartwave

Every play button on Chartwave plays a short clip supplied by Apple. This guide explains what that clip is and why we handle it the way we do.

What a preview is

Apple's Search API documentation defines previewUrl as a URL referencing the 30-second preview file for the content, returned when the media type is a track. Apple's public top songs feeds also include a preview link in each entry. Those are the only audio files Chartwave plays.

Why the audio streams from Apple

Apple's documentation says developers may use promotional content such as previews of songs and album art only to promote store content and not for entertainment purposes. We take that seriously. Previews are streamed straight from Apple's servers into a single audio player on the page; we never download, copy or re-host the audio, and every preview ends with a link to the full song on Apple Music.

Only one preview plays at a time. Starting another track stops the first, so the page never turns into a jukebox.

Being a polite API user

Apple states that the Search API is limited to approximately 20 calls per minute, subject to change, and suggests that large websites cache search and lookup requests. Chartwave fetches chart data when the site is built and saves a snapshot, and looks up up to 150 songs per request, so a full refresh takes only a handful of calls. Your browser talks to Apple only when you press play or run a live search.

Hearing the whole song

When a clip finishes, a panel appears with a link to the track on Apple Music and a second link to a song.link page, which lists the same recording on other services. Both links open in a new tab and nothing plays automatically. The panel can be closed with its close button or the Escape key.

If a preview fails to load, for example because a track was withdrawn from the store after our last update, the panel still appears with the full-song links so you are not left with a dead button.

Drafted with AI assistance by the Chartwave desk under the pen name Riley Navarro, then checked against the sources listed on this page.

Sources

  1. Apple — iTunes Search API (Performance Partners) — opened 2026-11-20
  2. Apple Developer — iTunes Search API documentation — opened 2026-11-20
  3. Apple — iTunes top songs public feed (US) — opened 2026-11-20

More guides