Alfil Congreso API
The Congreso API from Alfil — 5 operation(s) for congreso.
The Congreso API from Alfil — 5 operation(s) for congreso.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/alfil-co:alfil-co-congreso-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Alfil Congreso 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: Congreso
paths:
/v1/congreso/actividad:
get:
summary: Actividad del Congreso
description: Votaciones, proyectos y autorías (atribución Congreso Visible — Uniandes).
tags:
- Congreso
parameters:
- in: query
name: cursor
schema:
type: string
description: Cursor de paginación
- in: query
name: limit
schema:
default: 25
type: integer
minimum: 1
maximum: 100
description: Máximo de resultados (1-100, default 25)
- in: query
name: politico
schema:
type: string
description: Slug del congresista
- in: query
name: tipo
schema:
type: string
enum:
- votacion
- proyecto
- autoria
description: Tipo de actividad
responses:
'200':
description: Actividad legislativa
content:
application/json:
schema:
$ref: '#/components/schemas/CongresoResponse'
'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: getV1CongresoActividad
x-operation-id-source: derived
/v1/congreso/votaciones:
get:
summary: Buscar votaciones del Congreso
description: Votaciones nominales por tema (vocabulario cerrado) y fecha, con el id que acepta el detalle.
tags:
- Congreso
parameters:
- in: query
name: cursor
schema:
default: 0
type: integer
minimum: 0
maximum: 9007199254740991
description: Cursor de paginación (posición desde la que continuar)
- in: query
name: limit
schema:
default: 25
type: integer
minimum: 1
maximum: 100
description: Máximo de resultados (1-100, default 25)
- in: query
name: tema
schema:
type: string
enum:
- Paz y posconflicto
- Reforma pensional
- Reforma laboral
- Reforma a la salud
- Presupuesto y hacienda
- Justicia
- Seguridad y defensa
- Ambiente y clima
- Educación
- Derechos humanos
- Tierras y agro
- Anticorrupción
- Régimen político
- Relaciones exteriores
- Vivienda y territorio
- Transporte e infraestructura
- Economía y comercio
- Honores y conmemoraciones
description: Tema legislativo (vocabulario cerrado)
responses:
'200':
description: Votaciones en listado
content:
application/json:
schema:
$ref: '#/components/schemas/VotacionesResponse'
'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: getV1CongresoVotaciones
x-operation-id-source: derived
/v1/congreso/votaciones/{id}:
get:
summary: Detalle de una votación del Congreso
description: Resultado, conteo y la respuesta tipada de cada miembro (atribución Congreso Visible — Uniandes).
tags:
- Congreso
parameters:
- in: path
name: id
schema:
type: string
minLength: 1
pattern: ^[1-9]\d*$
description: Id de la votación
required: true
responses:
'200':
description: Detalle de la votación
content:
application/json:
schema:
$ref: '#/components/schemas/VotoDetalle'
'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: getV1CongresoVotacionesById
x-operation-id-source: derived
/v1/congreso/proyectos/{slug}:
get:
summary: Detalle de un proyecto de ley
description: Estado, autores y votaciones que referenciaron el proyecto (atribución Congreso Visible — Uniandes).
tags:
- Congreso
parameters:
- in: path
name: slug
schema:
type: string
minLength: 1
description: Slug público del proyecto de ley
required: true
responses:
'200':
description: Detalle del proyecto de ley
content:
application/json:
schema:
$ref: '#/components/schemas/ProyectoDetalle'
'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: getV1CongresoProyectosBySlug
x-operation-id-source: derived
/v1/congreso/congresistas/{slug}/votos:
get:
summary: Registro de votación de un congresista
description: Historial de votos de un congresista, con el proyecto referenciado en cada uno.
tags:
- Congreso
parameters:
- in: path
name: slug
schema:
type: string
minLength: 1
description: Slug público del congresista
required: true
responses:
'200':
description: Registro de votación
content:
application/json:
schema:
$ref: '#/components/schemas/CongresistaVotosResponse'
'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: getV1CongresoCongresistasBySlugVotos
x-operation-id-source: derived
components:
schemas:
ActividadCongreso:
type: object
properties:
tipo:
type: string
enum:
- votacion
- proyecto
- autoria
titulo:
type: string
fecha:
anyOf:
- type: string
- type: 'null'
detalle:
type: string
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- tipo
- titulo
- fecha
- referencias
additionalProperties: false
CongresistaProyectoReferenciado:
type: object
properties:
id:
type: string
titulo:
type: string
slug:
anyOf:
- type: string
- type: 'null'
required:
- id
- titulo
- slug
additionalProperties: false
VotoIndividual:
type: object
properties:
votante_nombre:
anyOf:
- type: string
- type: 'null'
congresista_id:
anyOf:
- type: string
- type: 'null'
politico_id:
anyOf:
- type: string
- type: 'null'
respuesta:
type: string
enum:
- favor
- contra
- abstencion
- ausente
- presente
- no_aplica
required:
- votante_nombre
- congresista_id
- politico_id
- respuesta
additionalProperties: false
description: Respuesta de un miembro del Congreso a una votación nominal
ProyectoDetalle:
type: object
properties:
id:
type: string
slug:
type: string
titulo:
type: string
estado:
anyOf:
- type: string
- type: 'null'
autores:
type: array
items:
$ref: '#/components/schemas/AutorProyecto'
autores_truncados:
type: boolean
description: true si la lista de autores se cortó al límite de lectura
votaciones:
type: array
items:
$ref: '#/components/schemas/VotacionProyecto'
votaciones_truncadas:
type: boolean
description: true si la lista de votaciones que referenciaron el proyecto se cortó al límite de lectura
fuente:
$ref: '#/components/schemas/Fuente'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- id
- slug
- titulo
- estado
- autores
- autores_truncados
- votaciones
- votaciones_truncadas
- fuente
- referencias
additionalProperties: false
description: Proyecto de ley con su estado, autores y votaciones que lo referenciaron (atribución Congreso Visible — Uniandes)
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)
CongresistaVotosResponse:
type: object
properties:
congresista:
$ref: '#/components/schemas/CongresistaPerfil'
data:
type: array
items:
$ref: '#/components/schemas/CongresistaVoto'
truncado:
type: boolean
description: true si el historial de votos se cortó al límite de lectura
fuente:
$ref: '#/components/schemas/Fuente'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- congresista
- data
- truncado
- fuente
- referencias
additionalProperties: false
description: Registro de votación de un congresista (atribución Congreso Visible — Uniandes)
VotoDetalle:
type: object
properties:
id:
type: string
fecha:
anyOf:
- type: string
- type: 'null'
es_nominal:
type: boolean
aprobada:
anyOf:
- type: boolean
- type: 'null'
conteo:
$ref: '#/components/schemas/VotoConteo'
individuales:
oneOf:
- type: object
properties:
estado_fuente:
type: string
const: sin_registro_nominal
registros:
type: 'null'
required:
- estado_fuente
- registros
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: ok
registros:
type: array
items:
$ref: '#/components/schemas/VotoIndividual'
truncado:
type: boolean
description: true si la lista de respuestas se cortó al límite de lectura; el conteo (favor/contra/abstención) sigue siendo la fuente de verdad para el resultado
required:
- estado_fuente
- registros
- truncado
additionalProperties: false
type: object
fuente:
$ref: '#/components/schemas/Fuente'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- id
- fecha
- es_nominal
- aprobada
- conteo
- individuales
- fuente
- referencias
additionalProperties: false
description: Detalle de una votación del Congreso, con la respuesta de cada miembro (atribución Congreso Visible — Uniandes)
Referencia:
type: object
properties:
tipo:
type: string
enum:
- pagina_alfil
- registro_oficial
- documento_oficial
- coleccion_oficial
titulo:
type: string
url:
type: string
pattern: ^[hH][tT][tT][pP][sS]:\/\/[^/?#@]+(?:[/?#].*)?$
format: uri
proveedor:
type: string
id_externo:
type: string
required:
- tipo
- titulo
- url
- proveedor
additionalProperties: false
description: Enlace HTTPS navegable a Alfil o a una fuente oficial
AutorProyecto:
type: object
properties:
congresista_id:
type: string
nombre:
type: string
tipo_autoria:
anyOf:
- type: string
- type: 'null'
required:
- congresista_id
- nombre
- tipo_autoria
additionalProperties: false
description: Autor de un proyecto de ley; la lista completa es la fuente de verdad, sin autor principal invocado
CongresoResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ActividadCongreso'
page:
$ref: '#/components/schemas/Page'
fuente:
$ref: '#/components/schemas/Fuente'
required:
- data
- page
- fuente
additionalProperties: false
description: Actividad del Congreso (atribución Congreso Visible — Uniandes)
VotoConteo:
type: object
properties:
favor:
anyOf:
- type: number
- type: 'null'
contra:
anyOf:
- type: number
- type: 'null'
abstencion:
anyOf:
- type: number
- type: 'null'
required:
- favor
- contra
- abstencion
additionalProperties: false
CongresistaVoto:
type: object
properties:
votacion_id:
type: string
fecha:
anyOf:
- type: string
- type: 'null'
respuesta:
type: string
enum:
- favor
- contra
- abstencion
- ausente
- presente
- no_aplica
proyecto:
anyOf:
- $ref: '#/components/schemas/CongresistaProyectoReferenciado'
- type: 'null'
required:
- votacion_id
- fecha
- respuesta
- proyecto
additionalProperties: false
description: Voto de un congresista, con el proyecto que referenció (null cuando la votación no tenía proyecto vinculado)
VotacionListItem:
type: object
properties:
id:
type: string
motivo:
anyOf:
- type: string
- type: 'null'
fecha:
anyOf:
- type: string
- type: 'null'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- id
- motivo
- fecha
- referencias
additionalProperties: false
description: Votación en listado, con el id que acepta el detalle de la votación
VotacionesResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/VotacionListItem'
page:
$ref: '#/components/schemas/Page'
fuente:
$ref: '#/components/schemas/Fuente'
required:
- data
- page
- fuente
additionalProperties: false
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
CongresistaPerfil:
type: object
properties:
id:
type: string
nombre:
type: string
slug:
type: string
politico_id:
type: string
required:
- id
- nombre
- slug
additionalProperties: false
VotacionProyecto:
type: object
properties:
id:
type: string
fecha:
anyOf:
- type: string
- type: 'null'
motivo:
anyOf:
- type: string
- type: 'null'
required:
- id
- fecha
- motivo
additionalProperties: false
description: Votación que referenció el proyecto; el id acepta el detalle de votación
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