# MacroLens Global Macro Indicator

> MacroLens Global Macro Indicator is a paid API for AI agents from macrolens.imac2014ville.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-13).

Returns historical time-series data for a single macroeconomic indicator (e.g. GDP, inflation, unemployment) for a specified country, sourced from World Bank Open Data.

## Facts

- Endpoint: GET https://macrolens.imac2014ville.workers.dev/indicator?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macrolens-global-macro-indicator-753ee91d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QD8UpfBVBws5rRwu2_guY

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-global-macro-indicator-753ee91d
```

Example prompt: Pull the GDP data for the United States for the last 15 years using MacroLens — I want to see the annual values as a time series.

## When to prefer this

Use this endpoint when you need structured, historical macroeconomic time-series data for a specific country and indicator, backed by World Bank data. Prefer it over general web search when you need machine-readable, numeric annual series with consistent units and sourcing. It covers 200+ countries and 30+ indicators including GDP, inflation, unemployment, debt, trade, and demographic metrics, and requires no API key — just USDC payment per call.

## Known failure modes

- Invalid or unsupported country code returns an error
- Unrecognized indicator key or World Bank code returns an error
- Years parameter out of range (must be 1-60) may return validation error
- Data not available for the requested country/indicator combination returns empty series
- Payment failure (insufficient USDC or network issue) blocks request

## How this service works

Global macro statistics (GDP, inflation, unemployment, debt and 30+ indicators for 200+ countries), country profiles and rankings, and official company registry lookups (Norway, France) for AI agents. No API key: pay USDC on Base per call via x402.

## Output

Returns a JSON object with the latest value, a full year-by-year time series, country metadata (ISO2, ISO3, name), indicator metadata (key, World Bank code, name, units), and a source attribution. Example: {ok: true, latest: {year, value}, series: [{year, value}...], country: {...}, indicator: {...}, source: 'World Bank Open Data (CC BY 4.0)'}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country",
      "indicator"
     ],
     "properties": {
      "years": {
       "type": "number",
       "description": "Number of most recent years, 1-60 (default 10)"
      },
      "country": {
       "type": "string",
       "description": "ISO2 or ISO3 country code, e.g. US, DE, JPN (aggregates WLD, EUU also work)"
      },
      "indicator": {
       "type": "string",
       "description": "Friendly key (gdp, gdp_per_capita, gdp_growth, inflation, unemployment, population, debt_to_gdp, current_account, interest_rate, exports, imports, fdi, gini, life_expectancy, ...) or a raw World Bank code like NY.GDP.MKTP.CD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "latest": {
   "year": 2025,
   "value": 30769700000000
  },
  "series": [
   {
    "year": 2025,
    "value": 30769700000000
   },
   {
    "year": 2024,
    "value": 29298013000000
   }
  ],
  "source": "World Bank Open Data (CC BY 4.0)",
  "country": {
   "iso2": "US",
   "iso3": "USA",
   "name": "United States"
  },
  "indicator": {
   "key": "gdp",
   "code": "NY.GDP.MKTP.CD",
   "name": "GDP (current US$)",
   "units": "USD"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macrolens-global-macro-indicator-753ee91d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from macrolens.imac2014ville.workers.dev](https://www.zero.xyz/host/macrolens.imac2014ville.workers.dev/llms.txt)
