# BEA US Trade Balance Data

> BEA US Trade Balance Data is a paid API for AI agents from x402-sand.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-12-01).

Fetches US Bureau of Economic Analysis (BEA) trade balance and macroeconomic indicator data for a specified year and indicator type.

## Facts

- Endpoint: GET https://x402-sand.vercel.app/api/bea/trade?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bea-us-trade-balance-data-fad1248b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sCCp3M3CPbf4kOkTjLmru

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 bea-us-trade-balance-data-fad1248b
```

Example prompt: Can you pull the US balance of goods trade data from the BEA for 2024 using the BalGds indicator?

## When to prefer this

Use this endpoint when you need structured US macroeconomic trade data sourced directly from the BEA, particularly balance of goods or other trade indicators by year. Prefer this over general financial data APIs when you specifically need official government BEA figures for macro research, ETF context, or institutional analysis pipelines.

## Known failure modes

- Empty data array returned if the year or indicator code is invalid or not available
- Missing required query params may return an error or empty result
- BEA upstream data may be delayed or unavailable for very recent periods
- Invalid indicator string (e.g. misspelled 'BalGds') returns no matching records

## How this service works

Crypto ETF flows, institutional fund data, and US macroeconomic events.

## Output

Returns a JSON object with a success flag, the endpoint path, and a data array containing BEA trade indicator records for the requested year and indicator — typically including time series values for the specified macroeconomic trade metric.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "year": {
       "type": "string",
       "description": "Example value: 2026"
      },
      "indicator": {
       "type": "string",
       "description": "Example value: BalGds"
      }
     },
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {}
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [],
  "success": true,
  "endpoint": "/api/bea/trade"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bea-us-trade-balance-data-fad1248b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-sand.vercel.app](https://www.zero.xyz/host/x402-sand.vercel.app/llms.txt)
