Alfil Búsqueda API
The Búsqueda API from Alfil — 1 operation(s) for búsqueda.
The Búsqueda API from Alfil — 1 operation(s) for búsqueda.
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-b-squeda-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 Búsqueda 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: Búsqueda
paths:
/v1/buscar:
get:
summary: Búsqueda federada
description: Descubre y desambigua sobre políticos, partidos, contratos e investigaciones.
tags:
- Búsqueda
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
minLength: 2
description: Término de búsqueda (mín. 2 caracteres)
required: true
- in: query
name: tipos
schema:
type: array
items:
type: string
enum:
- politico
- partido
- contrato
- investigacion
description: Filtrar por tipo de entidad
- in: query
name: response_format
schema:
default: concise
type: string
enum:
- concise
- detailed
description: detailed agrega el bloque acciones a cada resultado
responses:
'200':
description: Resultados de búsqueda
content:
application/json:
schema:
$ref: '#/components/schemas/BuscarResponse'
'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: getV1Buscar
x-operation-id-source: derived
components:
schemas:
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)
AccionSugerida:
type: object
properties:
tool:
type: string
description: Tool MCP para profundizar
example: alfil_politico_perfil
args:
type: object
propertyNames:
type: string
additionalProperties:
type: string
description: Argumentos ya armados
required:
- tool
- args
additionalProperties: false
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
ResultadoBusqueda:
type: object
properties:
tipo:
type: string
enum:
- politico
- partido
- contrato
- investigacion
id:
type: string
description: Conector tipado a la tool de detalle
example: gustavo-bolivar
titulo:
type: string
resumen:
type: string
destacado:
description: Campos de desambiguación por tipo
type: object
propertyNames:
type: string
additionalProperties:
type: string
url:
type: string
referencias:
type: array
items:
$ref: '#/components/schemas/Referencia'
acciones:
description: Solo en response_format=detailed
type: array
items:
$ref: '#/components/schemas/AccionSugerida'
required:
- tipo
- id
- titulo
- resumen
- url
- referencias
additionalProperties: false
BuscarResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ResultadoBusqueda'
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
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