# Fathom Macroeconomic Data API — Category Tree

> Fathom Macroeconomic Data API — Category Tree is a paid API for AI agents from fredthom.vercel.app, paid per call via x402, $0.35/call, status unknown (last checked 2026-09-14).

Returns the hierarchical category tree of FRED economic data categories, starting from a given parent category ID

## Facts

- Endpoint: POST https://fredthom.vercel.app/api/category-tree
- Price: $0.35/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fathom-macroeconomic-data-api-category-tree-ee413e1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oP-i9kMCfTj_jmQFbeZhk

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 fathom-macroeconomic-data-api-category-tree-ee413e1e -d '<json body>'
```

Example prompt: Show me all the subcategories under FRED's root economic data category so I can figure out which branch contains inflation and price index data.

## When to prefer this

Use this endpoint when you need to discover or navigate the FRED macroeconomic data category hierarchy before fetching actual time series data — particularly useful as a first step to identify which category IDs to use in subsequent series queries.

## Known failure modes

- Invalid or non-existent categoryId returns empty children array or error
- Network timeout on Vercel serverless cold start
- Payment failure via x402 protocol returns 402 status without data
- Malformed request body returns 400 error

## How this service works

Free macroeconomic data API powered by FRED. 816,000+ economic time series. GDP, inflation, unemployment, interest rates, and more.

## Output

Returns an object with a source identifier, an array of child category objects (each with name and ID), and the parent category ID that was queried — enabling navigation of the FRED category hierarchy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "categoryId": {
   "type": "string",
   "description": "Parent category ID (default: 0 for root)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "source"
 ],
 "properties": {
  "source": {
   "type": "string"
  },
  "children": {
   "type": "array",
   "items": {
    "type": "object"
   }
  },
  "parent_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fathom-macroeconomic-data-api-category-tree-ee413e1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fredthom.vercel.app](https://www.zero.xyz/host/fredthom.vercel.app/llms.txt)
