{
  "x402Version": 2,
  "id": 30109,
  "slug": "30109",
  "resource": "https://api.relaystation.ai/v1/data/pivot",
  "description": "$0.0002/MB. Reshape tables long↔wide — pivot and unpivot without a spreadsheet. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny",
  "type": "http",
  "serviceName": "Relaystation Pivot",
  "resourceType": "Dataset",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x5F7254f252eF9b9f92B6B4F2cF91205eD7A96C7A",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 60
    },
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x5F7254f252eF9b9f92B6B4F2cF91205eD7A96C7A",
      "asset": "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
      "amount": "10000",
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "agg": "count",
            "columns": "string",
            "file": {},
            "id": [
              "string"
            ],
            "index": [
              "string"
            ],
            "mode": "pivot",
            "value": [
              "string"
            ],
            "values": "string"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "ok": true
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "agg": {
                    "description": "pivot: cell aggregate (default count behavior per route).",
                    "enum": [
                      "count",
                      "sum",
                      "avg",
                      "min",
                      "max"
                    ],
                    "type": "string"
                  },
                  "columns": {
                    "description": "pivot: the column whose values become output columns.",
                    "type": "string"
                  },
                  "file": {
                    "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }.",
                    "type": "object"
                  },
                  "from": {
                    "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson.",
                    "enum": [
                      "csv",
                      "tsv",
                      "json",
                      "ndjson"
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "unpivot: the id columns kept on every output row.",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "index": {
                    "description": "pivot: the row-key columns.",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "mode": {
                    "enum": [
                      "pivot",
                      "unpivot"
                    ],
                    "type": "string"
                  },
                  "to": {
                    "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson.",
                    "enum": [
                      "csv",
                      "tsv",
                      "json",
                      "ndjson"
                    ],
                    "type": "string"
                  },
                  "value": {
                    "description": "unpivot: the columns melted into variable/value rows (default: all non-id).",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "values": {
                    "description": "pivot: the column aggregated into the cells.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "pivot",
    "reshape",
    "data-transformation",
    "analytics",
    "tabular-data",
    "bazaar"
  ],
  "sourceHost": "api.relaystation.ai",
  "lastUpdated": "2026-10-04T17:28:56.898Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-04T17:28:56.778Z"
  },
  "metadata": {
    "serviceName": "Relaystation Pivot",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "agg": "count",
              "columns": "string",
              "file": {},
              "id": [
                "string"
              ],
              "index": [
                "string"
              ],
              "mode": "pivot",
              "value": [
                "string"
              ],
              "values": "string"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "ok": true
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "agg": {
                      "description": "pivot: cell aggregate (default count behavior per route).",
                      "enum": [
                        "count",
                        "sum",
                        "avg",
                        "min",
                        "max"
                      ],
                      "type": "string"
                    },
                    "columns": {
                      "description": "pivot: the column whose values become output columns.",
                      "type": "string"
                    },
                    "file": {
                      "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }.",
                      "type": "object"
                    },
                    "from": {
                      "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson.",
                      "enum": [
                        "csv",
                        "tsv",
                        "json",
                        "ndjson"
                      ],
                      "type": "string"
                    },
                    "id": {
                      "description": "unpivot: the id columns kept on every output row.",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "index": {
                      "description": "pivot: the row-key columns.",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "mode": {
                      "enum": [
                        "pivot",
                        "unpivot"
                      ],
                      "type": "string"
                    },
                    "to": {
                      "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson.",
                      "enum": [
                        "csv",
                        "tsv",
                        "json",
                        "ndjson"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "description": "unpivot: the columns melted into variable/value rows (default: all non-id).",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "values": {
                      "description": "pivot: the column aggregated into the cells.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.relaystation.ai",
    "manifest_name": "api.relaystation.ai",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}