# Data Toolkit – Flatten

> Data Toolkit – Flatten is a paid API for AI agents from data.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Flattens a nested JSON object or array into a single-level key-value structure using a configurable path delimiter

## Facts

- Endpoint: POST https://data.openverbs.com/v1/flatten
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/data-toolkit-flatten-f45678a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z7S4Brdtl8T5yQtW4gNPm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability data-toolkit-flatten-f45678a8 -d '<json body>'
```

Example prompt: Can you flatten this nested JSON object for me using a dot as the delimiter? The data is: {"user":{"name":"Alice","address":{"city":"New York","zip":"10001"}},"score":42}

## When to prefer this

Choose this endpoint when you need a simple, reliable, pay-per-call flattening of a nested JSON object or array without managing infrastructure. Ideal for ETL pipelines, data normalization before database ingestion, or preprocessing API responses for flat data stores. Prefer this over writing custom flattening code when you need a quick, deterministic transformation with a configurable delimiter in an automated agent workflow.

## Known failure modes

- Missing required 'data' field in body returns a validation error
- Input data that is not an object or array may produce unexpected output
- Custom delimiter longer than 8 characters is rejected by schema validation
- Circular references in input objects may cause processing errors or timeouts
- Empty objects or arrays may return an empty flattened result

## How this service works

Flatten a nested object/array into a single-level object whose keys are the delimited paths to each leaf (default delimiter `.`). Requires an object or array.

## Output

A flattened single-level JSON object where each key represents the full dot-delimited (or custom-delimited) path from the original nested structure to the leaf value, and each value is the corresponding scalar value from the input data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "description": "The nested object or array to flatten."
      },
      "delimiter": {
       "type": "string",
       "maxLength": 8,
       "minLength": 1,
       "description": "Path delimiter. Default `.`."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/data-toolkit-flatten-f45678a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.openverbs.com](https://www.zero.xyz/host/data.openverbs.com/llms.txt)
