百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

api-colombia

> 编程语言
开源

包含有关哥伦比亚、各省、城市、旅游景点和总统信息的公共 API

351 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

包含有关哥伦比亚、各省、城市、旅游景点和总统信息的公共 API

API-COLOMBIA

Introduction

API Colombia is a public RESTful API that enables users to access a wide range of public information about the country of Colombia.

Official website: api-colombia.com

VitePress | Swagger | Ask AI about API-Colombia

Read this document in Español

Video Tutorials

Learn how to use API-Colombia with detailed videos that walk you through the API step by step:

▶️ Watch the API-Colombia video playlist on YouTube

Project Support Features

  • Minimal API's endpoints to get information about:
    • General information about the country.
    • Departments/States.
    • Cities.
    • Presidents.
    • Tourist attractions.
    • Natural Areas and Categories.
    • Airports.
    • Holidays.
    • Radio stations.
    • Typical dishes.
    • Traditional fairs and festivals.
    • Intangible heritage.
    • Indigenous reservations.
    • Native communities.
    • Invasive species.
    • Constitution articles.
    • Maps.
    • Urban Centers (Municipal Heads and Populated Centers).
    • Higher Education Institutions (IES).
    • Television channels.
    • Volcanoes.
  • Swagger documentation
  • MCP (Model Context Protocol) server for AI agents — see MCP Server below.
  • Does not require authentication.
  • Multistage Docker build for the API service in api/Dockerfile
  • Multistage Docker build for the docs site in docs/Dockerfile

MCP Server

