# Parquet to JSON: Read Parquet Files to JSON, CSV or Excel (`eliai/parquet-to-json`) Actor

Read Apache Parquet files from S3, GCS, Hugging Face or any public URL and get the rows as JSON (export to CSV or Excel), plus schema, row count and compression. Pick columns, filter rows, page through huge files; only the bytes needed are downloaded. For data engineers, analysts and AI agents.

- **URL**: https://apify.com/eliai/parquet-to-json.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 file reads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Parquet to JSON: Read Parquet Files to JSON, CSV or Excel

**Give a link to an Apache Parquet file. Get its rows as JSON, ready to export as CSV or Excel, plus the schema, row count and compression. Only the bytes you need are downloaded, so reading 1,000 rows of a 5 GB file takes seconds.**

Works with files on **Amazon S3**, **Google Cloud Storage**, **Azure Blob**, **Hugging Face** datasets and any public or pre-signed HTTPS link. Reads files written by **Spark, pandas, PyArrow, DuckDB, Polars, Hive, Impala and BigQuery exports**.

| You give it | You get back | You pay (Free plan) |
|---|---|---|
| `.parquet` file URLs | One dataset row per Parquet row, plus a `FILES` record with schema, row count, row groups and compression | **$0.002 per file** + **$0.004 per 100 rows** ($0.04 per 1,000) |

Files that cannot be opened, failed downloads and links to private or internal addresses are **never charged**.

#### Try it in one click

Press **Start** with the form empty. A built-in 5-row sample file is read **for free**:

```json
{}
```

```json
{
  "id": 1,
  "big": "1152921504606846976",
  "name": "Ada",
  "price": 19.99,
  "ok": true,
  "ts": "2026-11-12T14:00:00.000Z",
  "day": "2026-01-01",
  "tags": ["a", "b"],
  "meta": { "k": "x", "n": 1 }
}
```

#### Read your own file

```json
{
  "parquetUrls": ["https://your-bucket.s3.amazonaws.com/exports/orders.parquet"],
  "maxRows": 5000,
  "columns": ["order_id", "country", "total"],
  "filter": { "country": "US", "total": { "$gt": 100 } }
}
```

Only want the schema and row count? Set `"maxRows": 0`. You get one summary row per file and pay only the per-file price.

### Why use it

Parquet is the standard file format for data lakes and ML datasets, but it is binary and column-packed. Spreadsheets, no-code tools, LLMs and AI agents cannot open it, and reading it in code means installing Spark, pandas or DuckDB. This Actor turns a Parquet link into plain JSON rows you can filter, export to CSV or Excel, or hand to a model.

### Features

- **Partial reads.** When the host supports HTTP range requests (S3, GCS, Azure, Hugging Face and most CDNs do), only the file footer and the columns and row groups you ask for are downloaded.
- **Pick columns** with `columns` to download less.
- **Filter rows** MongoDB style: `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$and`, `$or`, `$not`.
- **Page through huge files** with `rowOffset` + `maxRows` (up to 1,000,000 rows per file per run).
- **Every common codec**: Snappy, gzip, Zstandard, Brotli, LZ4 and uncompressed.
- **Clean JSON types**: 64-bit integers stay exact (as strings when too large for JSON numbers), decimals become numbers, timestamps become ISO 8601, dates become `YYYY-MM-DD`, lists and structs stay nested, maps become objects.
- **Old Hive, Impala and Spark files** that store text as unannotated binary come back as text, not gibberish.
- **Several files per run**, each row tagged with its `_source` file.

### Who this is for

- **AI agents and LLM pipelines** that need to look inside a Parquet file.
- **Analysts** who want a Parquet export as a spreadsheet.
- **Data engineers** checking a file's schema, row count and compression without spinning up Spark.
- **ML practitioners** sampling rows from a Hugging Face dataset.

### Input

| Field | What it does |
|---|---|
| `parquetUrls` | Links to `.parquet` files (up to 20 per run). |
| `maxRows` | Rows to read from each file (default 1,000; 0 = schema only). |
| `rowOffset` | Start at this row (0-based). |
| `columns` | Only these top-level columns. |
| `filter` | Keep only matching rows. |
| `binaryAs` | Binary values as `auto` (text when it is text), `base64` or `hex`. |
| `addSourceField` | Add `_source` to every row (always on for several files). |
| `maxDownloadMb` | Most data to download per file, partial reads included (default 500). |

### Output

- **Dataset**: one item per row. Export as JSON, CSV, Excel, XML or HTML from the run's dataset view or API.
- **`FILES` record** (key-value store): per file, `totalRows`, `rowGroups`, `columnCount`, `columns` with types, `createdBy`, `compression`, `rowsWritten` and how many bytes were downloaded.
- A file that fails adds one row with `_source` and `_error` so you can see what went wrong.
- A file that writes no rows (offset past the end, no row matches the filter) is not charged; its `FILES` entry says only why. For the schema and row count, use `"maxRows": 0`.

### Pricing

Pay per event: **$0.002 per file read** and **$0.004 per 100 rows written** (started hundreds round up, so 1,000 rows cost $0.04). The free sample and every failed file cost nothing. Set a max charge on the run to cap your spend.

### Limits

- Files up to 4 GB. Each file downloads at most `maxDownloadMb` (default 500 MB), partial reads included; a read that stops at the cap keeps the rows already written and says where to continue. A filter scans at most 5 million rows per file per run.
- Very wide nested columns and single values over 512 MB are not supported.

### Privacy and safety

Your file is read for the run only and the rows are kept in your own run's dataset. Links to private networks, localhost or cloud metadata addresses are refused, on every redirect and at connect time.

# Actor input Schema

## `parquetUrls` (type: `array`):

Public or pre-signed links to .parquet files (S3, Google Cloud Storage, Azure, Hugging Face, any HTTPS host). Up to 20 per run. Leave empty to read a free 5-row sample.

## `maxRows` (type: `integer`):

Stop after this many rows from each file. Set 0 to get only the schema and row count (one summary row per file).

## `rowOffset` (type: `integer`):

Skip this many rows first (0-based). Use with Max rows to page through a big file.

## `columns` (type: `array`):

Optional. Top-level column names to read. Fewer columns means less data downloaded. Leave empty for all columns.

## `filter` (type: `object`):

Optional. Keep only matching rows, MongoDB style, for example {"country": "US", "price": {"$gt": 100}}. Operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $not.

## `binaryAs` (type: `string`):

How to write raw binary values. Auto writes clean UTF-8 as text (common in older Hive, Impala and Spark files) and everything else as Base64.

## `addSourceField` (type: `boolean`):

Add the file URL to every row. Always on when you give more than one file.

## `maxDownloadMb` (type: `integer`):

The most data downloaded per file, partial reads included. A read that reaches it keeps the rows already written.

## Actor input object example

```json
{
  "parquetUrls": [],
  "maxRows": 1000,
  "rowOffset": 0,
  "columns": [],
  "filter": {},
  "binaryAs": "auto",
  "addSourceField": false,
  "maxDownloadMb": 500
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset item per Parquet row. Export as JSON, CSV or Excel from the dataset view.

## `files` (type: `string`):

One entry per file: total rows, columns with types, row groups, compression and rows written.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/parquet-to-json").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("eliai/parquet-to-json").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call eliai/parquet-to-json --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/parquet-to-json"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/x37vqPRlAqfxvqhs8/builds/LPlYX39JWaLPz4PJY/openapi.json
