---
title: "Remittances and investment API reference | Narwhal API"
description: "Remittances received and foreign direct investment net inflows by country and year in US dollars, by REST and MCP, from the World Bank."
url: "https://narwhalapi.com/docs/api/remittances-investment"
---

# Remittances and investment API reference

Remittances received and foreign direct investment inflows by country and year

## Overview

Money workers abroad send home, and foreign direct investment coming into a country, per year in US dollars, from the World Bank's World Development Indicators.

A country is its ISO 3166 alpha-3 code, such as IDN. Remittances are personal remittances received. Investment is foreign direct investment net inflows, which is negative when more left than arrived. Both are in current US dollars, as decimal strings.

The route without `observations` returns the newest year the World Bank gives. `observations` returns every year it gives, oldest first. Every answer carries the World Bank attribution, `licence_url`, the day the World Bank last updated the data and the time Narwhal read it.

Base URL: `https://api.narwhalapi.com`. Each route below is an MCP tool of its own, with the same parameters.

## What every account gets

| What | Every account |
| --- | --- |
| One country and measure | One Economics call |

See [pricing](https://narwhalapi.com/pricing.md) for what a call costs. A request is charged at the price of its API unless a route says otherwise.

- A year the World Bank gives no value for is left out, never filled. The newest year differs between countries.
- The World Bank revises earlier years. Narwhal serves the current figures, not earlier versions of them.
- A series is read from the World Bank when it is not cached, within a daily limit of new reads per account.
- When the World Bank cannot be reached, the last copy is served with `stale` true and is not charged.
- A country with no figure is 404 not_covered. A range with no year is 404 not_found. Neither is charged.
- The Any series API reads the same figures by the `series_id` each answer names. These figures are for analysis, not financial, investment, legal or tax advice.

## Endpoints

Every route is a GET and needs your key in the `Authorization: Bearer` header. The examples show the shape of an answer, not live data.

### Get Remittances

`GET /v1/economics/{country}/remittances`

MCP: tool `economics_get_remittances`.

#### Parameters

| Parameter | Where | Required | Type | Meaning |
| --- | --- | --- | --- | --- |
| `country` | path | Yes | string | ISO 3166 alpha-3 country code, for example DEU. |

#### Response fields

| Field | Type | Sent | Meaning |
| --- | --- | --- | --- |
| `year` | integer | Always | The year of the value. |
| `value` | string | Always | US dollars at current prices, as the World Bank gives it. Investment can be negative. |
| `country` | string | Always | The country asked for, ISO 3166 alpha-3. |
| `indicator` | one of remittances_received, foreign_direct_investment_net_inflows | Always | remittances_received or foreign_direct_investment_net_inflows. |
| `series_id` | string | Always | The same series in the catalogue routes. |
| `unit` | always "USD" | Always | The unit of every value. |
| `source` | string | Always | The attribution the World Bank's licence asks for. |
| `licence_url` | string | Always | The licence the World Bank publishes the data under. |
| `source_updated` | string | Always | The day the World Bank says it last updated the data. |
| `fetched_at` | date-time | Always | When Narwhal read the World Bank. |
| `stale` | boolean | Always | True when the World Bank could not be reached and the last copy is served, which is not charged. |

Request

```
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/IDN/remittances"
```

Example response

```
{
  "country": "IDN",
  "indicator": "remittances_received",
  "series_id": "wdi:bx.trf.pwkr.cd.dt/idn",
  "unit": "USD",
  "source": "World Bank, World Development Indicators, CC BY 4.0. Values normalised by Narwhal.",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "source_updated": "2026-11-11",
  "fetched_at": "2026-11-26T08:13:11Z",
  "stale": false,
  "year": 2025,
  "value": "17601348404.982"
}
```

### Get Remittances History

`GET /v1/economics/{country}/remittances/observations`

MCP: tool `economics_get_remittances_history`.

#### Parameters

| Parameter | Where | Required | Type | Meaning |
| --- | --- | --- | --- | --- |
| `country` | path | Yes | string | ISO 3166 alpha-3 country code, for example DEU. |
| `start` | query | No | string | First year to return, as YYYY. |
| `end` | query | No | string | Last year to return, as YYYY. |

#### Response fields

| Field | Type | Sent | Meaning |
| --- | --- | --- | --- |
| `country` | string | Always | The country asked for, ISO 3166 alpha-3. |
| `indicator` | one of remittances_received, foreign_direct_investment_net_inflows | Always | remittances_received or foreign_direct_investment_net_inflows. |
| `series_id` | string | Always | The same series in the catalogue routes. |
| `unit` | always "USD" | Always | The unit of every value. |
| `source` | string | Always | The attribution the World Bank's licence asks for. |
| `licence_url` | string | Always | The licence the World Bank publishes the data under. |
| `source_updated` | string | Always | The day the World Bank says it last updated the data. |
| `fetched_at` | date-time | Always | When Narwhal read the World Bank. |
| `stale` | boolean | Always | True when the World Bank could not be reached and the last copy is served, which is not charged. |
| `observations` | list of object | Always | One row per year, oldest first. |
| `observations[].year` | integer | Always | The year of the value. |
| `observations[].value` | string | Always | US dollars at current prices, as the World Bank gives it. Investment can be negative. |

Request

```
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/IDN/remittances/observations?start=2024"
```

Example response

```
{
  "country": "IDN",
  "indicator": "remittances_received",
  "series_id": "wdi:bx.trf.pwkr.cd.dt/idn",
  "unit": "USD",
  "source": "World Bank, World Development Indicators, CC BY 4.0. Values normalised by Narwhal.",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "source_updated": "2026-11-11",
  "fetched_at": "2026-11-26T08:13:11Z",
  "stale": false,
  "observations": [
    {
      "year": 2024,
      "value": "16038366972.4451"
    },
    {
      "year": 2025,
      "value": "17601348404.982"
    }
  ]
}
```

### Get Foreign Direct Investment

`GET /v1/economics/{country}/foreign-direct-investment`

MCP: tool `economics_get_foreign_direct_investment`.

#### Parameters

| Parameter | Where | Required | Type | Meaning |
| --- | --- | --- | --- | --- |
| `country` | path | Yes | string | ISO 3166 alpha-3 country code, for example DEU. |

#### Response fields

| Field | Type | Sent | Meaning |
| --- | --- | --- | --- |
| `year` | integer | Always | The year of the value. |
| `value` | string | Always | US dollars at current prices, as the World Bank gives it. Investment can be negative. |
| `country` | string | Always | The country asked for, ISO 3166 alpha-3. |
| `indicator` | one of remittances_received, foreign_direct_investment_net_inflows | Always | remittances_received or foreign_direct_investment_net_inflows. |
| `series_id` | string | Always | The same series in the catalogue routes. |
| `unit` | always "USD" | Always | The unit of every value. |
| `source` | string | Always | The attribution the World Bank's licence asks for. |
| `licence_url` | string | Always | The licence the World Bank publishes the data under. |
| `source_updated` | string | Always | The day the World Bank says it last updated the data. |
| `fetched_at` | date-time | Always | When Narwhal read the World Bank. |
| `stale` | boolean | Always | True when the World Bank could not be reached and the last copy is served, which is not charged. |

Request

```
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/IDN/foreign-direct-investment"
```

Example response

```
{
  "country": "IDN",
  "indicator": "foreign_direct_investment_net_inflows",
  "series_id": "wdi:bx.klt.dinv.cd.wd/idn",
  "unit": "USD",
  "source": "World Bank, World Development Indicators, CC BY 4.0. Values normalised by Narwhal.",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "source_updated": "2026-11-11",
  "fetched_at": "2026-11-26T08:13:13Z",
  "stale": false,
  "year": 2025,
  "value": "22698158405.2659"
}
```

### Get Foreign Direct Investment History

`GET /v1/economics/{country}/foreign-direct-investment/observations`

MCP: tool `economics_get_foreign_direct_investment_history`.

#### Parameters

| Parameter | Where | Required | Type | Meaning |
| --- | --- | --- | --- | --- |
| `country` | path | Yes | string | ISO 3166 alpha-3 country code, for example DEU. |
| `start` | query | No | string | First year to return, as YYYY. |
| `end` | query | No | string | Last year to return, as YYYY. |

#### Response fields

| Field | Type | Sent | Meaning |
| --- | --- | --- | --- |
| `country` | string | Always | The country asked for, ISO 3166 alpha-3. |
| `indicator` | one of remittances_received, foreign_direct_investment_net_inflows | Always | remittances_received or foreign_direct_investment_net_inflows. |
| `series_id` | string | Always | The same series in the catalogue routes. |
| `unit` | always "USD" | Always | The unit of every value. |
| `source` | string | Always | The attribution the World Bank's licence asks for. |
| `licence_url` | string | Always | The licence the World Bank publishes the data under. |
| `source_updated` | string | Always | The day the World Bank says it last updated the data. |
| `fetched_at` | date-time | Always | When Narwhal read the World Bank. |
| `stale` | boolean | Always | True when the World Bank could not be reached and the last copy is served, which is not charged. |
| `observations` | list of object | Always | One row per year, oldest first. |
| `observations[].year` | integer | Always | The year of the value. |
| `observations[].value` | string | Always | US dollars at current prices, as the World Bank gives it. Investment can be negative. |

Request

```
curl -H "Authorization: Bearer $NARWHAL_API_KEY" \
  "https://api.narwhalapi.com/v1/economics/IDN/foreign-direct-investment/observations?start=2024"
```

Example response

```
{
  "country": "IDN",
  "indicator": "foreign_direct_investment_net_inflows",
  "series_id": "wdi:bx.klt.dinv.cd.wd/idn",
  "unit": "USD",
  "source": "World Bank, World Development Indicators, CC BY 4.0. Values normalised by Narwhal.",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "source_updated": "2026-11-11",
  "fetched_at": "2026-11-26T08:13:13Z",
  "stale": false,
  "observations": [
    {
      "year": 2024,
      "value": "24275445280.2272"
    },
    {
      "year": 2025,
      "value": "22698158405.2659"
    }
  ]
}
```

## Errors

Errors use the shared problem shape with a `request_id`. See [Errors and credits](https://narwhalapi.com/docs/errors.md) for the shape and the credit headers. Failed requests are not charged.

| Code | Status | Meaning |
| --- | --- | --- |
| `invalid_query` | 400 | The country is not a three letter code, or start or end is not a year, or start is after end. Not charged. |
| `not_found` | 404 | No year in this range is held for this country. Not charged. |
| `not_covered` | 404 | The World Bank gives no figure for this country. Not charged. |
| `insufficient_credits` | 402 | Your credit balance is less than the request costs. |
| `fetch_limit_reached` | 429 | Your daily limit of new reads from the source is used up. Cached series still answer. Not charged. |
| `upstream_busy` | 503 | The World Bank could not be read now and no copy is held. Try again shortly. Not charged. |
| `area_unavailable` | 503 | Live source reads are not available right now. Not charged. |
| `invalid_api_key` | 401 | The Bearer key is missing, malformed, unknown, or inactive. |
| `rate_limit_exceeded` | 429 | The network or account per-minute limit was reached. Retry after the time in the Retry-After header. |

Was this page helpful?
