Obtener entidad geográfica
curl --request GET \
--url https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}import requests
url = "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"authors_count": 43836,
"citations_count": [{"count": 1172650, "source": "openalex"}],
"cities_count": 22,
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05", "source": "dane"}],
"groups_count": 1117,
"id": "05",
"institutions_count": 178,
"name": "Antioquia",
"products_count": 295187,
"type": "state"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{
"data": {
"authors_count": 40431,
"citations_count": [{"count": 1103485, "source": "openalex"}],
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05001", "source": "dane"}],
"groups_count": 1020,
"id": "05001",
"institutions_count": 131,
"latitude": 6.246631,
"longitude": -75.581775,
"name": "Medellín",
"products_count": 275779,
"state": {"id": "05", "name": "Antioquia"},
"type": "city"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{"error": "The geolocation with id 99999 does not exist."}
Geo
Obtener entidad geográfica
Devuelve una entidad geográfica (departamento o ciudad) a partir de su código DANE.
GET
/
geo
/
{geo_type}
/
{geo_id}
Obtener entidad geográfica
curl --request GET \
--url https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}import requests
url = "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.impactu.colav.co/geo/{geo_type}/{geo_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"authors_count": 43836,
"citations_count": [{"count": 1172650, "source": "openalex"}],
"cities_count": 22,
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05", "source": "dane"}],
"groups_count": 1117,
"id": "05",
"institutions_count": 178,
"name": "Antioquia",
"products_count": 295187,
"type": "state"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{
"data": {
"authors_count": 40431,
"citations_count": [{"count": 1103485, "source": "openalex"}],
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05001", "source": "dane"}],
"groups_count": 1020,
"id": "05001",
"institutions_count": 131,
"latitude": 6.246631,
"longitude": -75.581775,
"name": "Medellín",
"products_count": 275779,
"state": {"id": "05", "name": "Antioquia"},
"type": "city"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{"error": "The geolocation with id 99999 does not exist."}
Parámetros de ruta
string
requerido
Tipo de entidad geográfica. Valores permitidos:
state (departamento) o city (ciudad).string
requerido
Código DANE de la entidad. Ejemplos:
05 para Antioquia (state), 05001
para Medellín (city).view no aplica a las entidades geográficas.
Respuesta
object
La entidad geográfica solicitada.
Mostrar propiedades
Mostrar propiedades
string
Código DANE de la entidad.
string
Nombre de la entidad.
string
Tipo:
state o city.string
País al que pertenece.
string
Código ISO 3166-1 alpha-2 del país.
object | null
Departamento al que pertenece la ciudad (
id, name). Solo presente
cuando geo_type es city.number | null
Latitud. Solo presente cuando
geo_type es city.number | null
Longitud. Solo presente cuando
geo_type es city.object[]
Identificadores externos (
id, source). Por ejemplo, el código DANE.object[]
Citas totales de los productos asociados, por fuente (
count, source).integer
Número de productos bibliográficos asociados.
integer
Número de autores asociados.
integer
Número de instituciones asociadas.
integer
Número de grupos de investigación asociados.
integer | null
Número de ciudades asociadas. Solo presente cuando
geo_type es state.object
Metadatos de la consulta, con la misma forma que en los listados:
count y
size valen 1, page vale 1, cursor.next y cursor.previous son
null, y db_response_time_ms es el tiempo de respuesta de la base de datos.{
"data": {
"authors_count": 43836,
"citations_count": [{"count": 1172650, "source": "openalex"}],
"cities_count": 22,
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05", "source": "dane"}],
"groups_count": 1117,
"id": "05",
"institutions_count": 178,
"name": "Antioquia",
"products_count": 295187,
"type": "state"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{
"data": {
"authors_count": 40431,
"citations_count": [{"count": 1103485, "source": "openalex"}],
"country": "Colombia",
"country_code": "CO",
"external_ids": [{"id": "05001", "source": "dane"}],
"groups_count": 1020,
"id": "05001",
"institutions_count": 131,
"latitude": 6.246631,
"longitude": -75.581775,
"name": "Medellín",
"products_count": 275779,
"state": {"id": "05", "name": "Antioquia"},
"type": "city"
},
"meta": {"count": 1, "cursor": {"next": null, "previous": null}, "db_response_time_ms": 25, "page": 1, "size": 1}
}
{"error": "The geolocation with id 99999 does not exist."}