What is the best approach for requesting JSON instead of XML from an API?
Use the Accept header.
Use the Content-Type header.
APIs do not use XML.
Add .json to the URL.