---
id: "es_budget_program_code"
kind: "datatype"
status: "draft"
is_pii: false
name: "Spanish local budget programme code"
regexp: "^[0-49]\\d{0,4}$"
categories: ["government", "finances"]
country: ["ES"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/es_budget_program_code"
---

# Spanish local budget programme code (`es_budget_program_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of the classification by programmes of the budget of a Spanish local entity, which says what an expenditure is for. The order EHA/3565/2008 sets the levels, each a prefix of the next, the area of expenditure (área de gasto, one digit, 1 for basic public services, 2 for social protection, 3 for preferential public goods, 4 for economic actions, 9 for general actions and 0 for public debt), the policy (política de gasto), the group of programmes (132 for public safety) and the programme (1521); an entity may add subprogrammes, so municipal budgets also give five digits (91200). Budget tables give it in columns named cod_programa, programa, cod_funcional or cod_areas_de_gasto.

- Personal data (PII): no
- Categories: Government related (government), Finances and banking (finances)
- Countries: Spain (ES)
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^[0-49]\d{0,4}$
```

## Examples

- `1` — area of expenditure 1, Servicios públicos básicos
- `132` — group of programmes Seguridad y Orden Público
- `1521` — programme Promoción y gestión de vivienda de protección pública
- `91200` — a subprogramme in a municipal budget
- `5210` (invalid example) — no area of expenditure 5

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `esbudgetprogramcodebyname` (field, `es/es_codes.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- es: Código de la clasificación por programas del presupuesto local
- ru: Код программной классификации местного бюджета (Испания)

## Sources

- doc: <https://www.boe.es/buscar/act.php?id=BOE-A-2008-19916>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/es_budget_program_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/government/es_budget_program_code.yaml>
