← Agent Data Hub · Search endpoints · /llms.txt

Defense & Military Expenditure (% of GDP) by Country

Official SIPRI / World Bank military and defense spending as a percentage of GDP.

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/macro-military-expenditure-gdp?country=US&compact=1

Full metadata: without compact=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"macro-military-expenditure-gdp"}

Parameters

countryISO-2 country code e.g. US, DE, CH, CN, JP, GB (default: US)

Example response (live, compact)

{
  "apiId": "macro-military-expenditure-gdp",
  "data_freshness": "cached",
  "data": {
    "country": "US",
    "country_name": "United States",
    "indicator": "MS.MIL.XPND.GD.ZS",
    "unit": "% of GDP",
    "latest_year": "2025",
    "latest_value": 3.12,
    "history": [
      {
        "year": "2025",
        "value": 3.12
      },
      {
        "year": "2024",
        "value": 3.43
      },
      {
        "year": "2023",
        "value": 3.29
      },
      {
        "year": "2022",
        "value": 3.3
      },
      {
        "year": "2021",
        "value": 3.4
      }
    ]
  },
  "source": "World Bank Open Data (MS.MIL.XPND.GD.ZS)",
  "license": "World Bank CC-BY 4.0 Open Data"
}

Recorded history available: /api/v1/history/macro-military-expenditure-gdp?country=US

Source & license

SourceWorld Bank Open Data (MS.MIL.XPND.GD.ZS)
LicenseWorld Bank CC-BY 4.0 Open Data
Source URLhttps://api.worldbank.org/v2/country/US/indicator/MS.MIL.XPND.GD.ZS?format=json
Termshttps://www.worldbank.org/en/about/legal/terms-of-use-for-datasets
CategoryFinance & Markets › 6. Macroeconomics & Central Banks