VOOZH about

URL: https://apify.com/moving_beacon-owner1/my-actor-63

โ‡ฑ Universal Data Structure Converter ยท Apify


๐Ÿ‘ Universal Data Structure Converter avatar

Universal Data Structure Converter

Pricing

from $10.00 / 1,000 results

Go to Apify Store

Universal Data Structure Converter

A production-grade Apify actor that converts between HTML, XML, CSV, YAML, and JSON formats. Supports 9+ conversion types with smart auto-detection, nested JSON flattening, HTML table scraping, batch URL processing, and full customization.

Pricing

from $10.00 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Jamshaid Arif

Jamshaid Arif

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Share

๐Ÿ”„ Universal Data Structure Converter โ€” Apify Actor

A production-grade Apify actor that converts between HTML, XML, CSV, YAML, and JSON formats. Supports 9+ conversion types with smart auto-detection, nested JSON flattening, HTML table scraping, batch URL processing, and full customization.

๐ŸŒ Supported Conversions

#ConversionDescription
1HTML โ†’ JSONParse DOM tree or extract <table> data
2XML โ†’ JSONFull tree with attributes & namespaces
3CSV โ†’ JSONWith auto type-casting (int/float/bool)
4YAML โ†’ JSONSingle or multi-document streams
5JSON โ†’ XMLCustom root/item tags, XML declaration
6JSON โ†’ CSVNested object flattening to dot-columns
7JSON โ†’ YAMLBlock or flow style output
8YAML โ†’ XMLChained (YAML โ†’ JSON โ†’ XML)
9CSV โ†’ XMLChained (CSV โ†’ JSON โ†’ XML)

โœจ Key Features

  • Auto-Detection โ€” Set conversion to auto and the actor detects whether input is HTML, XML, JSON, YAML, or CSV
  • URL Fetching โ€” Provide a list of URLs to fetch and convert in batch
  • HTML Table Scraping โ€” Extract <table> elements directly into structured JSON arrays
  • Smart Type-Casting โ€” CSV values like "30", "true", "99.5" auto-cast to int, bool, float
  • Nested Flattening โ€” {"a": {"b": 1}} becomes CSV column a.b when exporting JSON โ†’ CSV
  • Proxy Support โ€” Use Apify Proxy for fetching URLs behind firewalls
  • Custom Delimiters โ€” Comma, tab, semicolon, pipe for CSV input/output
  • Pretty-Print or Minify โ€” Configurable indentation or compact output

๐Ÿ“‹ Input Schema

ParameterTypeDefaultDescription
conversionTypestringautoConversion to perform (or auto to detect)
outputFormatstringjsonTarget format when using auto-detect
inputDatastring(sample)Raw data to convert (paste directly)
sourceUrlsarray[]URLs to fetch and convert in batch
csvDelimiterstring,CSV column separator
csvHasHeaderbooleantrueTreat first CSV row as column names
typeCastbooleantrueAuto-cast CSV strings to native types
flattenNestedbooleantrueFlatten nested JSON for CSV export
flattenSeparatorstring.Separator for flattened key names
xmlRootTagstringrootRoot element name for XML output
xmlListItemTagstringitemTag for array items in XML output
xmlDeclarationbooleantrueInclude XML <?xml?> header
xmlStripNamespacesbooleantrueRemove namespace prefixes from XML tags
htmlExtractTablesbooleanfalseExtract only <table> elements from HTML
htmlParserstringlxmlBeautifulSoup parser engine
yamlMultiDocbooleanfalseParse multi-document YAML streams
indentinteger2Spaces for pretty-printing (0-8)
minifybooleanfalseCompact output (overrides indent)
outputAsStringbooleanfalseStore result as raw string instead of parsed JSON
proxyConfigurationobjectdisabledProxy settings for URL fetching

๐Ÿš€ Usage Examples

Example 1: Convert CSV โ†’ JSON (default)

Just run the actor with defaults โ€” it ships with sample CSV data and auto-detects the conversion:

{
"conversionType":"auto",
"outputFormat":"json"
}

Example 2: HTML Table Scraping

{
"conversionType":"html2json",
"inputData":"<table><tr><th>Name</th><th>Age</th></tr><tr><td>Alice</td><td>30</td></tr></table>",
"htmlExtractTables":true
}

Example 3: Batch URL Processing

{
"conversionType":"auto",
"outputFormat":"json",
"sourceUrls":[
{"url":"https://example.com/data.csv"},
{"url":"https://api.example.com/config.yaml"}
]
}

