> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DIAN Importers and Exporters

> Who imports and exports goods in Colombia: DIAN's yearly directories since 2017, with each company's CIF or FOB value, net weight, declarations and main subpartidas arancelarias.

Every year the Dirección de Impuestos y Aduanas Nacionales (DIAN) publishes two
directories: the importers and the exporters of goods. Each ranks the companies
that traded that year by value, with the CIF value of their imports or the FOB
value of their exports in US dollars, the net weight, how many declarations they
filed, and the five subpartidas arancelarias they traded most. The directories
start in 2017, and the current year's grows as months close. Croma serves every
year of both directories in one search, and a company's whole trade history by
NIT.

<Note>
  The whole source, organized and ready to query: every endpoint on this page answers in milliseconds. Every response carries `as_of`: how current the data is. [How datasets work](/datasets).
</Note>

## Search the directories

`POST /co/dian-trade/directory-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Every year of both directories in one search: by name, flow, year and tariff
code.

| Field         | Type    | Notes                                                                                                                                                                                                  |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `query`       | string  | Optional words matched against the name (razón social) as DIAN prints it.                                                                                                                              |
| `flow`        | enum    | Which directory: `import` (importers, valued CIF), `export` (exporters, valued FOB), or `any`. Default `any`.                                                                                          |
| `year`        | integer | Optional directory year (2017 or later). 0 searches every year. Default `0`.                                                                                                                           |
| `tariff_code` | string  | Optional tariff code, digits only, matched against the five main subpartidas of each row: a 4-digit heading (`8703`), a 6-digit HS subheading (`870323`) or a full 10-digit subpartida (`8703239090`). |
| `page`        | integer | 1-based page number for paginated results. Default `1`.                                                                                                                                                |
| `per_page`    | integer | Results per page (1-100). Default `20`.                                                                                                                                                                |

```bash theme={"dark"}
curl https://api.croma.run/co/dian-trade/directory-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "flow": "import", "year": 2025, "tariff_code": "8703" }'
```

Returns `as_of` (how current the data is), the applied filters, `total`
(matches across every page), `page`, `per_page`, `total_pages`, `count` and
`results[]`: one company's row in one year's directory each, newest year first,
then by value, largest first.

| Field                      | Notes                                                                                                                                                                                       |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                       | The row's identifier: flow, year and NIT (`import-2025-899999068`), or flow, year and rank for a natural person (`import-2025-pn-34409`).                                                   |
| `flow`                     | `import` (the importers directory) or `export` (the exporters directory).                                                                                                                   |
| `year`, `through_month`    | The directory's year and the last month its figures accumulate to: `12` for a closed year, earlier for the current year, whose directory grows as months close.                             |
| `rank`                     | Position in that year's directory, `1` for the largest value.                                                                                                                               |
| `document_number`          | The company's NIT, no verification digit. `null` for a natural person.                                                                                                                      |
| `name`                     | Razón social as DIAN prints it that year.                                                                                                                                                   |
| `natural_person`           | `true` when DIAN publishes the row without identification: `name` reads `PERSONA NATURAL` and `document_number` is `null`.                                                                  |
| `value_usd`, `value_basis` | The year's value in US dollars: `CIF` for imports, `FOB` for exports.                                                                                                                       |
| `net_weight_kg`            | Net weight in kilograms.                                                                                                                                                                    |
| `declarations`             | Imports: the number of import declarations filed. `null` on exports.                                                                                                                        |
| `declaration_items`        | Exports: the number of items (series) across the export declarations, which is not the number of declarations. `null` on imports.                                                           |
| `top_tariff_codes[]`       | Up to five 10-digit subpartidas arancelarias, main first. `top_tariff_headings[]` (4 digits) and `top_tariff_subheadings[]` (6 digits) are the same codes cut to heading and HS subheading. |
| `updated_at`               | The date DIAN last updated that year's directory.                                                                                                                                           |

<Note>
  DIAN publishes natural persons without their identification or name, as
  `PERSONA NATURAL`; those rows are here with their figures, marked
  `natural_person: true`, and no NIT finds them. The current year's directory
  accumulates as months close (`through_month` says to when), and DIAN also
  revises past years, so a company's figures for a year can change.
</Note>

## Company trade profile

`POST /co/dian-trade/profile/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Every year a company imported or exported, from its NIT.

| Field             | Type   | Notes                                                                                   |
| ----------------- | ------ | --------------------------------------------------------------------------------------- |
| `document_number` | string | **Required.** The company's Colombian NIT, numeric, no verification digit. 4-15 digits. |

```bash theme={"dark"}
curl https://api.croma.run/co/dian-trade/profile/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document_number": "899999068" }'
```

Returns `as_of`, `found`, `document_number`, `name` (as the most recent
directory prints it), `years[]` (every year the company appears in either
directory, newest first), `imports[]` and `exports[]`: the company's row in each
year's importers and exporters directory, newest first, with the same fields as a
search result.

<Note>
  A NIT that appears in no directory since 2017 returns `found: false` with HTTP
  200, not an error. A company that only imports has an empty `exports`, and the
  other way around.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>
