{
  "openapi": "3.0.1",
  "info": {
    "title": "SPSS Tabulator: crosstabs with significance from a .sav file",
    "description": "Upload an SPSS .sav file and get a professional crosstab workbook (Excel) with column-letter significance tests, nets, multi-response and grid tables. No SPSS license needed. Deterministic: same file and spec, same numbers.",
    "version": "0.1",
    "x-build-id": "VfyoomgxdkmALlpT8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insight_genius~spss-tabulator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insight_genius-spss-tabulator",
        "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/insight_genius~spss-tabulator/runs": {
      "post": {
        "operationId": "runs-sync-insight_genius-spss-tabulator",
        "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/insight_genius~spss-tabulator/run-sync": {
      "post": {
        "operationId": "run-sync-insight_genius-spss-tabulator",
        "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",
        "required": [
          "savFile"
        ],
        "properties": {
          "savFile": {
            "title": "SPSS file (.sav)",
            "type": "string",
            "description": "Upload your SPSS .sav file, or paste a public URL to one. Max 50 MB. The form starts with a synthetic sample survey: runs on that sample are free, so you can see a full workbook before using your own data."
          },
          "mode": {
            "title": "What to build",
            "enum": [
              "auto",
              "spec",
              "metadata"
            ],
            "type": "string",
            "description": "auto: the engine detects banners, multi-response groups and grids and builds the full crosstab workbook with no configuration. spec: you control banners, stubs, nets and weight with a tabulation spec. metadata: list variables, labels and detected question types (free, no workbook).",
            "default": "auto"
          },
          "spec": {
            "title": "Tabulation spec (mode: spec)",
            "type": "object",
            "description": "JSON spec. Example: {\"banner\": \"GENDER\", \"stubs\": [\"Q1\", \"Q2\"], \"weight\": \"WEIGHT\", \"nets\": {\"Q1\": {\"Top 2 Box\": [4, 5]}}, \"title\": \"My study\"}. Use the metadata mode first to see your variable names."
          },
          "significanceLevel": {
            "title": "Significance level",
            "enum": [
              "0.90",
              "0.95",
              "0.99"
            ],
            "type": "string",
            "description": "Confidence level for the column-letter significance tests.",
            "default": "0.95"
          },
          "maxBanners": {
            "title": "Maximum banners (mode: auto)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many banner variables the automatic workbook may use.",
            "default": 3
          },
          "bookLanguage": {
            "title": "Workbook language",
            "enum": [
              "en",
              "es"
            ],
            "type": "string",
            "description": "Language of the words the workbook writes by itself (Nets, Mean, Summary, Significance...). Your variable names, question texts and answer labels always stay exactly as they are in your file.",
            "default": "en"
          },
          "includeExecutiveSummary": {
            "title": "Add an AI-written executive summary (mode: auto)",
            "type": "boolean",
            "description": "Off by default. When on, the aggregated tables (never the raw respondent rows) are sent to an AI model, which writes a text summary sheet. AI text can contain mistakes: the tables themselves stay exact either way.",
            "default": false
          },
          "outputMode": {
            "title": "Workbook layout (mode: auto)",
            "enum": [
              "multi_sheet",
              "single_sheet"
            ],
            "type": "string",
            "description": "One sheet per question, or every table stacked in a single sheet.",
            "default": "multi_sheet"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}