{
  "openapi": "3.0.1",
  "info": {
    "title": "Data Format Converter: JSON, XML, YAML, CSV and TSV",
    "description": "Converts JSON, JSON Lines, XML, YAML, CSV and TSV files, URLs, pasted text or Apify datasets to any of the other formats, with nested object flattening, record path selection and type detection. Returns a download link for each file.",
    "version": "0.1",
    "x-build-id": "gqGUVtDBgnut0wwPc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/examsens.ai~data-format-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-examsens.ai-data-format-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/examsens.ai~data-format-converter/runs": {
      "post": {
        "operationId": "runs-sync-examsens.ai-data-format-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/examsens.ai~data-format-converter/run-sync": {
      "post": {
        "operationId": "run-sync-examsens.ai-data-format-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": {
          "urls": {
            "title": "File URLs",
            "type": "array",
            "description": "Public URLs of JSON, JSON Lines, XML, YAML, CSV or TSV files. Each one becomes one output file. Up to 50 MB each.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "texts": {
            "title": "Pasted data",
            "type": "array",
            "description": "Data pasted as text, one document per entry. Each one becomes one output file.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Apify dataset IDs",
            "type": "array",
            "description": "Apify datasets in your account to convert, for example to turn a scraper's results into XML or YAML. Pick them, or give their IDs."
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "json",
              "jsonl",
              "xml",
              "yaml",
              "csv",
              "tsv"
            ],
            "type": "string",
            "description": "Format of the sources. Auto detects it from the file extension, the content type and the content itself.",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xml",
              "yaml"
            ],
            "type": "string",
            "description": "Format to write.",
            "default": "csv"
          },
          "recordPath": {
            "title": "Record path",
            "type": "string",
            "description": "Dot path to the part of the document to convert, such as rss.channel.item or data.results. Leave empty: for CSV, TSV and JSON Lines output the first list of records is found for you; for other output the whole document is converted."
          },
          "flatten": {
            "title": "Flatten nested objects",
            "type": "boolean",
            "description": "For CSV and TSV output: turn nested objects into path columns such as address.city. When off, nested values are written as JSON text in one cell.",
            "default": true
          },
          "keySeparator": {
            "title": "Path separator",
            "type": "string",
            "description": "Text placed between the parts of a flattened column name, and split on when rebuilding nested objects from CSV.",
            "default": "."
          },
          "arrayMode": {
            "title": "Lists inside records",
            "enum": [
              "index",
              "join",
              "json"
            ],
            "type": "string",
            "description": "How a list inside a record is written to CSV: one column per item (tags.0, tags.1), the items joined with a semicolon in one cell, or the list as JSON text in one cell.",
            "default": "index"
          },
          "columns": {
            "title": "Columns to keep",
            "type": "array",
            "description": "For CSV and TSV output: the column names to write, in this order. Leave empty to write every column.",
            "items": {
              "type": "string"
            }
          },
          "includeHeader": {
            "title": "Header row",
            "type": "boolean",
            "description": "Write the column names as the first row of CSV and TSV output.",
            "default": true
          },
          "csvOutputDelimiter": {
            "title": "CSV output delimiter",
            "type": "string",
            "description": "Column delimiter for CSV output, such as a comma or a semicolon.",
            "default": ","
          },
          "csvDelimiter": {
            "title": "CSV input delimiter",
            "type": "string",
            "description": "Column delimiter of CSV input. Leave empty to detect comma, semicolon, tab or pipe."
          },
          "csvHasHeader": {
            "title": "CSV input has a header row",
            "type": "boolean",
            "description": "Use the first CSV row as field names. When off, fields are named column_1, column_2 and so on.",
            "default": true
          },
          "inferTypes": {
            "title": "Detect numbers and booleans",
            "type": "boolean",
            "description": "Turn CSV and XML text values into numbers, true or false, and null. Values with a leading zero, such as 007 or ZIP codes, stay text.",
            "default": true
          },
          "nullTokens": {
            "title": "Values read as null",
            "type": "array",
            "description": "CSV and XML values, compared without case, that become null when type detection is on.",
            "default": [
              "",
              "null",
              "NA",
              "N/A"
            ],
            "items": {
              "type": "string"
            }
          },
          "unflatten": {
            "title": "Rebuild nested objects from CSV",
            "type": "boolean",
            "description": "Turn CSV columns such as address.city back into nested objects, and columns such as tags.0 and tags.1 into lists, using the path separator.",
            "default": false
          },
          "pretty": {
            "title": "Indent output",
            "type": "boolean",
            "description": "Indent JSON and XML output for reading.",
            "default": true
          },
          "xmlRootName": {
            "title": "XML root element",
            "type": "string",
            "description": "Root element name used when the data has no single root, such as a list of records.",
            "default": "root"
          },
          "xmlItemName": {
            "title": "XML item element",
            "type": "string",
            "description": "Element name for each record of a list.",
            "default": "item"
          },
          "attributePrefix": {
            "title": "XML attribute prefix",
            "type": "string",
            "description": "Keys starting with this text are XML attributes, both when reading and when writing XML. Element text next to attributes is kept under #text.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}