The API also exposes a built-in Model Context Protocol server, so AI agents can consume the same public Colombia data without learning the REST surface by hand.

  • Endpoint: https://api-colombia.com/api/v1/mcp (Streamable HTTP, stateless, no auth, read-only).
  • Tools: discovery (list_colombia_resources, get_api_reference), generic data tools (list_items, get_item_by_id, get_items_by_name, search_items, list_items_paged, get_country_info) that cover every resource, and relational tools (e.g. get_cities_by_department).
  • Resources: a browsable catalog at colombia://catalog and per-table entries.
  • Browser inspector: a self-contained web tester is served at /mcp (locally https://localhost:7274/mcp) — list and call tools, browse resources, and send raw JSON-RPC, no install required.

See the full guide in docs/mcp.md.

Versions

Changelog - Versions

Installation Guide

  • Clone this repository here.
  • The develop branch is the most stable branch at any given time, please make sure you're working from it.
  • .NET 10 SDK must be installed in the machine.
  • Update the connection string to your preferred database in the "appsettings.json" file.
  • Run the dotnet build command to generate the build of the project.

Documentation

The documentation site is built with VitePress and lives in the docs/ folder.

Prerequisites:

  • Node.js 18+ installed.

Setup:

  • cd docs
  • npm install

Local development:

  • npm run docs:dev Starts the VitePress dev server with hot-reload.

Build static site:

  • npm run docs:build The generated site will be in docs/.vitepress/dist.

Preview built site:

  • npm run docs:preview Useful to simulate a production-like server locally.

Note: Run all the commands above inside the docs/ directory.

Build and Run Containers

API container

Build the API Docker image from the api folder:

bash
docker build -t apicolombia-api ./api

Run the API container:

bash
docker run -p 80:80 apicolombia-api

Docs container

Build the docs Docker image from the docs folder:

bash
docker build -t apicolombia-docs ./docs

Run the docs container:

bash
docker run -p 80:80 apicolombia-docs

Testing

The project includes comprehensive integration tests using xUnit and an in-memory database. The tests verify that all API endpoints work correctly.

Running Tests

To run all tests:

bash
dotnet test

To run tests with coverage:

bash
dotnet test /p:CollectCoverage=true

Test Structure

The integration tests are located in the api.Tests project and use:

  • xUnit as the testing framework
  • CustomWebApplicationFactory to create a test server with an in-memory database
  • Microsoft.AspNetCore.Mvc.Testing for HTTP client testing
  • AutoFixture for test data generation

Each endpoint has corresponding integration tests that verify:

  • Successful responses with correct data
  • Pagination functionality
  • Sorting capabilities
  • Search functionality
  • Error handling (404, 400, etc.)

The test database is seeded with sample data for each entity type, ensuring consistent test results.

Usage

The public page api-colombia.com has useful information about the API and a brief description of the available endpoints and the same allows access to the endpoints described below.

  • Full documentation site: docs.api-colombia.com
  • Swagger documentation can be found at the following URL
  • Ask AI about API-Colombia: DeepGitHub

Projects, Demos, POCs and Samples

Repo Url Description
https://github.com/Mteheran/invasivespecie-colombia https://especiesinvasoras.api-colombia.com/ A portal to consult all invasive species in Colombia
https://github.com/lightbluetitan/colombiapi https://github.com/lightbluetitan/colombiapi ColombiaAPI for R, an R package that consumes the data exposed by api-colombia
https://github.com/JuanPabloDiaz/turismo https://turismo.colombia.jpdiaz.dev Interactive tourism map of Colombia showcasing tourist destinations across the country
https://github.com/JuanPabloDiaz/colombia https://colombia.jpdiaz.dev A web app that offers an interactive and comprehensive exploration of Colombia's geography, culture, biodiversity, and institutions through maps, multimedia, and detailed data from api-colombia.com
https://github.com/duvan-gallego/mcp-api-colombia - MCP (Model Context Protocol) server for API Colombia, enabling AI assistants to access Colombia data
https://github.com/crexative/colombia-mcp-server - Colombia MCP Server - Another MCP implementation for integrating API Colombia with AI tools

API Endpoints

Cities

HTTP Verbs Endpoints Action
GET /api/{version}/city Get the list of all cities
GET /api/{version}/city/{id} Get the information of a city by it is id
GET /api/{version}/city/name/{name} Get the information of a city by it is name
GET /api/{version}/city/search/{keyword} Get the information of a city searching by keyword
GET /api/{version}/city/pagedList Get the list of all cities paginated

Country

HTTP Verbs Endpoints Action
GET /api/{version}/country/Colombia Get the information of Colombia

Departments

HTTP Verbs Endpoints Action
GET /api/{version}/Department Get the list of all departments in Colombia
GET /api/{version}/Department/{id} Get the information of a department by it is id
GET /api/{version}/Department/name/{name} Get the information of a department by it is name
GET /api/{version}/Department/search/{keyword} Get the information of a department searching by keyword
GET /api/{version}/Department/pagedList Get the list of all department paginated

Regions

HTTP Verbs Endpoints Action
GET /api/{version}/Region Get the list of all regions in Colombia

Presidents

HTTP Verbs Endpoints Action
GET /api/{version}/President Get the list of all presidents in Colombia
GET /api/{version}/President/{id} Get the information of a president by it is id
GET /api/{version}/President/name/{name} Get the information of a president by it is name
GET /api/{version}/President/year/{year} Get the information of a president that ruled during a specific year
GET /api/{version}/President/search/{keyword} Get the information of a president searching by keyword
GET /api/{version}/President/pagedList Get the list of all presidents paginated

Tourist Attractions

HTTP Verbs Endpoints Action
GET /api/{version}/TouristicAttraction Get the list of all touristic attractions in Colombia
GET /api/{version}/TouristicAttraction/{id} Get the information of a touristic attraction by it is id
GET /api/{version}/TouristicAttraction/name/{name} Get the information of a touristic attaction by it is name
GET /api/{version}/TouristicAttraction/search/{keyword} Get the information of a touristic attaction searching by keyword
GET /api/{version}/TouristicAttraction/pagedList Get the list of all touristic attractions paginated

Natural Areas

HTTP Verbs Endpoints Action
GET /api/{version}/NaturalArea Get the list of all natural areas in Colombia
GET /api/{version}/NaturalArea/{id} Get the information of a natural area by it is id
GET /api/{version}/NaturalArea/name/{name} Get the information of a natural area by it is name

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#apiapi-restcolombia

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言