Custom feed parameters / Template overriding

Do I understand right that you need to pull information from WP in JavaScript code?

In that case it would be appropriate to use WP’s Ajax handler. See AJAX in Plugins in Codex.

If native feeds are very close to what you need another option is to register custom feed with add_feed() and use it with customized template or one of native feed template with tweaks.