{
  "openapi": "3.0.1",
  "info": {
    "title": "XML to CSV and Excel Converter",
    "description": "Flatten XML text, uploaded files, and public XML URLs into CSV- and Excel-ready rows with record selection, namespaces, attributes, nested fields, columns, and parse errors.",
    "version": "0.1",
    "x-build-id": "v7fUI0GeWFnWRLvj5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~xml-to-csv-excel-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-xml-to-csv-excel-converter",
        "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/automation-lab~xml-to-csv-excel-converter/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-xml-to-csv-excel-converter",
        "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/automation-lab~xml-to-csv-excel-converter/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-xml-to-csv-excel-converter",
        "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",
        "properties": {
          "xmlText": {
            "title": "XML text",
            "type": "string",
            "description": "Paste one XML document. Use Sources for multiple inline documents."
          },
          "xmlFile": {
            "title": "Upload an XML file",
            "type": "string",
            "description": "Upload an XML file or provide its public URL. Files are limited to 20 MB."
          },
          "xmlUrls": {
            "title": "Public XML URLs",
            "type": "array",
            "description": "Public HTTP or HTTPS URLs of XML files to convert in one run.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sources": {
            "title": "Batch sources",
            "type": "array",
            "description": "Optional mixed batch. Each object needs exactly one of xml or url; name is used in output metadata.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Source name",
                  "description": "Label included with every output row from this source.",
                  "type": "string",
                  "editor": "textfield"
                },
                "xml": {
                  "title": "XML text",
                  "description": "Inline XML document; do not also set url on this source.",
                  "type": "string",
                  "editor": "textarea"
                },
                "url": {
                  "title": "XML URL",
                  "description": "Public XML file URL; do not also set xml on this source.",
                  "type": "string",
                  "editor": "textfield"
                }
              },
              "required": []
            },
            "default": []
          },
          "recordPath": {
            "title": "Record node path",
            "type": "string",
            "description": "Optional dot or slash path to each row, for example catalog.book or orders/order. Leave blank to select the first repeated object node automatically."
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum successful rows across all XML sources. Error rows do not count toward this limit.",
            "default": 1000
          },
          "removeNamespaces": {
            "title": "Remove namespace prefixes",
            "type": "boolean",
            "description": "Turn names such as ns:order into order so record paths and column names are easier to use.",
            "default": true
          },
          "includeAttributes": {
            "title": "Include XML attributes",
            "type": "boolean",
            "description": "Include attributes as columns using the configured attribute prefix.",
            "default": true
          },
          "attributePrefix": {
            "title": "Attribute prefix",
            "minLength": 1,
            "maxLength": 10,
            "type": "string",
            "description": "Prefix for attribute columns, for example @ turns id=\"42\" into @id.",
            "default": "@"
          },
          "nestedSeparator": {
            "title": "Nested field separator",
            "minLength": 1,
            "maxLength": 10,
            "type": "string",
            "description": "Separator used in flattened columns such as customer.name.",
            "default": "."
          },
          "arraySeparator": {
            "title": "Array value separator",
            "minLength": 1,
            "maxLength": 20,
            "type": "string",
            "description": "Separator used when one XML field contains several scalar values.",
            "default": " | "
          },
          "columns": {
            "title": "Columns to keep",
            "type": "array",
            "description": "Optional ordered list of flattened column names. Missing values become null; omit this list to keep every detected column.",
            "items": {
              "type": "string"
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}