> ## Documentation Index
> Fetch the complete documentation index at: https://help.impactu.colav.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Search geographic entities

> Paginated search of cities and departments of Colombia.

## Path parameters

**geo\_type** `string` *required*

Geographic entity type: `city` (cities) or `state` (departments).
Any other value returns a 400 error.

## Query parameters

**keywords** `string`

Search text (name of the city or department).

**max** `integer` (default: 10)

Results per page (1 to 250).

**page** `integer` (default: 1)

Page number (minimum 1).

**sort** `string` (default: citations\_desc)

Ascending or descending sort criterion, for example `citations_desc`,
`products_asc` or `alphabetical_desc`.

**sort** `string`

Sort with the format `field_direction`, where the direction is `asc` or
`desc`. For geographic entities, `alphabetical` sorts by name. Example:
`alphabetical_asc`.

> [!NOTE]
>
> This endpoint has no filters.

## Response

The structure changes with `geo_type`. The common fields are:

**data** `array`

List of geographic entities.

**properties of each entity**

**id** `string`

Identifier (DANE code).

**name** `string`

Name.

**type** `string`

`city` or `state`.

**country** `string`

Country.

**country\_code** `string`

Country code (for example, `CO`).

**external\_ids** `object[]`

External identifiers (`id`, `source`), such as the DANE code.

**authors\_count** `integer`

Number of authors.

**groups\_count** `integer`

Number of research groups.

**institutions\_count** `integer`

Number of institutions.

**products\_count** `integer`

Number of products.

**citations\_count** `object[]`

Citations by source (`count`, `source`).

**state** `object`

Only with `city`: the department it belongs to (`id`, `name`).

**latitude** `number`

Only with `city`: latitude.

**longitude** `number`

Only with `city`: longitude.

**cities\_count** `integer`

Only with `state`: number of cities.

**meta** `object`

Response metadata.

**properties**

**count** `integer`

Total number of results matching the query.

**page** `integer`

Current page.

**size** `integer`

Number of results returned on this page.

**db\_response\_time\_ms** `integer`

Database response time in milliseconds.

**cursor** `object`

**properties**

**next** `string | null`

URL of the next page.

**previous** `string | null`

URL of the previous page.

```json 200 — City theme={null}
{
  "data": [
    {
      "authors_count": 0,
      "citations_count": [{"count": 0, "source": "openalex"}],
      "country": "Colombia",
      "country_code": "CO",
      "external_ids": [{"id": "20011", "source": "dane"}],
      "groups_count": 5,
      "id": "20011",
      "institutions_count": 1,
      "latitude": 8.306811,
      "longitude": -73.614027,
      "name": "Aguachica",
      "products_count": 265,
      "state": {"id": "20", "name": "Cesar"},
      "type": "city"
    },
    {
      "authors_count": 0,
      "citations_count": [],
      "country": "Colombia",
      "country_code": "CO",
      "external_ids": [{"id": "15022", "source": "dane"}],
      "groups_count": 1,
      "id": "15022",
      "institutions_count": 2,
      "latitude": 4.970857,
      "longitude": -73.378933,
      "name": "Almeida",
      "products_count": 0,
      "state": {"id": "15", "name": "Boyacá"},
      "type": "city"
    }
  ],
  "meta": {
    "count": 135,
    "cursor": {"next": "https://api.dev.impactu.colav.co/search/geo/city?max=2&page=2", "previous": null},
    "db_response_time_ms": 25,
    "page": 1,
    "size": 2
  }
}
```

```json 200 — Department theme={null}
{
  "data": [
    {
      "authors_count": 221,
      "citations_count": [{"count": 9907, "source": "openalex"}],
      "cities_count": 1,
      "country": "Colombia",
      "country_code": "CO",
      "external_ids": [{"id": "91", "source": "dane"}],
      "groups_count": 552,
      "id": "91",
      "institutions_count": 3,
      "name": "Amazonas",
      "products_count": 571,
      "type": "state"
    },
    {
      "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": 31,
    "cursor": {"next": "https://api.dev.impactu.colav.co/search/geo/state?max=2&page=2", "previous": null},
    "db_response_time_ms": 25,
    "page": 1,
    "size": 2
  }
}
```

```json 400 theme={null}
{"error": "Invalid geo_type. Allowed values: city, state"}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.