{
  "openapi": "3.0.1",
  "info": {
    "title": "YAML to JSON Converter: JSON to YAML & Validator",
    "description": "Convert YAML to JSON and JSON to YAML from pasted text, file URLs or key-value store records. Syntax errors are reported with line and column. Multi-document YAML, YAML lists to CSV, safe loading only. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "ibqmfZhqw7wLtmyrU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~yaml-json-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-yaml-json-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/ucchiii~yaml-json-converter/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-yaml-json-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/ucchiii~yaml-json-converter/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-yaml-json-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": {
          "text": {
            "title": "YAML or JSON text",
            "type": "string",
            "description": "Paste YAML or JSON here (up to 10 MB). Several YAML documents separated by --- are fine. With mode 'auto', JSON becomes YAML and YAML becomes JSON. Leave this and the files empty for a free demo."
          },
          "fileUrls": {
            "title": "Or file URLs",
            "type": "array",
            "description": "Public http(s) links to .yaml, .yml, .json, .jsonl or .ndjson files, up to 10 MB each and 100 inputs per run. Each file becomes one output file.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Or a key-value store with files",
            "type": "string",
            "description": "Optional. ID or name of a key-value store that holds YAML or JSON files as records (for example files you uploaded in Apify Console). Converted after the text and URLs."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Keys of the records to convert from the key-value store above, e.g. 'config.yaml'. Leave empty to convert every record in the store (except INPUT), up to 100.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Conversion",
            "enum": [
              "auto",
              "yaml-to-json",
              "json-to-yaml",
              "yaml-to-csv"
            ],
            "type": "string",
            "description": "Auto: .yaml/.yml files and YAML text become JSON; .json/.jsonl files and JSON text become YAML. 'YAML list to CSV' turns a list of objects (or an object holding one list) into a CSV table.",
            "default": "auto"
          },
          "jsonIndent": {
            "title": "JSON indent",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Spaces per level in JSON output. 0 = minified on one line.",
            "default": 2
          },
          "yamlIndent": {
            "title": "YAML indent",
            "minimum": 2,
            "maximum": 8,
            "type": "integer",
            "description": "Spaces per level in YAML output.",
            "default": 2
          },
          "sortKeys": {
            "title": "Sort keys",
            "type": "boolean",
            "description": "Sort object keys alphabetically in the output. Off keeps the original order.",
            "default": false
          },
          "multiDocument": {
            "title": "Several YAML documents become",
            "enum": [
              "array",
              "jsonl"
            ],
            "type": "string",
            "description": "Only for YAML with several documents (separated by ---) converted to JSON. A single document is always plain JSON.",
            "default": "array"
          },
          "formulaSafe": {
            "title": "Formula-safe CSV",
            "type": "boolean",
            "description": "YAML to CSV only: 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
          },
          "saveFiles": {
            "title": "Save output files",
            "type": "boolean",
            "description": "Save one converted file per input in the key-value store, with a download link in the results.",
            "default": true
          },
          "includeOutput": {
            "title": "Converted text in the results",
            "type": "boolean",
            "description": "Put each converted document as text in its result row (first 100,000 characters; the file always has everything). Turn off for very large documents.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}