# Conferir a cobertura de dados

Source: https://won.dev/pt-BR/docs/trade/coverage-get

`GET https://api.won.dev/v1/trade/coverage`

Mostra o que existe para um país antes de você gastar qualquer coisa: se lá são declarados registros de embarque de importação e de exportação, se eles trazem valores, quais datas cobrem e se dá para consultar estatísticas oficiais. É grátis. Um país sem registros próprios (`records: false`) ainda aparece nas buscas, mas só pelas declarações dos parceiros comerciais, então as contagens dele ficam incompletas. Sem `country`, lista os países com registros próprios ou estatísticas oficiais, e `notice` conta os demais.

- **Cobrança:** Grátis.
- **Modo:** `proxy` ([o que cada modo significa](/pt-BR/docs/trade#modes))

## Parâmetros [#parameters]

Os parâmetros vão na query string, com listas separadas por vírgula.

| Parâmetro | Tipo | Obrigatório | Descrição (texto original da API) |
| --- | --- | --- | --- |
| `country` | string | não | The country to check. Leave it out to list all. An ISO code such as `US`, or an English name such as `United States`. |

## Resposta [#response]

Os erros estão descritos em [Erros](/pt-BR/docs/errors).

| Campo | Tipo | Descrição (texto original da API) |
| --- | --- | --- |
| `data` | object[] | One entry for each country. |
| `data[].country` | string | ISO 3166-1 alpha-2 country code, such as `US`. |
| `data[].imports` | object | Records of goods imported into the country. |
| `data[].imports.records` | boolean \| null | Whether shipment records declared in this country exist. Null when not known yet. |
| `data[].imports.values` | boolean \| null | Whether those records carry declared values. Null when not known yet. |
| `data[].imports.earliest` | string \| null | Date of the earliest record seen, `YYYY-MM-DD`. |
| `data[].imports.latest` | string \| null | Date of the latest record seen, `YYYY-MM-DD`. |
| `data[].imports.note` | string \| null | Something to know about these records, such as a gap or a late start. |
| `data[].exports` | object | Records of goods exported from the country. |
| `data[].exports.records` | boolean \| null | Whether shipment records declared in this country exist. Null when not known yet. |
| `data[].exports.values` | boolean \| null | Whether those records carry declared values. Null when not known yet. |
| `data[].exports.earliest` | string \| null | Date of the earliest record seen, `YYYY-MM-DD`. |
| `data[].exports.latest` | string \| null | Date of the latest record seen, `YYYY-MM-DD`. |
| `data[].exports.note` | string \| null | Something to know about these records, such as a gap or a late start. |
| `data[].official` | object | Official statistics with the country as importer or exporter. |
| `data[].official.available` | boolean | Whether official trade statistics can be queried. |
| `data[].official.latest_month` | string \| null | Latest month published, `YYYY-MM`, among the statistics fetched so far. They are fetched when first asked for, so it is null until a query has asked for this country's statistics. |
| `data[].official.mirror` | boolean | True when the country publishes no recent statistics of its own, and they are what its partners report about their trade with it. |
| `query` | object | The request as it was understood: country names as codes, the default dates filled in. |
| `notice` | string \| null | A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Exemplo [#example]

```bash
curl "https://api.won.dev/v1/trade/coverage?country=United%20States" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": [
    {
      "country": "US",
      "imports": {
        "records": true,
        "values": false,
        "earliest": "2021-01-01",
        "latest": "2026-11-13",
        "note": null
      },
      "exports": {
        "records": true,
        "values": false,
        "earliest": "2021-01-02",
        "latest": "2026-09-30",
        "note": null
      },
      "official": {
        "available": true,
        "latest_month": "2026-09"
      }
    }
  ],
  "query": {
    "country": "US"
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```