Alfil Políticos API
The Políticos API from Alfil — 2 operation(s) for políticos.
The Políticos API from Alfil — 2 operation(s) for políticos.
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-pol-ticos-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 Políticos 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: Políticos
paths:
/v1/politicos:
get:
summary: Buscar políticos
tags:
- Políticos
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: q
schema:
type: string
description: Nombre del político
- in: query
name: partido
schema:
type: string
description: Filtrar por partido
- in: query
name: cargo
schema:
type: string
description: Filtrar por cargo
responses:
'200':
description: Políticos en listado
content:
application/json:
schema:
$ref: '#/components/schemas/PoliticosBuscarResponse'
'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: getV1Politicos
x-operation-id-source: derived
/v1/politicos/{slug}:
get:
summary: Perfil de político
description: Incluye cédula + cedula_fuente si hay participación política pública (ADR-020).
tags:
- Políticos
parameters:
- in: path
name: slug
schema:
type: string
description: Slug público del político
required: true
responses:
'200':
description: Perfil del político
content:
application/json:
schema:
$ref: '#/components/schemas/PoliticoPerfil'
'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: getV1PoliticosBySlug
x-operation-id-source: derived
components:
schemas:
Sancion:
type: object
properties:
tipo:
type: string
estado:
type: string
enum:
- vigente
- historica
fecha:
anyOf:
- type: string
- type: 'null'
fuente:
type: string
verificado:
description: Fecha de última verificación
type: string
required:
- tipo
- estado
- fecha
- fuente
additionalProperties: false
description: Sanción contextualizada (con estado vigente/histórica)
PoliticosBuscarResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PoliticoListItem'
page:
$ref: '#/components/schemas/Page'
fuente:
$ref: '#/components/schemas/Fuente'
required:
- data
- page
- fuente
additionalProperties: false
ResponsabilidadFiscal:
type: object
properties:
entidad:
type: string
tipo_sancion:
type: string
tema:
anyOf:
- type: string
- type: 'null'
fecha_resolucion:
anyOf:
- type: string
- type: 'null'
monto:
anyOf:
- type: string
- type: 'null'
estado:
type: string
enum:
- ACTIVA
- ARCHIVADA
- NO_DETERMINADA
required:
- entidad
- tipo_sancion
- tema
- fecha_resolucion
- monto
- estado
additionalProperties: false
description: Responsabilidad fiscal contextualizada (Contraloría)
PoliticoPerfil:
anyOf:
- type: object
properties:
slug:
type: string
nombre:
type: string
partido:
anyOf:
- type: string
- type: 'null'
trayectoria:
type: array
items:
$ref: '#/components/schemas/Cargo'
sanciones:
oneOf:
- type: object
properties:
estado_fuente:
type: string
const: no_consultado
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: 'null'
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: ok
registros:
type: array
items:
$ref: '#/components/schemas/Sancion'
fuente:
type: string
corte:
type: string
consultado_en:
type: string
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: error
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: string
error:
type: object
properties:
codigo:
type: string
const: FUENTE_NO_DISPONIBLE
mensaje:
type: string
const: No se pudo consultar en este momento
required:
- codigo
- mensaje
additionalProperties: false
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
type: object
responsabilidad_fiscal:
oneOf:
- type: object
properties:
estado_fuente:
type: string
const: no_consultado
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: 'null'
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: ok
registros:
type: array
items:
$ref: '#/components/schemas/ResponsabilidadFiscal'
fuente:
type: string
corte:
type: string
consultado_en:
type: string
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: error
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: string
error:
type: object
properties:
codigo:
type: string
const: FUENTE_NO_DISPONIBLE
mensaje:
type: string
const: No se pudo consultar en este momento
required:
- codigo
- mensaje
additionalProperties: false
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
type: object
fuente:
$ref: '#/components/schemas/Fuente'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
cedula:
type: string
pattern: ^[1-9]\d{5,11}$
description: Presente con participación política pública; dato público (T-254/24)
cedula_fuente:
type: string
pattern: ^\S(?:[\s\S]*\S)?$
description: Fuente de la cédula (trazabilidad)
example: Registraduría E-6 2026
required:
- slug
- nombre
- partido
- trayectoria
- sanciones
- responsabilidad_fiscal
- fuente
- referencias
- cedula
- cedula_fuente
additionalProperties: false
- type: object
properties:
slug:
type: string
nombre:
type: string
partido:
anyOf:
- type: string
- type: 'null'
trayectoria:
type: array
items:
$ref: '#/components/schemas/Cargo'
sanciones:
oneOf:
- type: object
properties:
estado_fuente:
type: string
const: no_consultado
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: 'null'
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: ok
registros:
type: array
items:
$ref: '#/components/schemas/Sancion'
fuente:
type: string
corte:
type: string
consultado_en:
type: string
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: error
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: string
error:
type: object
properties:
codigo:
type: string
const: FUENTE_NO_DISPONIBLE
mensaje:
type: string
const: No se pudo consultar en este momento
required:
- codigo
- mensaje
additionalProperties: false
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
type: object
responsabilidad_fiscal:
oneOf:
- type: object
properties:
estado_fuente:
type: string
const: no_consultado
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: 'null'
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: ok
registros:
type: array
items:
$ref: '#/components/schemas/ResponsabilidadFiscal'
fuente:
type: string
corte:
type: string
consultado_en:
type: string
error:
type: 'null'
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
- type: object
properties:
estado_fuente:
type: string
const: error
registros:
type: 'null'
fuente:
type: string
corte:
type: 'null'
consultado_en:
type: string
error:
type: object
properties:
codigo:
type: string
const: FUENTE_NO_DISPONIBLE
mensaje:
type: string
const: No se pudo consultar en este momento
required:
- codigo
- mensaje
additionalProperties: false
required:
- estado_fuente
- registros
- fuente
- corte
- consultado_en
- error
additionalProperties: false
type: object
fuente:
$ref: '#/components/schemas/Fuente'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
cedula:
type: 'null'
description: Omitida cuando no hay participación política pública respaldada
cedula_fuente:
type: 'null'
description: Omitida junto con la cédula
required:
- slug
- nombre
- partido
- trayectoria
- sanciones
- responsabilidad_fiscal
- fuente
- referencias
- cedula
- cedula_fuente
additionalProperties: false
description: Perfil de político (sin datos de contacto semiprivados)
PoliticoListItem:
type: object
properties:
slug:
type: string
nombre:
type: string
partido:
anyOf:
- type: string
- type: 'null'
cargo:
anyOf:
- type: string
- type: 'null'
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
required:
- slug
- nombre
- partido
- cargo
- referencias
additionalProperties: false
description: Político en listado (sin cédula)
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)
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
Cargo:
type: object
properties:
titulo:
type: string
desde:
anyOf:
- type: string
- type: 'null'
hasta:
anyOf:
- type: string
- type: 'null'
fuente:
type: string
required:
- titulo
- desde
- hasta
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
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