Skip to content

Download audio from any webpage using Open Graph metadata

License

Notifications You must be signed in to change notification settings

paultendo/og-audio-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

og-audio-dl

Download audio from any webpage using Open Graph metadata.

Websites publish og:audio meta tags to tell search engines and social media platforms where their audio files live. This tool reads those publicly available tags and gives you a direct link to the audio.

No scraping. No authentication bypass. No DRM circumvention. No audio ever touches our server. Just reading the metadata that sites already serve to every visitor.


How it works

The Open Graph protocol defines standard HTML meta tags that websites use to describe their content. When a page includes an audio file, it can declare it like this:

<meta property="og:audio" content="https://cdn.example.com/track.mp3">

This tool fetches the page, reads that tag (or twitter:player:stream as a fallback), and returns the audio URL. That's it.

Supported tags

Checked in order of priority:

Tag Protocol
og:audio Open Graph
og:audio:url Open Graph
og:audio:secure_url Open Graph
twitter:player:stream Twitter Cards

Web app

The web app runs as a Cloudflare Worker - no server to maintain, globally distributed, free tier.

Features:

  • Single or batch URL lookup (one per line)
  • Paste a Suno playlist URL to load all tracks at once
  • Editable filename before download
  • Metadata sidecar button - save lyrics, style prompt and tags as a .txt file
  • Audio preview player
  • Recent history (stored locally in your browser)
  • Installable as a PWA (Add to Home Screen)
  • WCAG 2.2 AA accessible
  • Rate limited (15 requests/min per IP)
  • Enhanced for Suno - artist, lyrics, style prompt, genre, year, cover art and model version embedded as ID3 tags in downloaded MP3s

API

Get audio info:

GET /api/info?url=https://example.com/some-song-page

Returns JSON:

{
  "audioUrl": "https://cdn.example.com/track.mp3",
  "title": "Artist - Track Name",
  "artist": "Artist",
  "filename": "Artist - Track Name.mp3",
  "image": "https://cdn.example.com/artwork.jpg",
  "lyrics": "Verse 1\n...",
  "styleTags": "uk trap, grime, aggressive",
  "displayTags": "UK trap, London rap",
  "year": "2025",
  "durationMs": 187000,
  "model": "v5",
  "sourceTag": "og:audio",
  "pageUrl": "https://example.com/some-song-page"
}

Downloads happen client-side - your browser fetches the audio directly from the source. No audio data ever passes through the server.

CLI

There's also a standalone bash script that does the same thing from your terminal.

# Single URL
./og-audio-dl.sh https://example.com/some-song-page

# Save to a specific directory
./og-audio-dl.sh https://example.com/some-song-page ./my-music

# Batch mode - one URL per line
./og-audio-dl.sh --batch urls.txt ./my-music

Requirements: curl and grep (both pre-installed on macOS and most Linux distros).

Deploy your own

# Clone the repo
git clone https://github.com/paultendo/og-audio-dl.git
cd og-audio-dl

# Install dependencies
npm install

# Set your Cloudflare account ID in wrangler.toml
# Then deploy
CLOUDFLARE_API_TOKEN=your_token npx wrangler deploy

Disclaimer

This tool reads publicly available Open Graph metadata that websites voluntarily publish in their HTML. No audio files are downloaded, stored, cached, or proxied by the server - all audio downloads occur directly between your browser and the original source. It does not circumvent any technical protection measures, authentication systems, or access controls. Users are solely responsible for ensuring their use complies with applicable laws and third-party terms of service.

See the full terms of use on the live site.

Licence

Apache 2.0 - free to use, adapt, and self-host. Attribution required in derivative works.

If you build something with this, I'd love to hear about it - drop me a message on Buy Me a Coffee or open an issue.

If this is useful, consider sponsoring on GitHub.

Made by paultendo.

About

Download audio from any webpage using Open Graph metadata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors