MP3Tunes search interface:

Search results include playable URLs:

Results are available in JSON:

Combine that with JSPF:

And you get a local content resolver in pure AJAX using odds and ends that are already available:
1) Get an XSPF file with metadata fields filled in
2) Parse it using JSPF
3) For each track with metadata, call mp3tunes search API
4) For each search result with a playable URL, fill in the corresponding track location in the parsed XSPF
5) Activate an in-page player which can read an auto-generated playlist