{
  "openapi": "3.0.1",
  "info": {
    "title": "SPSS MCP Full Control",
    "description": "Run SPSS-oriented analysis workflows through an MCP bridge from any MCP-capable AI client or Apify workflow.",
    "version": "1.0",
    "x-build-id": "RlQfk9ob3WKVYSILv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mai_amm~spss-mcp-full-control/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mai_amm-spss-mcp-full-control",
        "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/mai_amm~spss-mcp-full-control/runs": {
      "post": {
        "operationId": "runs-sync-mai_amm-spss-mcp-full-control",
        "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/mai_amm~spss-mcp-full-control/run-sync": {
      "post": {
        "operationId": "run-sync-mai_amm-spss-mcp-full-control",
        "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": {
          "bridgeUrl": {
            "title": "SPSS Bridge URL",
            "type": "string",
            "description": "Base URL of your SPSS MCP bridge running beside IBM SPSS Statistics. Leave empty to generate a dry-run plan."
          },
          "authToken": {
            "title": "Auth Token",
            "type": "string",
            "description": "Bearer token for the SPSS bridge. Store as a secret input on Apify."
          },
          "goal": {
            "title": "Goal",
            "enum": [
              "connection_guide",
              "explore_dataset",
              "compare_groups",
              "find_relationships",
              "survey_analyzer",
              "forecast",
              "run_syntax",
              "batch"
            ],
            "type": "string",
            "description": "Choose the SPSS job you want the Actor to perform.",
            "default": "explore_dataset"
          },
          "sessionId": {
            "title": "Session ID",
            "type": "string",
            "description": "Optional SPSS session ID. Leave empty to let the bridge create or use its default session."
          },
          "datasetPath": {
            "title": "Dataset Path",
            "type": "string",
            "description": "Path or mounted location of a .sav/.zsav/.por/.csv file that the SPSS bridge can access."
          },
          "dataset": {
            "title": "Dataset Name",
            "type": "string",
            "description": "Optional logical dataset name inside the SPSS session."
          },
          "variables": {
            "title": "Variables",
            "type": "array",
            "description": "Variables for exploration, frequencies, correlations, or survey analysis.",
            "items": {
              "type": "string"
            }
          },
          "outcomeVariable": {
            "title": "Outcome Variable",
            "type": "string",
            "description": "Dependent or outcome variable for comparison workflows."
          },
          "groupVariable": {
            "title": "Group Variable",
            "type": "string",
            "description": "Grouping variable for t-test, ANOVA, chi-square, or other comparisons."
          },
          "dependent": {
            "title": "Dependent Variable",
            "type": "string",
            "description": "Dependent variable for regression."
          },
          "independents": {
            "title": "Independent Variables",
            "type": "array",
            "description": "Predictor variables for regression.",
            "items": {
              "type": "string"
            }
          },
          "modelType": {
            "title": "Model Type",
            "enum": [
              "linear",
              "logistic"
            ],
            "type": "string",
            "description": "Regression model type for relationship analysis.",
            "default": "linear"
          },
          "rowVariable": {
            "title": "Row Variable",
            "type": "string",
            "description": "Row variable for crosstabs."
          },
          "columnVariable": {
            "title": "Column Variable",
            "type": "string",
            "description": "Column variable for crosstabs."
          },
          "scaleVariables": {
            "title": "Scale Variables",
            "type": "array",
            "description": "Scale items for factor analysis in survey workflows.",
            "items": {
              "type": "string"
            }
          },
          "timeVariable": {
            "title": "Time Variable",
            "type": "string",
            "description": "Date or time variable for forecasting."
          },
          "targetVariable": {
            "title": "Target Variable",
            "type": "string",
            "description": "Metric to forecast."
          },
          "horizon": {
            "title": "Forecast Horizon",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Number of future periods to forecast."
          },
          "syntax": {
            "title": "SPSS Syntax",
            "type": "string",
            "description": "SPSS syntax for run_syntax mode."
          },
          "syntaxMode": {
            "title": "Syntax Mode",
            "enum": [
              "reviewed",
              "raw"
            ],
            "type": "string",
            "description": "Reviewed syntax is allowed when write policy permits syntax. Raw syntax requires allowRawSyntax.",
            "default": "reviewed"
          },
          "commands": {
            "title": "Batch Commands",
            "type": "array",
            "description": "Advanced list of action objects for batch mode."
          },
          "exportFormat": {
            "title": "Export Format",
            "enum": [
              "html",
              "pdf",
              "csv",
              "xlsx",
              "sav",
              "spv"
            ],
            "type": "string",
            "description": "Optional export format after the workflow finishes."
          },
          "generateReport": {
            "title": "Generate Report",
            "type": "boolean",
            "description": "Generate a report package after running the workflow.",
            "default": false
          },
          "reportStyle": {
            "title": "Report Style",
            "enum": [
              "executive",
              "technical",
              "academic"
            ],
            "type": "string",
            "description": "Report style for generated reports.",
            "default": "technical"
          },
          "allowWrite": {
            "title": "Allow Data-Mutating Actions",
            "type": "boolean",
            "description": "Allow compute, recode, filter, merge, missing-value transformation, and syntax actions.",
            "default": false
          },
          "allowRawSyntax": {
            "title": "Allow Raw Syntax",
            "type": "boolean",
            "description": "Allow raw syntax execution. Use only for trusted bridge environments.",
            "default": false
          },
          "autoStartSession": {
            "title": "Auto Start Session",
            "type": "boolean",
            "description": "Start an SPSS session before the workflow.",
            "default": true
          },
          "stopOnError": {
            "title": "Stop On Error",
            "type": "boolean",
            "description": "Stop batch execution after the first failed command.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Request Timeout Seconds",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "HTTP timeout for each bridge request.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}