# MacroLens Trade Analysis API

> MacroLens Trade Analysis API is a paid API for AI agents from marcolens.vercel.app, paid per call via x402, $0.4/call, status unknown (last checked 2026-10-14).

Provides AI-powered macro-economic trade analysis using FRED and World Bank data, synthesized by MiMo LLM, for a given start period

## Facts

- Endpoint: POST https://marcolens.vercel.app/api/trade?utm_source=zero.xyz
- Price: $0.4/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macrolens-trade-analysis-api-aeae63c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FHpdI1KEMC16RZ6pIicX3

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 macrolens-trade-analysis-api-aeae63c3 -d '<json body>'
```

Example prompt: Pull me an AI-powered macro trade analysis from MacroLens starting from January 2024 — I want to see what FRED and World Bank data say about global trade trends synthesized into an actionable summary.

## When to prefer this

Choose this endpoint when you need AI-synthesized macro-economic trade analysis grounded in authoritative FRED and World Bank datasets, especially when you want LLM-generated narrative insights rather than raw data. Prefer it over generic economic data APIs when you need both data retrieval and intelligent interpretation in one call, and when you're comfortable with per-call USDC micropayments via x402 on Base.

## Known failure modes

- Missing required 'start' field returns validation error
- Invalid date format for 'start' may cause lookup failure
- FRED or World Bank data unavailable for the requested period returns partial or empty data
- Upstream LLM (MiMo) timeout results in delayed or failed response
- Payment not completed via x402/Base USDC results in 402 Payment Required
- Network issues with vercel.app hosting may cause intermittent 503 errors

## How this service works

AI-powered macro-economic analysis. FRED + World Bank data + MiMo LLM. 20 endpoints. x402 on Base.

## Output

A JSON object with a success flag and a data object containing AI-synthesized macro-economic trade analysis, likely including trade indicators, trends, and LLM-generated narrative insights drawn from FRED and World Bank datasets for the specified time period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "start"
 ],
 "properties": {
  "start": {
   "type": "string",
   "description": "start"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success"
 ],
 "properties": {
  "data": {
   "type": "object"
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macrolens-trade-analysis-api-aeae63c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from marcolens.vercel.app](https://www.zero.xyz/host/marcolens.vercel.app/llms.txt)
