{
  "openapi": "3.0.1",
  "info": {
    "title": "XML to JSON and CSV Converter: Files, Feeds, Datasets",
    "description": "Convert XML files, feeds or pasted XML to JSON and CSV. One dataset row per record via a record path, attributes, namespaces, force-list and flatten-to-dot-keys for CSV. Safe parsing (no external entities). Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "rpHs4Mq9TarhYJoAL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~xml-to-json/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-xml-to-json",
        "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/ucchiii~xml-to-json/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-xml-to-json",
        "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/ucchiii~xml-to-json/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-xml-to-json",
        "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": {
          "xml": {
            "title": "XML text",
            "type": "string",
            "description": "Paste XML here (up to 10 MB). Leave this and the file URLs empty for a free demo with a built-in sample."
          },
          "fileUrls": {
            "title": "Or XML file URLs",
            "type": "array",
            "description": "Public http(s) links to XML files or feeds (.xml, RSS, Atom, product feeds), up to 10 MB each and 100 per run. Each file counts as one document.",
            "items": {
              "type": "string"
            }
          },
          "recordPath": {
            "title": "Record path (one row per record)",
            "type": "string",
            "description": "Element path that repeats once per record, e.g. catalog/product or project/dependencies/dependency. Each match becomes one dataset row. A simple XPath such as //item[@type='a'] also works. Leave empty for one row per document."
          },
          "attributePrefix": {
            "title": "Attribute prefix",
            "type": "string",
            "description": "Text put before attribute names in the JSON keys, so <price currency=\"USD\"> becomes @currency. Use an empty value to drop the prefix.",
            "default": "@"
          },
          "textKey": {
            "title": "Text key",
            "type": "string",
            "description": "Key that holds the text of an element that also has attributes or child elements, e.g. {\"@currency\": \"USD\", \"#text\": \"9.90\"}.",
            "default": "#text"
          },
          "namespaces": {
            "title": "Namespaces",
            "enum": [
              "strip",
              "keep"
            ],
            "type": "string",
            "description": "Strip removes namespace prefixes so keys are plain names. Keep leaves prefixes like dc:title in the keys and adds the xmlns declarations.",
            "default": "strip"
          },
          "forceList": {
            "title": "Always a list",
            "type": "array",
            "description": "Element names that must always come out as a list, even when they occur once, e.g. tag or item. Keeps the JSON shape the same from record to record.",
            "items": {
              "type": "string"
            }
          },
          "flatten": {
            "title": "Flatten to dot keys (CSV-friendly)",
            "type": "boolean",
            "description": "Turn nested values into one flat row with keys like price.@currency and tags.tag.0. Off keeps nested JSON and puts nested values as JSON text in CSV cells.",
            "default": false
          },
          "parseValues": {
            "title": "Convert numbers and booleans",
            "type": "boolean",
            "description": "Turn text such as 9.90, 42 and true into real numbers and booleans in the JSON. Off keeps every value as text, which preserves leading zeros and long IDs.",
            "default": false
          },
          "outputFiles": {
            "title": "Output files",
            "enum": [
              "both",
              "json",
              "csv",
              "none"
            ],
            "type": "string",
            "description": "Files saved in the key-value store: one JSON and/or CSV per input (all records), plus combined.json / combined.csv when several inputs are given.",
            "default": "both"
          },
          "formulaSafe": {
            "title": "Formula-safe CSV",
            "type": "boolean",
            "description": "Puts an apostrophe before text that starts with = + @ (or - when it is not a number), so Excel and Google Sheets never run it as a formula.",
            "default": true
          },
          "jsonIndent": {
            "title": "JSON indent",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Spaces per level in the JSON file. 0 = minified on one line.",
            "default": 2
          },
          "maxRecords": {
            "title": "Max records per document",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records per document. 0 = all (hard limit 100,000).",
            "default": 0
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}