{
  "openapi": "3.0.1",
  "info": {
    "title": "JSON Formatter & Validator: Pretty Print, Minify, Fix, Convert",
    "description": "JSON formatter and validator: pretty print, minify, validate with exact line and column, repair broken JSON (trailing commas, single quotes, comments), convert JSON to CSV, YAML or JSONL, check against JSON Schema. Bulk, no API key.",
    "version": "0.1",
    "x-build-id": "7H1CduOzvEug0rXs4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~json-formatter-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-json-formatter-validator",
        "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/data-done-right~json-formatter-validator/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-json-formatter-validator",
        "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/data-done-right~json-formatter-validator/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-json-formatter-validator",
        "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": {
          "texts": {
            "title": "JSON texts",
            "type": "array",
            "description": "One JSON document per entry (an object, an array or a whole file pasted as text). Broken JSON is welcome: use the Repair operation to fix it. Each entry gets its own result row. Example: {'a': 1,}",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "URLs of JSON files or APIs",
            "type": "array",
            "description": "Optional. Public http(s) links to a JSON, JSONL or CSV file or to an API that returns JSON. Each link gets its own result row. Private network addresses are refused. Example: https://api.github.com/repos/apify/crawlee",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with JSON (optional)",
            "type": "string",
            "description": "Optional. Pick an Apify dataset, for example the output of a scraper. By default every item is processed as one JSON document; set the field below to use a text or JSON field of each item instead."
          },
          "datasetField": {
            "title": "Dataset field",
            "type": "string",
            "description": "Optional. Field of each dataset item that holds the JSON (a JSON text, an object, an array or a URL). Dotted paths work. Leave empty to use the whole item. Example: payload or response.data."
          },
          "combineDataset": {
            "title": "Combine the dataset into one array",
            "type": "boolean",
            "description": "Turn on to read all dataset items into ONE JSON array and process it as a single document, for example to turn a whole dataset into one CSV file. Charged as one event per 500 items (at least one). Off: every item is its own result.",
            "default": false
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "validate",
              "format",
              "minify",
              "repair",
              "to_csv",
              "to_yaml",
              "to_jsonl",
              "stats"
            ],
            "type": "string",
            "description": "What to do with every input. Validate reports the exact line, column, message and a fix hint. Repair fixes common breakage (trailing commas, single quotes, unquoted keys, comments, Python None/True/False, missing or extra brackets) and lists every change. The to_csv, to_yaml and to_jsonl operations convert.",
            "default": "format"
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "json",
              "jsonl",
              "csv"
            ],
            "type": "string",
            "description": "How to read the input. Auto reads JSON, and detects JSON Lines (one document per line) and CSV links by their file ending or content type. Choose CSV to convert a CSV text or file to JSON (use Format as the operation). A JSONL input is treated as an array of its lines.",
            "default": "auto"
          },
          "autoRepair": {
            "title": "Repair first if the JSON is invalid",
            "type": "boolean",
            "description": "For Format, Minify and the conversions: if the JSON is invalid, repair it first instead of reporting an error. Every change is listed in the result row. The Repair operation always does this.",
            "default": false
          },
          "indent": {
            "title": "Indent (spaces)",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Spaces per level for formatted output (Format, Repair). Example: 2.",
            "default": 2
          },
          "useTabs": {
            "title": "Indent with tabs",
            "type": "boolean",
            "description": "Use one tab per level instead of spaces.",
            "default": false
          },
          "sortKeys": {
            "title": "Sort keys alphabetically",
            "type": "boolean",
            "description": "Sort the keys of every object (a stable order for diffs). Also applies to JSONL and YAML output.",
            "default": false
          },
          "asciiOnly": {
            "title": "Escape non-ASCII characters",
            "type": "boolean",
            "description": "Write characters outside ASCII as \\uXXXX escapes (JSON and JSONL output). Off keeps readable UTF-8 text.",
            "default": false
          },
          "includeStats": {
            "title": "Add statistics to every row",
            "type": "boolean",
            "description": "Add depth, key count, value types and size to each result row. The Validate and Stats operations always include them.",
            "default": false
          },
          "jsonSchema": {
            "title": "JSON Schema (optional)",
            "type": "object",
            "description": "Optional. A JSON Schema (draft 2020-12 or draft-07). Every valid document is also checked against it and the row shows schemaValid and the list of schema errors with their paths. Remote $ref links are not downloaded."
          },
          "schemaDraft": {
            "title": "Schema draft",
            "enum": [
              "auto",
              "2020-12",
              "7"
            ],
            "type": "string",
            "description": "Which JSON Schema draft to use. Auto reads the $schema keyword and falls back to 2020-12.",
            "default": "auto"
          },
          "recordsPath": {
            "title": "Records path (JSON to CSV)",
            "type": "string",
            "description": "Optional. Dotted path to the array to turn into CSV rows when the data is wrapped in an object. Example: data.items. Empty: the whole document (an array gives one row per element)."
          },
          "flattenDelimiter": {
            "title": "Flatten delimiter",
            "type": "string",
            "description": "Joins nested keys into column names, and splits them again for CSV to JSON with unflatten. Example: . gives address.city.",
            "default": "."
          },
          "arrayMode": {
            "title": "Arrays in CSV",
            "enum": [
              "index",
              "join",
              "json"
            ],
            "type": "string",
            "description": "How arrays inside a record are written. Index: tags.0, tags.1 (one column per element). Join: all values of a list of simple values in one cell. JSON: the array as a JSON text in one cell.",
            "default": "index"
          },
          "arrayJoinSeparator": {
            "title": "Join separator",
            "type": "string",
            "description": "Separator between values when Arrays in CSV is set to Join. Example: a semicolon or a comma and a space.",
            "default": ", "
          },
          "flattenMaxDepth": {
            "title": "Flatten depth limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Stop flattening at this depth and keep deeper data as a JSON text in the cell. 0 flattens everything.",
            "default": 0
          },
          "csvDelimiter": {
            "title": "CSV output delimiter",
            "enum": [
              "comma",
              "semicolon",
              "tab",
              "pipe"
            ],
            "type": "string",
            "description": "Column separator for CSV output.",
            "default": "comma"
          },
          "csvHeader": {
            "title": "CSV has a header row",
            "type": "boolean",
            "description": "Write a header row (JSON to CSV) and read the first row as column names (CSV to JSON).",
            "default": true
          },
          "csvInputDelimiter": {
            "title": "CSV input delimiter",
            "enum": [
              "auto",
              "comma",
              "semicolon",
              "tab",
              "pipe"
            ],
            "type": "string",
            "description": "Column separator when reading CSV. Auto picks the most common one in the first line.",
            "default": "auto"
          },
          "csvInferTypes": {
            "title": "Detect numbers and booleans in CSV",
            "type": "boolean",
            "description": "CSV to JSON: write 42 as a number, true as a boolean and empty cells as null. Values with leading zeros (007) stay text. Off keeps every cell as text.",
            "default": true
          },
          "csvUnflatten": {
            "title": "Rebuild nested objects from CSV columns",
            "type": "boolean",
            "description": "CSV to JSON: turn columns such as address.city back into nested objects (and tags.0, tags.1 back into arrays) using the flatten delimiter.",
            "default": false
          },
          "csvEscapeFormulas": {
            "title": "Neutralise spreadsheet formulas",
            "type": "boolean",
            "description": "JSON to CSV: prefix cells that start with = + - or @ with an apostrophe so Excel and Sheets do not run them. Numbers are left alone.",
            "default": false
          },
          "outputMode": {
            "title": "Where to put the result",
            "enum": [
              "auto",
              "inline",
              "file"
            ],
            "type": "string",
            "description": "Auto puts small results inside the result row (field result) and large ones in a file in the key-value store with a download link (field resultFile). Inline always keeps it in the row (up to 2 MB). File always writes a file.",
            "default": "auto"
          },
          "inlineMaxChars": {
            "title": "Inline size limit (characters)",
            "minimum": 1000,
            "maximum": 2000000,
            "type": "integer",
            "description": "In Auto mode, results longer than this are saved as a file. Example: 20000.",
            "default": 20000
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Most documents processed in one run. Extra items are listed as skipped and are not charged. Caps your cost.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Largest JSON file or API response accepted per URL. Example: 20.",
            "default": 20
          },
          "concurrency": {
            "title": "Parallel items",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many items are processed at the same time.",
            "default": 5
          },
          "timeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a URL before giving up on it.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}