Scrapers / Developer & File Tools

JSON Flatten & Unflatten
hipersoft/json-flatten-unflatten
Flatten nested JSON into dot-path keys or rebuild nested JSON from flat keys. Perfect for turning deep API data into flat columns for CSV, SQL and BI tools.
Total users
2Monthly users
1Total runs
81Per json transformed
$0.005Last rebuilt
Oct 26, 2026Overview
Flatten nested JSON into dot-path keys — or rebuild nested JSON from flat keys. Turn deep API responses and config objects into flat user.address.city columns ready for CSV, SQL and BI tools, or reverse the process to reconstruct nested structures. Every run also saves the full transformed JSON to your storage.

What it does
- Flatten:
{ "user": { "name": "Ada" } }→{ "user.name": "Ada" }. - Unflatten:
{ "user.name": "Ada" }→{ "user": { "name": "Ada" } }. - Custom key delimiter and optional max depth.
- Emits one key/value row per path (perfect for CSV/Excel) and the full JSON as a file.
Use cases
- Data engineering — flatten nested JSON before loading into a spreadsheet, SQL table or BI tool.
- Config management — convert between flat env-style keys and nested config.
- API prep — reshape deep responses into flat records.
Input
{ "jsonText": "{ \"user\": { \"name\": \"Ada\", \"address\": { \"city\": \"London\" } } }", "mode": "flatten", "delimiter": "." }
| Field | Type | Description |
|---|---|---|
jsonText |
string | The JSON to transform (as text). |
mode |
string | flatten or unflatten. |
delimiter |
string | Character joining nested keys. Default .. |
maxDepth |
integer | Stop flattening beyond this depth (0 = no limit). |
Output

Key/value rows in the dataset, plus the full transformed JSON at result.json in your key-value store.
{ "key": "user.address.city", "value": "London", "resultUrl": "https://api.apify.com/v2/key-value-stores/.../records/result.json" }
Output schema
| Field | Type | Description |
|---|---|---|
key |
string | Flattened key path (or (result) for unflatten). |
value |
string | Value at that key. |
resultUrl |
string (URL) | Link to the full transformed JSON file. |
FAQ
Can I paste an array? Yes — arrays and objects are both supported.
Where's the full result? Saved as result.json in the run's key-value store (link in every row).
Can I automate it? Yes — via integrations on the Apify platform and the Apify API.
Notes
Original clean-room implementation.
Input
| Field | Type | Description |
|---|---|---|
jsonTextJSON | string | The JSON to transform, as text. For flatten, paste a nested object; for unflatten, paste an object with dot-path keys. |
modeMode | string · flatten, unflatten | Flatten a nested object into dot-path keys, or unflatten dot-path keys back into a nested object. Default: "flatten" |
delimiterKey delimiter | string | Character joining nested keys, e.g. "user.address.city". Default: "." |
maxDepthMax depth (flatten) | integer | Stop flattening beyond this depth (0 = no limit). Default: 0 |
API
curl -X POST "https://api.apify.com/v2/acts/hipersoft~json-flatten-unflatten/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonText": "{\n \"user\": { \"name\": \"Ada\", \"address\": { \"city\": \"London\", \"zip\": \"EC1\" } },\n \"tags\": [\"a\", \"b\"]\n}"
}'from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("hipersoft/json-flatten-unflatten").call(run_input={
"jsonText": "{\n \"user\": { \"name\": \"Ada\", \"address\": { \"city\": \"London\", \"zip\": \"EC1\" } },\n \"tags\": [\"a\", \"b\"]\n}"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('hipersoft/json-flatten-unflatten').call({
"jsonText": "{\n \"user\": { \"name\": \"Ada\", \"address\": { \"city\": \"London\", \"zip\": \"EC1\" } },\n \"tags\": [\"a\", \"b\"]\n}"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);Pricing
| Event | Price | Paid plans from |
|---|---|---|
| JSON transformed One JSON document flattened or unflattened | $0.005 | $0.0025 |
You pay only for what the run returns. Set a maximum cost per run and it stops cleanly at that limit.
Related scrapers
Bulk Image Downloader
Download thousands of images from a list of URLs and store each in the key-value store with a public link. Returns content type, size, dimensions and SHA-256 per image. Bulk-ready. Great for datasets, backups and media pipelines.
8,102 runs · 103 users · $0.056 / url processedText to Speech
Convert any text to natural-sounding speech as an MP3 download. 300+ premium neural voices across 70+ languages, adjustable rate, pitch and volume. Great for voiceovers, videos, accessibility and audio content. No setup.
278 runs · 22 users · $0.01 / audio generatedGoogle Maps Email Extractor
Search Google Maps for businesses, then crawl each business website to extract emails, social profiles and extra phone numbers. Turns any Maps search into a ready lead list. No setup.
159 runs · 8 users · $0.006 / business lead scrapedWebsite Screenshot
Capture full-page or viewport screenshots of any URL as PNG or JPEG, at any device size. For monitoring, previews, thumbnails and automation workflows.
156 runs · 3 users · $0.004 / screenshot capturedBulk URL Status Checker
Check thousands of URLs over plain HTTP: status codes, broken links (404/410/5xx), full redirect chains, response time, content type, page title and SSL certificate expiry.
154 runs · 13 users · $0.002 / url checkedGoogle Search Scraper
Scrape Google Search results (organic listings) for any query: title, URL, displayed URL, snippet and position. Multi-query, per-country/language, pagination. Uses Google SERP proxy — reliable, no captcha, no setup.
121 runs · 8 users · $0.001 / result scrapedSend the site and the fields. We build it and you get it first.