SPSS, Stata & SAS to CSV, JSON & Parquet (keeps labels)
Pricing
from $2.09 / 1,000 file converteds
SPSS, Stata & SAS to CSV, JSON & Parquet (keeps labels)
Convert SPSS .sav/.zsav, Stata .dta and SAS .sas7bdat/.xpt files to CSV, JSON or Parquet — preserving the value labels, variable labels and metadata that naive exports drop.
Pricing
from $2.09 / 1,000 file converteds
Rating
0.0
(0)
Developer
Simon Fletcher
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
23 days ago
Last modified
Categories
Share
What does the SPSS / Stata / SAS Converter do?
Statistical File to CSV converts proprietary statistical data files — SPSS (.sav, .zsav), Stata (.dta) and SAS (.sas7bdat, .xpt), plus SPSS portable (.por) — into clean CSV, JSON or Parquet. Crucially, it preserves the value labels, variable labels and missing-value metadata that naive exports throw away. When you open a .sav in pandas and dump a CSV, you get bare numeric codes (1, 2, 99) with no idea that 1 = Male, 2 = Female, 99 = "no answer", and no column descriptions. This Actor keeps all of it.
Give it a file URL, an uploaded file, or inline base64 — it returns one structured record per file: the rows, the code→label dictionaries, the human-readable column labels, the declared missing ranges, and file metadata. It also saves a downloadable CSV/JSON/Parquet file to the run's key-value store.
Running on Apify means you get an HTTP API, scheduling, integrations (Make, Zapier, n8n, Google Drive), run history, and access from the Apify MCP server so AI agents can call it directly.
Why use the SPSS / Stata / SAS Converter?
- Stop losing your labels — survey and research files encode meaning in value labels and variable labels. This Actor carries them into your CSV/JSON/Parquet output instead of dropping them.
- No SPSS, Stata or SAS license required — read files from all three ecosystems without owning any of the (expensive) source software.
- Feed pipelines and notebooks — get analysis-ready JSON/CSV/Parquet for pandas, R, BigQuery, Snowflake or a data warehouse.
- Give AI agents decoded data — the output is compact structured JSON (no binary, no proprietary blobs), ideal for LLM tool use over the Apify MCP. Turn on Apply value labels to hand agents
"Male"instead of1. - Batch convert — pass many files in one run; each converted file is one dataset item and one billable event.
How to use the SPSS / Stata / SAS Converter
- Open the Input tab.
- Provide your files one of three ways: upload files (delivered as key-value-store keys), add file URLs, or paste inline base64 files (great for API / agent callers). A sample SPSS survey is pre-filled so you can just click Start.
- Pick an output format (CSV, JSON or Parquet). Optionally turn on Apply value labels to replace codes with their label text, or Keep user-defined missing values to retain codes like
99. - Click Start. Each input file becomes one dataset item (download as JSON, CSV, Excel or HTML), and a converted file is saved to the key-value store.
Input
| Field | Type | Description |
|---|---|---|
fileUrls | array | Public URLs of statistical files to download and convert. |
keyValueStoreKeys | array | Keys of uploaded files in the run's key-value store. |
filesBase64 | array | Inline files as { "filename": "survey.sav", "data": "<base64>" }. |
outputFormat | string | csv (default), json, or parquet — the downloadable file saved to the key-value store. |
applyValueLabels | boolean | Replace coded values with their value labels in the rows (default false). |
keepUserMissing | boolean | Keep user-defined missing values instead of nulling them (default false). |
maxRows | integer | Cap data rows per file (0/blank = no cap). |
format | string | Force the input format when a URL/key has no recognizable extension. |
Example input
{"filesBase64": [{ "filename": "survey.sav", "data": "JEZMMkAo..." }],"outputFormat": "csv","applyValueLabels": false}
Output
Each input file produces one dataset item. You can download the dataset as JSON, CSV, Excel or HTML, and the flattened CSV/Parquet file is also saved to the key-value store.
{"source": "survey.sav","filename": "survey.sav","status": "ok","format": "sav","rowCount": 3,"columnCount": 3,"columns": ["id", "gender", "satisfaction"],"variableLabels": {"id": "Respondent ID","gender": "Gender","satisfaction": "Overall satisfaction (1-5)"},"valueLabels": {"gender": { "1": "Male", "2": "Female" },"satisfaction": { "1": "Very dissatisfied", "3": "Neutral", "5": "Very satisfied" }},"missingRanges": {},"records": [{ "id": 1, "gender": 1, "satisfaction": 5 },{ "id": 2, "gender": 2, "satisfaction": 3 },{ "id": 3, "gender": 2, "satisfaction": 4 }],"meta": {"outputFormat": "csv","valueLabelsApplied": false,"fileLabel": "Customer satisfaction survey","tableName": null,"encoding": "UTF-8","columnTypes": { "id": "double", "gender": "double", "satisfaction": "double" },"rowsTruncated": false}}
Output data fields
| Field | Description |
|---|---|
format | Detected input format: sav, zsav, dta, xpt, sas7bdat, por. |
columns | Ordered variable (column) names. |
variableLabels | Variable name → descriptive label (the text naive exports drop). |
valueLabels | Variable name → { code: label } dictionaries for categorical variables. |
missingRanges | Variable name → user-defined missing values/ranges declared in the file. |
records | The converted rows: clean integers/floats, ISO-8601 dates, null for missing. |
meta | File label, table name, encoding, per-column storage types, and flags. |
How much does it cost?
The Actor is billed per converted file (one pay-per-event per non-empty file). Empty, metadata-only or unreadable files are never charged. Compute is tiny — conversion is a few milliseconds per file — so cost is dominated by container startup. Batch many files in one run to amortize it. See PRICING.md for the unit-economics breakdown; the exact per-event price is set by the publisher in the Apify Console.
Tips and advanced options
- Codes vs. labels: leave Apply value labels off to keep raw codes plus the decode maps (best for data pipelines); turn it on to get human-readable text directly in the rows.
- Missing values: turn on Keep user-defined missing values when the missing codes (e.g.
99 = refused) are analytically meaningful; otherwise they collapse tonulland the ranges are still reported inmissingRanges. - Large files: use
maxRowsto sample the first N rows for a quick schema check before a full run. - Parquet output is ideal for loading into data warehouses and columnar analytics.
FAQ, disclaimers, and support
- What formats are supported? SPSS
.sav/.zsav/.por, Stata.dta, and SAS.sas7bdat/.xpt. - Are value labels really preserved? Yes — that is the whole point. SAS transport (
.xpt) and.sas7bdatcarry variable labels but not inline value labels (SAS stores those in a separate catalog), so only variable labels appear for those formats. - Is any of my data sent anywhere? No third-party services — the Actor only reads the files you supply and writes the converted output back to your run's storage.
- Found a problem or need another format? Use the Issues tab. Custom conversions are available on request.