Alfil Geografías API

The Geografías API from Alfil — 1 operation(s) for geografías.

Operations 1

GET /v1/geografias Resolver geografías (DIVIPOLA) #

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-geograf-as-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-geograf-as-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alfil Geografías 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: Geografías
paths:
  /v1/geografias:
    get:
      summary: Resolver geografías (DIVIPOLA)
      description: Resuelve nombres de lugares a códigos DIVIPOLA. Reutilizada por electoral/contratación/finanzas.
      tags:
      - Geografías
      parameters:
      - in: query
        name: q
        schema:
          type: string
        description: Nombre a resolver (p. ej. cali)
      - in: query
        name: departamento
        schema:
          type: string
        description: DIVIPOLA del departamento — lista sus municipios
      - in: query
        name: nivel
        schema:
          type: string
          enum:
          - departamento
          - municipio
        description: Nivel a listar
      responses:
        '200':
          description: Entradas geográficas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeografiasResponse'
        '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: getV1Geografias
      x-operation-id-source: derived
components:
  schemas:
    GeografiasResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Geografia'
      required:
      - data
      additionalProperties: false
    Geografia:
      type: object
      properties:
        divipola:
          type: string
          description: Código DIVIPOLA (5 dígitos para municipio)
          example: '76001'
        nombre:
          type: string
          example: Cali
        nivel:
          type: string
          enum:
          - departamento
          - municipio
        departamento:
          type: object
          properties:
            divipola:
              type: string
            nombre:
              type: string
          required:
          - divipola
          - nombre
          additionalProperties: false
      required:
      - divipola
      - nombre
      - nivel
      additionalProperties: false
      description: Entrada geográfica DIVIPOLA
    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
  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