# European Government Deficit/Surplus as % of GDP (Eurostat)

> European Government Deficit/Surplus as % of GDP (Eurostat) is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-16).

Returns the annual government deficit or surplus as a percentage of GDP for a specified European country, or a ranking of all countries, sourced from official Eurostat data.

## Facts

- Endpoint: POST https://api.vextorium.com/deficit-ue-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/european-government-deficit-surplus-as-of-gdp-eurostat-8a33b944
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lg6pGyruBU8Fln5o-uyzt

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 european-government-deficit-surplus-as-of-gdp-eurostat-8a33b944 -d '<json body>'
```

Example prompt: What is Spain's annual government deficit as a percentage of GDP for the last 5 years, using official Eurostat data?

## When to prefer this

Choose this endpoint when you need official, Eurostat-sourced government fiscal balance data (deficit or surplus as % of GDP) for any European country or EU/Eurozone aggregate. Prefer it over general economic databases when you need reliable, citable government statistics with historical time series for European nations specifically. Ideal for compliance checks against EU fiscal rules, country comparisons, or trend analysis.

## Known failure modes

- Invalid or unsupported country ISO code returns an error or empty result
- Requesting data for a non-European country not covered by Eurostat
- Missing required 'input' wrapper in the request body causes a validation error
- Eurostat data not yet published for the most recent year may return incomplete series
- Network timeout or upstream Eurostat API unavailability

## How this service works

Annual government deficit (-) or surplus (+) as % of GDP for any European country; without a country, a ranking. Official Eurostat data.

## Output

A JSON object containing the country ISO code, full country name, a time series of annual deficit/surplus values as % of GDP (each with a period label and numeric value), the most recent year's figure, the Eurostat data source citation, and the timestamp of the last update. If no country is specified, returns a ranking of all European countries.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pais": {
   "type": "string",
   "description": "ISO code (ES, DE, FR...), EU, EA or omit for a ranking of all countries"
  },
  "anios": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "pais": "ES",
  "serie": [
   {
    "periodo": "2021",
    "saldo_pct_pib": -6.7
   },
   {
    "periodo": "2022",
    "saldo_pct_pib": -4.6
   },
   {
    "periodo": "2023",
    "saldo_pct_pib": -3.3
   },
   {
    "periodo": "2024",
    "saldo_pct_pib": -3.2
   },
   {
    "periodo": "2025",
    "saldo_pct_pib": -2.4
   }
  ],
  "fuente": "Eurostat (gov_10dd_edpt1, CC BY 4.0)",
  "nombre": "Spain",
  "ultimo": {
   "periodo": "2025",
   "saldo_pct_pib": -2.4
  },
  "actualizado": "2026-04-22T11:00:00+0200"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/european-government-deficit-surplus-as-of-gdp-eurostat-8a33b944/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
