A server-side XML api would be ideal; javascript loads on every page and would add significant latency to page loads, which is unacceptable (and wasteful, and tough on your servers). Find someone who can code a Drupal and a Wordpress module and you're pretty much set.
The only question with an XML api is how do you benefit from it?
The only question with an XML api is how do you benefit from it?