{
  "openapi": "3.0.1",
  "info": {
    "title": "Universal Data Structure Converter",
    "description": "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.",
    "version": "0.0",
    "x-build-id": "yyQBXmnvzYCFbrEll"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~my-actor-63/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-my-actor-63",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/moving_beacon-owner1~my-actor-63/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-my-actor-63",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/moving_beacon-owner1~my-actor-63/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-my-actor-63",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "conversionType"
        ],
        "properties": {
          "conversionType": {
            "title": "Conversion Type",
            "enum": [
              "auto",
              "html2json",
              "xml2json",
              "csv2json",
              "yaml2json",
              "json2xml",
              "json2csv",
              "json2yaml",
              "yaml2xml",
              "csv2xml"
            ],
            "type": "string",
            "description": "The source→target format conversion to perform. Use 'auto' to auto-detect input format (output inferred from outputFormat).",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Output Format (for Auto-Detect)",
            "enum": [
              "json",
              "xml",
              "csv",
              "yaml"
            ],
            "type": "string",
            "description": "When conversionType is 'auto', specify the desired output format. Ignored if a specific conversion is chosen.",
            "default": "json"
          },
          "inputData": {
            "title": "Input Data",
            "type": "string",
            "description": "Paste raw data here (HTML, XML, CSV, YAML, or JSON). Leave empty if using sourceUrls to fetch data from URLs instead.",
            "default": "name,age,city,role,salary\nAlice Johnson,30,New York,Engineer,125000.50\nBob Smith,25,London,Designer,98000.00\nCharlie Chen,35,Tokyo,Manager,135000.75\nDiana Patel,28,Berlin,Analyst,92000.00\nEthan Williams,32,Sydney,Developer,110000.25"
          },
          "sourceUrls": {
            "title": "Source URLs",
            "type": "array",
            "description": "List of URLs to fetch data from. Each URL is fetched, converted, and stored as a separate result. Leave empty if pasting data directly in inputData.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "csvDelimiter": {
            "title": "CSV Delimiter",
            "enum": [
              ",",
              "\t",
              ";",
              "|"
            ],
            "type": "string",
            "description": "Column separator for CSV input/output. Common: ',' (comma), '\\t' (tab), ';' (semicolon), '|' (pipe).",
            "default": ","
          },
          "csvHasHeader": {
            "title": "CSV Has Header Row",
            "type": "boolean",
            "description": "If enabled, the first row of CSV data is treated as column names. If disabled, data is returned as arrays of arrays.",
            "default": true
          },
          "typeCast": {
            "title": "Auto Type-Cast CSV Values",
            "type": "boolean",
            "description": "Automatically convert CSV string values to appropriate types: numbers become int/float, 'true'/'false' become booleans, 'null'/'none' become null.",
            "default": true
          },
          "flattenNested": {
            "title": "Flatten Nested JSON for CSV",
            "type": "boolean",
            "description": "When converting JSON → CSV, flatten nested objects into dot-separated column names. e.g., {\"address\": {\"city\": \"NYC\"}} becomes column 'address.city'.",
            "default": true
          },
          "flattenSeparator": {
            "title": "Flatten Key Separator",
            "type": "string",
            "description": "Character(s) used to join nested key names when flattening. e.g., '.' gives 'parent.child', '_' gives 'parent_child'.",
            "default": "."
          },
          "xmlRootTag": {
            "title": "XML Root Tag",
            "type": "string",
            "description": "Name for the root XML element when converting to XML format.",
            "default": "root"
          },
          "xmlListItemTag": {
            "title": "XML List Item Tag",
            "type": "string",
            "description": "Tag name used to wrap each array item when converting JSON arrays to XML.",
            "default": "item"
          },
          "xmlDeclaration": {
            "title": "Include XML Declaration",
            "type": "boolean",
            "description": "Add <?xml version='1.0' encoding='utf-8'?> header to XML output.",
            "default": true
          },
          "xmlStripNamespaces": {
            "title": "Strip XML Namespaces",
            "type": "boolean",
            "description": "Remove namespace prefixes from XML tag names when converting XML → JSON for cleaner output.",
            "default": true
          },
          "htmlExtractTables": {
            "title": "HTML Table Extraction Mode",
            "type": "boolean",
            "description": "Instead of parsing the full DOM tree, extract only <table> elements into structured JSON arrays. Ideal for scraping tabular data from web pages.",
            "default": false
          },
          "htmlParser": {
            "title": "HTML Parser Engine",
            "enum": [
              "lxml",
              "html.parser",
              "html5lib"
            ],
            "type": "string",
            "description": "BeautifulSoup parser backend. 'lxml' is fastest, 'html.parser' needs no extra deps, 'html5lib' handles broken HTML best.",
            "default": "lxml"
          },
          "yamlMultiDoc": {
            "title": "YAML Multi-Document Mode",
            "type": "boolean",
            "description": "Parse all documents in a multi-document YAML stream (separated by ---). Returns a JSON array of documents.",
            "default": false
          },
          "indent": {
            "title": "Output Indentation",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of spaces for pretty-printing JSON/XML/YAML output. Set to 0 for compact output.",
            "default": 2
          },
          "minify": {
            "title": "Minify Output",
            "type": "boolean",
            "description": "Produce compact output with no indentation or extra whitespace. Overrides the indent setting.",
            "default": false
          },
          "outputAsString": {
            "title": "Output as Raw String",
            "type": "boolean",
            "description": "Store the converted result as a single raw string field instead of parsed objects. Useful for XML, CSV, and YAML outputs that aren't natively JSON.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for fetching source URLs. Leave empty for direct connections.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}