# Trading Economics API

> Trading Economics returns economic indicators, country comparisons, and commodity prices, available as a workflow and API.

Trading Economics, also known as TE, returns seven selected indicators for a country overview when given a country name. List countries by indicator compares the latest reported value across a region; provide an indicator and optionally a region or maximum results. Get commodity prices returns prices and price movements for a named commodity or group, or all groups when no commodity is supplied.

- Page: https://fous.com/tools/trading-economics
- Handle: `@trading-economics`
- Category: [Finance](https://fous.com/tools/category/finance)
- Source website: https://tradingeconomics.com
- Last verified: Sep 29, 2026

## Methods

### Get commodity prices

Operation `get_commodity_prices`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get current commodity prices and price movements, in the same group order as the Trading Economics commodities page. Includes the Electricity section when requesting all; dates reflect the page’s reported trading day.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `commodity` | string | no | `"copper"` | Commodity name or group to return, for example "copper", "crude oil", "wheat", or "metals". Leave blank for all groups. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "commodity": {
      "type": "string",
      "default": "",
      "description": "Commodity name or group to return, for example \"copper\", \"crude oil\", \"wheat\", or \"metals\". Leave blank for all groups.",
      "examples": [
        "copper",
        "energy",
        "wheat"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {},
    {
      "commodity": "copper"
    },
    {
      "commodity": "energy"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `commodities` | array |  |  |
| `commodities[].unit` | string or null | `"USD per barrel"` |  |
| `commodities[].group` | string | `"Energy"` |  |
| `commodities[].price` | number or null | `93.978` |  |
| `commodities[].page_url` | string | `"https://tradingeconomics.com/commodity/crude-oil"` |  |
| `commodities[].commodity` | string | `"Crude Oil"` |  |
| `commodities[].price_date` | string or null | `"2026-09-29"` |  |
| `commodities[].daily_change` | number or null | `1.3778` |  |
| `commodities[].daily_percent` | number or null | `1.49` |  |
| `commodities[].weekly_percent` | number or null | `3.8199` |  |
| `commodities[].yearly_percent` | number or null | `50.6779` |  |
| `commodities[].monthly_percent` | number or null | `9.5823` |  |
| `commodities[].year_to_date_percent` | number or null | `63.6674` |  |

**Example input**

```json
{}
```

**Example output**

```json
{
  "commodities": [
    {
      "unit": "USD per barrel",
      "group": "Energy",
      "price": 93.978,
      "page_url": "https://tradingeconomics.com/commodity/crude-oil",
      "commodity": "Crude Oil",
      "price_date": "2026-09-29",
      "daily_change": 1.3778,
      "daily_percent": 1.49,
      "weekly_percent": 3.8199,
      "yearly_percent": 50.6779,
      "monthly_percent": 9.5823,
      "year_to_date_percent": 63.6674
    },
    {
      "unit": "USD per barrel",
      "group": "Energy",
      "price": 106.942,
      "page_url": "https://tradingeconomics.com/commodity/brent-crude-oil",
      "commodity": "Brent",
      "price_date": "2026-09-29",
      "daily_change": 1.6624,
      "daily_percent": 1.58,
      "weekly_percent": 7.7505,
      "yearly_percent": 61.9603,
      "monthly_percent": 18.1815,
      "year_to_date_percent": 75.7476
    },
    {
      "unit": "USD per million British thermal units",
      "group": "Energy",
      "price": 3.1377,
      "page_url": "https://tradingeconomics.com/commodity/natural-gas",
      "commodity": "Natural gas",
      "price_date": "2026-09-29",
      "daily_change": 0.0317,
      "daily_percent": 1.02,
      "weekly_percent": 5.8246,
      "yearly_percent": -5.0045,
      "monthly_percent": 6.9063,
      "year_to_date_percent": -14.8752
    }
  ]
}
```

### Get country overview

Operation `get_country_overview`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get seven key economic indicators for a country from its public Trading Economics overview. Indicators absent from the overview have null values; the US dollar index is not reported as a USD exchange rate.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `country` | string | yes | `"Brazil"` | Country name, for example Brazil. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "country"
  ],
  "properties": {
    "country": {
      "type": "string",
      "description": "Country name, for example Brazil.",
      "examples": [
        "Brazil",
        "Ethiopia",
        "United States"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "country": "Brazil"
    },
    {
      "country": "Ethiopia"
    },
    {
      "country": "United States"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `country` | string | `"Brazil"` | Country name used on Trading Economics. |
| `page_url` | string | `"https://tradingeconomics.com/brazil/indicators"` | Country overview page. |
| `indicators` | array |  | Seven selected indicators from the country overview. |
| `indicators[].unit` | string or null | `"percent"` |  |
| `indicators[].page_url` | string or null | `"https://tradingeconomics.com/brazil/gdp-growth"` |  |
| `indicators[].latest_value` | number or null | `0.5` |  |
| `indicators[].indicator_name` | string | `"GDP Growth Rate"` |  |
| `indicators[].previous_value` | number or null | `1.1` |  |
| `indicators[].reference_period` | string or null | `"Jun/26"` |  |

**Example input**

```json
{
  "country": "Brazil"
}
```

**Example output**

```json
{
  "country": "Brazil",
  "page_url": "https://tradingeconomics.com/brazil/indicators",
  "indicators": [
    {
      "unit": "percent",
      "page_url": "https://tradingeconomics.com/brazil/gdp-growth",
      "latest_value": 0.5,
      "indicator_name": "GDP Growth Rate",
      "previous_value": 1.1,
      "reference_period": "Jun/26"
    },
    {
      "unit": "percent",
      "page_url": "https://tradingeconomics.com/brazil/inflation-cpi",
      "latest_value": 4.22,
      "indicator_name": "Inflation Rate",
      "previous_value": 4.44,
      "reference_period": "Aug/26"
    },
    {
      "unit": "percent",
      "page_url": "https://tradingeconomics.com/brazil/interest-rate",
      "latest_value": 13.75,
      "indicator_name": "Interest Rate",
      "previous_value": 14,
      "reference_period": "Sep/26"
    }
  ]
}
```

### List countries by indicator

Operation `list_countries_by_indicator`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Compare the latest reported value of an economic indicator across countries, highest first. World includes all listed countries; Australia uses the Oceania region. Values and available countries depend on Trading Economics.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `region` | string | no | `"europe"` | Region to compare, for example europe. Default: world. |
| `indicator` | string | yes | `"unemployment rate"` | Economic indicator in words, for example inflation rate or GDP growth rate. |
| `max_results` | integer | no | `8` | Maximum number of countries to return, for example 50. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "indicator"
  ],
  "properties": {
    "region": {
      "enum": [
        "world",
        "europe",
        "asia",
        "america",
        "africa",
        "australia",
        "g20"
      ],
      "type": "string",
      "default": "world",
      "description": "Region to compare, for example europe. Default: world.",
      "examples": [
        "europe",
        "world",
        "g20"
      ]
    },
    "indicator": {
      "type": "string",
      "minLength": 1,
      "description": "Economic indicator in words, for example inflation rate or GDP growth rate.",
      "examples": [
        "unemployment rate",
        "inflation rate",
        "interest rate"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 200,
      "minimum": 1,
      "description": "Maximum number of countries to return, for example 50.",
      "x-fous-developer": true,
      "examples": [
        8,
        50,
        200
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "region": "europe",
      "indicator": "unemployment rate",
      "max_results": 8
    },
    {
      "region": "world",
      "indicator": "inflation rate",
      "max_results": 50
    },
    {
      "region": "g20",
      "indicator": "interest rate",
      "max_results": 200
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `countries` | array |  |  |
| `countries[].unit` | string or null | `"%"` |  |
| `countries[].country` | string | `"Bosnia and Herzegovina"` |  |
| `countries[].page_link` | string or null | `"https://tradingeconomics.com/bosnia-and-herzegovina/unemployment-rate"` |  |
| `countries[].latest_value` | number or null | `11.4` |  |
| `countries[].previous_value` | number or null | `11.1` |  |
| `countries[].reference_period` | string or null | `"Mar 2026"` |  |
| `indicator_name` | string | `"Unemployment Rate"` | Name of the indicator shown by Trading Economics. |

**Example input**

```json
{
  "region": "europe",
  "indicator": "unemployment rate",
  "max_results": 8
}
```

**Example output**

```json
{
  "countries": [
    {
      "unit": "%",
      "country": "Bosnia and Herzegovina",
      "page_link": "https://tradingeconomics.com/bosnia-and-herzegovina/unemployment-rate",
      "latest_value": 11.4,
      "previous_value": 11.1,
      "reference_period": "Mar 2026"
    },
    {
      "unit": "%",
      "country": "Macedonia",
      "page_link": "https://tradingeconomics.com/macedonia/unemployment-rate",
      "latest_value": 11.3,
      "previous_value": 11.3,
      "reference_period": "Jun 2026"
    },
    {
      "unit": "%",
      "country": "Kosovo",
      "page_link": "https://tradingeconomics.com/kosovo/unemployment-rate",
      "latest_value": 10.8,
      "previous_value": 10.9,
      "reference_period": "Dec 2024"
    }
  ],
  "indicator_name": "Unemployment Rate"
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@trading-economics",
  "visibility": "public",
  "operation": "get_commodity_prices",
  "version": 1,
  "input": {},
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@trading-economics\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_commodity_prices\",\n  \"version\": 1,\n  \"input\": {},\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@trading-economics",
  "visibility": "public",
  "operation": "get_commodity_prices",
  "version": 1,
  "input": {},
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/trading-economics`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_commodity_prices`: Get commodity prices. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_country_overview`: Get country overview. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_countries_by_indicator`: List countries by indicator. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-trading-economics https://api.fous.com/mcp/tools/trading-economics --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Review key indicators for a country
- Compare an economic indicator across countries
- Track commodity prices and daily movements
- Analyze commodity price changes over time

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Trading Economics tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Trading Economics account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from tradingeconomics.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What are the key indicators for a country?

Use Get country overview with a country name to return seven selected indicators and their latest values, previous values, and reference periods.

### Which countries have the highest value for an indicator?

Use List countries by indicator with an indicator and optional region to compare latest reported values, highest first.

### What are current commodity prices and their movements?

Use Get commodity prices with a commodity or group, or leave it blank to return all groups.

## Related

- [Investing.com API](https://fous.com/tools/investing-com.md): Investing.com provides financial markets data and news, economic releases up to 31 days, and current commodity prices and government bond yields, which may be delayed or indicative.
- [IMF API](https://fous.com/tools/imf.md): IMF economic data provides country and regional forecasts with actual or forecast labels, and country rankings by World Economic Outlook indicators, excluding groups and missing values.
- [Macrotrends API](https://fous.com/tools/macrotrends.md): Macrotrends provides long-term financial and economic charts, company metric histories, and yearly commodity and index prices; current-year prices may be incomplete.
- [World Bank API](https://fous.com/tools/world-bank.md): World Bank provides country statistics and latest values within selected years, plus country rankings for a chosen year or the latest broadly covered year.
- [Kitco API](https://fous.com/tools/kitco.md): Precious metals spot prices and market coverage.
- [US Treasury API](https://fous.com/tools/us-treasury.md): US Treasury provides official daily interest rates and national debt figures for requested or latest available dates, plus quarterly reporting exchange rates using the latest preceding quarter when needed.
- [US Energy Information Administration API](https://fous.com/tools/us-energy-information-administration.md): US Energy Information Administration provides official energy statistics and analysis, including latest weekly fuel prices and preliminary monthly state electricity prices with historical comparisons.
- [TradingView API](https://fous.com/tools/tradingview.md): TradingView provides charts, markets, and technical analysis, with changing buy, sell, or neutral signals and stock screening; quotes may be delayed.
- [All Finance tools](https://fous.com/tools/category/finance)
