Title: Rest API XML Output?
Last modified: August 20, 2018

---

# Rest API XML Output?

 *  [nando99](https://wordpress.org/support/users/nando99/)
 * (@nando99)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/rest-api-xml-output/)
 * Is there a way to get the the exact same information from rest api endpoints 
   in XML?
 * Example: `https://demo.wp-api.org/wp-json/wp/v2/posts`
 * I’m not looking for an RSS of latest posts, I want to use the rest api and customize
   what I pull as needed like I would using: `https://demo.wp-api.org/wp-jsonwp/
   v2/posts?_embed=1&tags=XXX` I just need it in XML…
 * Is that possible or will I have to use a json to xml proxy script?

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/rest-api-xml-output/#post-10607904)
 * You would need a conversion somewhere no matter what. The API only speaks JSON
   by default. Similar to my suggestion in your other topic, you could create a 
   custom route/endpoint that responds in XML.
 * I’m not sure what’s all involved, but it might be possible to make custom RSS
   templates/code that accept additional arguments and reply with appropriate XML
   content. The advantage here would be RSS already speaks XML, but since you have
   to customize a response anyway, I don’t see a big advantage over custom REST 
   routes.

Viewing 1 replies (of 1 total)

 The topic ‘Rest API XML Output?’ is closed to new replies.

## Tags

 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/rest-api-xml-output/#post-10607904)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
