XML to JSON API

Convert XML and RSS feeds to JSON instantly. Simple API for XML data transformation.

Overview

API Plugin's XML to JSON API provides a simple way to convert XML data and RSS feeds into JSON format. Perfect for modernizing legacy systems, consuming RSS feeds, or simplifying XML data processing.

Key benefits include:

  • Convert XML URLs to JSON
  • Transform XML data to JSON
  • RSS feed conversion
  • Fast processing
  • Clean JSON output
  • Simple integration
  • Reliable conversion

Available Endpoints

  1. Convert XML URL to JSON
GET /v1/{appId}/{token}

Required Parameters:

  • url: URL of the XML or RSS feed

Example Request:

GET /v1/{appId}/{token}?url=https://example.com/feed.xml

Example Response:

{
    "success": true,
    "data": {
        "rss": {
            "channel": {
                "title": "Example Feed",
                "description": "This is an example RSS feed",
                "items": [
                    {
                        "title": "First Post",
                        "link": "https://example.com/post1",
                        "description": "Content of the first post"
                    }
                ]
            }
        }
    }
}
  1. Convert XML Data to JSON
POST /v1/{appId}/{token}/data2json

Request Body: Raw XML data

Example Request:

POST /v1/{appId}/{token}/data2json
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <user>
        <name>John Doe</name>
        <email>john@example.com</email>
    </user>
</root>

Example Response:

{
    "success": true,
    "data": {
        "root": {
            "user": {
                "name": "John Doe",
                "email": "john@example.com"
            }
        }
    }
}

Common Scenarios

  1. RSS Feed Processing
// Convert RSS feed to JSON
const response = await fetch('/v1/{appId}/{token}?url=https://blog.example.com/feed.xml');
const data = await response.json();
// Process feed items
const items = data.rss.channel.items;
  1. XML Data Conversion
// Convert XML data to JSON
const response = await fetch('/v1/{appId}/{token}/data2json', {
    method: 'POST',
    body: xmlData,
    headers: {
        'Content-Type': 'text/xml',
    },
});
const jsonData = await response.json();