# PayAI Macro Country Basket

> PayAI Macro Country Basket is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Returns a curated basket of key macroeconomic and development indicators (GDP, inflation, unemployment, population, debt, CO2, etc.) for a single country, with latest values and historical data cited to sources.

## Facts

- Endpoint: GET https://payai.agentstools.dev/macro/country?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-macro-country-basket-f7239113
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hosRrBdNlky9dU_pDDux8

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 payai-macro-country-basket-f7239113
```

Example prompt: Give me the headline macro indicators for Brazil — GDP, GDP per capita, growth, inflation, unemployment, population, government debt, current account, life expectancy, and CO2 per capita — with the last 5 years of history and source citations for each.

## When to prefer this

Use this endpoint when you need a broad snapshot of a country's economic and development health in a single call — covering GDP, growth, inflation, unemployment, debt, demographics, and environmental metrics all at once with source citations. Prefer this over the single-indicator endpoint when you want a dashboard view rather than a deep time series on one metric. Choose this over the IMF WEO forecasts endpoint when you want historical actuals across many indicators rather than forward-looking projections.

## Known failure modes

- Unknown or misspelled country name returns a 4xx error with a message indicating the country could not be resolved
- Requesting a year range beyond the maximum of 65 years returns a validation error
- Some indicators may have missing or null values for certain countries or years where data is unavailable
- Indicators with no recent data for a country may return only partial history
- Rate limiting or payment failure results in a 402 or 429 response

## How this service works

A curated headline basket of key macroeconomic and development indicators for one country: GDP, GDP per capita, growth, inflation, unemployment, population, government debt, current account, life expectancy and CO2 per capita. Latest value plus short history, each value cited to its source.

## Output

A structured basket of 10 macroeconomic and development indicators for the requested country, each with its latest value, a short historical series for the requested range, and a citation identifying the data source. Covers GDP (nominal and per capita), real GDP growth, inflation, unemployment, population, general government gross debt, current account balance, life expectancy at birth, and CO2 emissions per capita.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country"
     ],
     "properties": {
      "range": {
       "type": "integer",
       "maximum": 65,
       "minimum": 1,
       "description": "Most recent N years of history per indicator"
      },
      "years": {
       "type": "string",
       "description": "A single year or a Y1:Y2 range"
      },
      "country": {
       "type": "string",
       "description": "A single country as ISO-2, ISO-3 or name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payai-macro-country-basket-f7239113/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
