# Fathom Macroeconomic Data API — Category Tree

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

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

## Facts

- Endpoint: POST https://fathom-opal.vercel.app/api/category-tree
- Price: $0.04/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-40a9e515
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kEUJx02ONPaGjCQuMo4uT

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-40a9e515 -d '<json body>'
```

Example prompt: Show me all the subcategories under the root FRED economic data category so I can see what macroeconomic topics are available to explore.

## When to prefer this

Use this endpoint when you need to programmatically navigate or display the hierarchical structure of FRED macroeconomic data categories — for example, to build a category picker, discover what data series exist, or drill into a specific economic domain. Prefer this over directly querying time series if you first need to understand what categories of data are available.

## Known failure modes

- Invalid or non-existent categoryId returns an empty children array or error
- Network timeout on Vercel-hosted endpoint under high load
- Payment failure via x402 protocol prevents request from completing
- Malformed request body (e.g. wrong data types) may return a 400 error
- Root category (ID 0) may return a very large list that is slow to process

## 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 a JSON object containing the data source identifier, a list of child category objects (each with category IDs and names), and the parent category ID used in the request. This enables navigation of FRED's hierarchical category structure.

## 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-40a9e515/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fathom-opal.vercel.app](https://www.zero.xyz/host/fathom-opal.vercel.app/llms.txt)