Example 4: JSON โ†’ CSV with Flattening

{
"conversionType":"json2csv",
"inputData":"[{\"id\":1,\"name\":\"Alice\",\"address\":{\"city\":\"NYC\",\"zip\":\"10001\"}}]",
"flattenNested":true,
"flattenSeparator":"."
}

Example 5: XML โ†’ JSON (Strip Namespaces)

{
"conversionType":"xml2json",
"inputData":"<?xml version='1.0'?><catalog><book id='1'><title>Hello</title></book></catalog>",
"xmlStripNamespaces":true
}

๐Ÿ“ค Output Format

Each converted item is stored in the dataset with this structure:

{
"source":"inline_input",
"conversion":"csv2json",
"inputFormat":"csv",
"outputFormat":"json",
"timestamp":"2026-04-01T17:30:00.000Z",
"status":"success",
"error":null,
"data":[ ... ]
}
  • data โ€” Parsed result (for JSON outputs)
  • rawOutput โ€” Raw string result (for XML/CSV/YAML outputs, or when outputAsString is true)
  • status โ€” "success" or "failed"
  • error โ€” Error message if conversion failed

Run statistics are stored in the Key-Value Store under the key RUN_STATS.

๐Ÿ›  Local Development

# Clone and install
cd apify-data-converter
pip install-r requirements.txt
# Run locally with Apify CLI
apify run --input-file=input.json

๐Ÿ“ฆ Dependencies

  • apify โ€” Apify SDK for Python
  • httpx โ€” Async HTTP client for URL fetching
  • pyyaml โ€” YAML parsing and serialization
  • beautifulsoup4 + lxml โ€” HTML parsing
  • html5lib โ€” Lenient HTML parser for broken markup

You might also like

Text-to-JSON Structured Extractor

moving_beacon-owner1/my-actor-68

A versatile Apify actor that converts unstructured text and HTML into clean, structured JSON. Supports four extraction modes with auto-detection, URL fetching, and batch processing.

2

Data Converter โ€” JSON, CSV & XML

accurate_pouch/data-converter

Convert between JSON, CSV, and XML formats in bulk. JSON to CSV, CSV to JSON, JSON to XML, XML to JSON. Handles quoted fields, nested objects. $0.003/conversion.

๐Ÿ‘ User avatar

Manchitt Sanan

2

YAML to JSON Converter

eloquent_mountain/yaml-to-json-converter

YAML to JSON Converter Seamlessly transform YAML files into JSON format using this Apify actor. Ideal for handling intricate YAML structures, it accepts inputs via URL or direct text paste. Perfect for developers and data analysts looking to integrate YAML data into JSON-based applications.

JSON To YAML Converter

zsoftware/json-to-yaml-converter

JSON to YAML Converter: This Apify Actor takes a JSON file or raw string input, transforms it into a validated YAML document, and outputs a downloadable output.yaml file. Lightweight, fast, and easy to integrate into any workflow.

Code Converter Toolkit

moving_beacon-owner1/my-actor-64

A universal code conversion actor that transforms between 6 popular code formats in a single run. Supports both single and batch conversions with structured JSON output.

2

HTML Table Extractor

automation-lab/html-table-extractor

Extract HTML tables from any webpage into structured JSON. Supports multiple URLs, filtering by CSS selector or table index, auto-header detection, and nested tables. Pure HTTP โ€” no proxy needed.

๐Ÿ‘ User avatar

Stas Persiianenko

20

Data Format Converter - CSV, JSON, XML Transformation

ntriqpro/data-format-converter

Convert data between common formats: CSV, JSON, and XML. Bulk transform files without manual work.

XML to JSON Converter

eloquent_mountain/xml-to-json-converter

XML to JSON Converter Convert any XML file to JSON effortlessly with this Apify actor. Handle complex XML structures and transform them into structured JSON data. Supports input via URL or direct text paste, making it easy to integrate into your data processing workflows.

HTML to JSON Smart Parser

parseforge/html-to-json-smart-parser

Convert HTML to structured JSON using AI! Uses OpenAI to extract and structure data from HTML into clean JSON format. Perfect for developers and data analysts who need to transform HTML into structured data without manual parsing.

40

5.0

YAML Validator & Converter

automation-lab/yaml-validator

Validate YAML, JSON, and TOML syntax. Convert between formats. Detect errors with exact line numbers. Bulk-process documents or URLs. Zero proxy, 95%+ margin.

๐Ÿ‘ User avatar

Stas Persiianenko

2