africaAPI

Reference

Signals

Use country signals for a compact latest/current snapshot across indicators, FX, markets, trade, and government context.

Country Signals

GET/v1/countries/{country_code}/signals

Returns a compact current snapshot for one country.

This endpoint is the simplest way to combine:

  • latest selected macro and infrastructure indicators
  • latest FX rates tied to the country
  • latest exchange-level market snapshots
  • compact trade context
  • compact government context

Signals can now mix:

  • slower annual backbone metrics
  • fresher monthly operational metrics
  • central-bank published current rates where a country source is wired in

Monthly/latest observations include as_of_period so clients can tell which month the signal actually represents.

Use it when you want a fresh operational summary without composing several endpoint families yourself.

Requires an API key.

country_codestringrequired
ISO alpha-2 code such as ng, ke, za
Request
curl "https://api.africa-api.com/v1/countries/ke/signals" \
  -H "Authorization: Bearer $AFRICA_API_KEY"
Response
{
  "data": {
    "country": {
      "code": "ke",
      "name": "Kenya",
      "capital": "Nairobi",
      "region": "East Africa"
    },
    "observations": [
      {
        "metric_key": "inflation_cpi_latest_yoy_pct",
        "name": "Inflation (Latest YoY)",
        "value": 4.8,
        "unit": "percent",
        "year": 2025,
        "frequency": "monthly",
        "source": "cbk_ke_signals",
        "freshness": "current",
        "as_of_period": "2026-01",
        "retrieved_at": "2026-03-09T18:00:00Z"
      },
      {
        "metric_key": "policy_rate_pct",
        "name": "Policy Rate (Latest)",
        "value": 8.75,
        "unit": "percent",
        "year": 2026,
        "frequency": "ad_hoc",
        "source": "cbk_ke_signals",
        "freshness": "recent",
        "as_of_period": "2026-02-10",
        "retrieved_at": "2026-03-09T18:00:00Z"
      },
      {
        "metric_key": "mobile_subscriptions_per_100",
        "name": "Mobile Cellular Subscriptions",
        "value": 118.6,
        "unit": "subscriptions_per_100_people",
        "year": 2024,
        "frequency": "annual",
        "source": "world_bank_wdi",
        "freshness": "recent",
        "retrieved_at": "2026-03-09T11:39:09Z"
      }
    ],
    "fx_rates": [
      {
        "base_currency": "USD",
        "quote_currency": "KES",
        "rate": 129.44,
        "date": "2026-03-08",
        "source": "fx_usd_daily",
        "freshness": "current"
      }
    ],
    "market_snapshots": [
      {
        "exchange_code": "NSE",
        "exchange_name": "Nairobi Securities Exchange",
        "trade_date": "2026-03-08",
        "main_index_value": 127.4,
        "total_volume": 18300000,
        "source": "ngx_market_data",
        "freshness": "current"
      }
    ],
    "trade": {
      "latest_year": 2024,
      "granular_latest_year": 2024,
      "granular_years": [2023, 2024]
    },
    "government": {
      "current_head_of_state": {
        "leader_name": "William Ruto",
        "role_type": "head_of_state"
      }
    },
    "generated_at": "2026-03-09T18:00:00Z"
  }
}

When To Use Signals

Use /v1/countries/{country_code}/signals when you need:

  • a dashboard card payload
  • an agent-friendly current snapshot
  • a compact country summary for operational use

Use /v1/data when you need:

  • full time series
  • multi-country comparisons
  • explicit metric/frequency filtering
  • direct source pinning

Example for a latest monthly signal through the canonical observation endpoint:

Latest Monthly Signal Via /v1/data
curl "https://api.africa-api.com/v1/data?country_code=ke&metric_key=inflation_cpi_latest_yoy_pct&latest=true" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Freshness Model

Each signal carries a simple freshness label:

  • current
  • recent
  • historical

That label is derived from frequency, year, retrieved timestamp, or market/FX trade date.

Signals do not replace the historical observation layer. They are a convenience view over the platform's latest useful country-level state.

Where a central bank source is available, /signals will prefer that country-specific source over a broader global monthly feed for the same latest-signal metric. Today that includes Kenya, South Africa, and Nigeria.

On this page