# Moldova Foreign Trade API
> Official foreign-trade statistics for the Republic of Moldova — exports, imports and the trade balance — sourced live from the National Bureau of Statistics of Moldova via its public PxWeb statbank (table EXT015000), all values in millions of US dollars. The trade endpoint returns the latest reported month with exports, imports, the trade balance and the export-to-import cover ratio. The series endpoint returns the monthly history of exports, imports and balance, parameterised by the number of months. The partners endpoint breaks the latest month down by partner-country group — total, CIS countries, the European Union and the rest of the world — each with its exports, imports and balance, showing where Moldova trades. The annual endpoint returns full-year totals for exports, imports and balance across recent years. Figures are published directly by the statistics bureau, not modelled, and refreshed from source with a short server-side cache and keep-warm. Ideal for macro and trade dashboards, emerging-market and CIS/EU economics trackers, supply-chain and current-account analysis, and fintech needing a clean structured trade feed for a market the big aggregators rarely cover at monthly resolution. Live keyless upstream. 5 endpoints.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/moldova-trade-api/..."
```

## Pricing
- **Free** (Free) — 240 calls/Mo, 2 req/s
- **Starter** ($14/Mo) — 14,200 calls/Mo, 7 req/s
- **Pro** ($37/Mo) — 72,000 calls/Mo, 14 req/s
- **Mega** ($88/Mo) — 270,000 calls/Mo, 35 req/s

## Endpoints

### Trade

#### `GET /v1/trade` — Latest-month trade

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/moldova-trade-api/v1/trade"
```

**Response:**
```json
{
    "data": {
        "unit": "Million USD",
        "period": "2026-04",
        "region": "Moldova",
        "source": "National Bureau of Statistics of Moldova (statbank.statistica.md, table EXT015000)",
        "exports": 314.7,
        "imports": 1064.5,
        "indicator": "Foreign trade (latest month)",
        "month_name": "April",
        "trade_balance": -749.8,
        "cover_ratio_pct": 29.56
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:28.056Z",
        "request_id": "b9984b97-c9de-4b53-b155-31e523b5eca4"
    },
    "status": "ok",
    "message": "Moldova trade retrieved",
    "success": true
}
```

#### `GET /v1/trade/annual` — Annual trade totals

**Parameters:**
- `years` (query, optional, string) — Number of most recent years to return Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/moldova-trade-api/v1/trade/annual?years=15"
```

**Response:**
```json
{
    "data": {
        "unit": "Million USD",
        "count": 15,
        "years": [
            {
                "year": 2011,
                "exports": 2216.8,
                "imports": 5191.3,
                "trade_balance": -2974.5
            },
            {
                "year": 2012,
                "exports": 2161.9,
                "imports": 5212.9,
                "trade_balance": -3051
            },
            {
                "year": 2013,
                "exports": 2428.3,
                "imports": 5492.4,
                "trade_balance": -3064.1
            },
            {
                "year": 2014,
                "exports": 2339.5,
                "imports": 5317,
                "trade_balance": -2977.5
            },
            {
                "year": 2015,
                "exports": 1966.8,
                "imports": 3986.8,
                "trade_balance": -2020
            },
            {
                "year": 2016,
                "exports": 2044.5,
                "imports": 4020.3,
                "trade_balance": -1975.8
            },
            {
                "year": 2017,
                "exports": 2425,
                "imports": 4831.3,
                "trade_balance": -2406.3
            },
            {
                "year": 2018,
                "exports": 2706.2,
                "imports": 5760.1,
                "trade_balance": -3053.9
            },
            {
                "year": 2019,
                "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/trade/partners` — Trade by partner group

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/moldova-trade-api/v1/trade/partners"
```

**Response:**
```json
{
    "data": {
        "unit": "Million USD",
        "count": 4,
        "groups": [
            {
                "group": "Total",
                "exports": 314.7,
                "imports": 1064.5,
                "trade_balance": -749.8
            },
            {
                "group": "CIS countries",
                "exports": 18,
                "imports": 34.5,
                "trade_balance": -16.5
            },
            {
                "group": "European Union",
                "exports": 202.8,
                "imports": 583.2,
                "trade_balance": -380.4
            },
            {
                "group": "Rest of world",
                "exports": 93.9,
                "imports": 446.8,
                "trade_balance": -352.9
            }
        ],
        "period": "2026-04",
        "region": "Moldova",
        "source": "NBS Moldova EXT015000",
        "indicator": "Foreign trade by partner group (latest month)"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:28.267Z",
        "request_id": "4dd221ae-93f7-47a7-abf5-8af1cc3e268e"
    },
    "status": "ok",
    "message": "Moldova trade by partner retrieved",
    "success": true
}
```

#### `GET /v1/trade/series` — Monthly trade series

**Parameters:**
- `months` (query, optional, string) — Number of most recent months to return Example: `36`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/moldova-trade-api/v1/trade/series?months=36"
```

**Response:**
```json
{
    "data": {
        "unit": "Million USD",
        "count": 36,
        "region": "Moldova",
        "series": [
            {
                "period": "2023-05",
                "exports": 336.5,
                "imports": 709.2,
                "trade_balance": -372.7
            },
            {
                "period": "2023-06",
                "exports": 316.6,
                "imports": 665.6,
                "trade_balance": -349
            },
            {
                "period": "2023-07",
                "exports": 304.2,
                "imports": 639.5,
                "trade_balance": -335.3
            },
            {
                "period": "2023-08",
                "exports": 321.6,
                "imports": 698.9,
                "trade_balance": -377.3
            },
            {
                "period": "2023-09",
                "exports": 348,
                "imports": 703.2,
                "trade_balance": -355.2
            },
            {
                "period": "2023-10",
                "exports": 341.8,
                "imports": 714.1,
                "trade_balance": -372.3
            },
            {
                "period": "2023-11",
                "exports": 379.2,
                "imports": 737.2,
                "trade_balance": -358
            },
            {
                "period": "2023-12",
                "exports": 311.3,
                "imports": 810.1,
                "trade_balance": -498.8
            
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/moldova-trade-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "api": "Moldova Foreign Trade API",
        "region": "Republic of Moldova",
        "source": "National Bureau of Statistics of Moldova — PxWeb statbank (statbank.statistica.md), table EXT015000",
        "endpoints": [
            "/v1/trade",
            "/v1/trade/series",
            "/v1/trade/partners",
            "/v1/trade/annual",
            "/v1/meta"
        ],
        "indicator": "Exports, imports and trade balance (Million USD), monthly and annual, by partner-country group",
        "documentation": "https://moldova-trade-api.oanor.dev",
        "partner_groups": [
            "Total",
            "CIS countries",
            "European Union",
            "Rest of world"
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:28.445Z",
        "request_id": "2575a438-48a7-4d11-8054-56b07516d536"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/moldova-trade-api
OpenAPI spec: https://www.oanor.com/api/moldova-trade-api/openapi.json
