Alfil Finanzas API

The Finanzas API from Alfil — 1 operation(s) for finanzas.

Operations 1

GET /v1/finanzas/territoriales Finanzas territoriales #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alfil-co:alfil-co-finanzas-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alfil-co-finanzas-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alfil Finanzas API
  version: v1
  description: API pública de transparencia política de Alfil. Read-only. Cada respuesta incluye su fuente oficial y fecha de corte. Ver la política de datos personales en ADR-020.
servers:
- url: https://api.alfil.co
security:
- oauth2:
  - buscar:read
tags:
- name: Finanzas
paths:
  /v1/finanzas/territoriales:
    get:
      summary: Finanzas territoriales
      tags:
      - Finanzas
      parameters:
      - in: query
        name: entidad
        schema:
          type: string
        description: DIVIPOLA o nombre de la entidad territorial
      - in: query
        name: anio
        schema:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        description: Año fiscal
      responses:
        '200':
          description: Presupuesto y ejecución (CUIPO)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinanzasResponse'
        '401':
          description: Token faltante, expirado o de emisor inesperado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Scope insuficiente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Cuota agotada o rate limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1FinanzasTerritoriales
      x-operation-id-source: derived
components:
  schemas:
    FinanzaTerritorial:
      type: object
      properties:
        entidad:
          type: string
        anio:
          type: number
        presupuesto_cop:
          type: string
          description: Presupuesto en COP (bigint como string)
        ejecutado_cop:
          type: string
          description: Ejecutado en COP (bigint como string)
      required:
      - entidad
      - anio
      - presupuesto_cop
      - ejecutado_cop
      additionalProperties: false
    Page:
      type: object
      properties:
        cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor opaco de la siguiente página; null si no hay más
        has_more:
          type: boolean
          description: Indica si existen más resultados
      required:
      - cursor
      - has_more
      additionalProperties: false
      description: Paginación por cursor opaco (no offset)
    FinanzasResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FinanzaTerritorial'
        page:
          $ref: '#/components/schemas/Page'
        fuente:
          $ref: '#/components/schemas/Fuente'
      required:
      - data
      - page
      - fuente
      additionalProperties: false
      description: Finanzas territoriales (CUIPO/DNP)
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Código de error estable (ASCII)
              example: quota_exceeded
            message:
              type: string
            metric:
              type: string
            resetAt:
              type: string
          required:
          - code
          additionalProperties: false
      required:
      - error
      additionalProperties: false
    Fuente:
      type: object
      properties:
        nombre:
          type: string
          description: Fuente oficial del dato
          example: SECOP II — datos.gov.co
        url:
          description: URL de la fuente oficial
          type: string
        corte:
          type: string
          description: Fecha de corte del dato (ISO 8601)
          example: '2026-07-09'
        licencia:
          description: Licencia de la fuente
          example: CC BY-SA 4.0
          type: string
      required:
      - nombre
      - corte
      additionalProperties: false
      description: 'Proveniencia: fuente oficial y fecha de corte (atribución Ley 1712)'
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.1 con la cuenta Alfil (Supabase Auth como authorization server).
      flows:
        authorizationCode:
          authorizationUrl: https://api.alfil.co/oauth/authorize
          tokenUrl: https://api.alfil.co/oauth/token
          scopes:
            buscar:read: Búsqueda federada
            politicos:read: Perfiles y búsqueda de políticos
            partidos:read: Perfiles de partidos
            contratos:read: Contratación SECOP
            electoral:read: Resultados electorales
            congreso:read: Actividad legislativa
            finanzas:read: Finanzas públicas territoriales
            geografias:read: Catálogo DIVIPOLA