# 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/workflows/trading-economics
- Handle: `@trading-economics`
- Category: [Finance](https://fous.com/workflows/category/finance)
- Source website: https://tradingeconomics.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Trading Economics.

## Methods

### Get commodity prices

Operation `get_commodity_prices`, version 1. 1 credit per call.

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 pound"` |  |
| `commodities[].group` | string | `"Metals"` |  |
| `commodities[].price` | number or null | `6.5608` |  |
| `commodities[].page_url` | string | `"https://tradingeconomics.com/commodity/copper"` |  |
| `commodities[].commodity` | string | `"Copper"` |  |
| `commodities[].price_date` | string or null | `"2026-09-29"` |  |
| `commodities[].daily_change` | number or null | `-0.0087` |  |
| `commodities[].daily_percent` | number or null | `-0.13` |  |
| `commodities[].weekly_percent` | number or null | `-2.9396` |  |
| `commodities[].yearly_percent` | number or null | `35.8935` |  |
| `commodities[].monthly_percent` | number or null | `-0.4959` |  |
| `commodities[].year_to_date_percent` | number or null | `15.4664` |  |

**Example input**

```json
{
  "commodity": "copper"
}
```

**Example output**

```json
{
  "commodities": [
    {
      "unit": "USD per pound",
      "group": "Metals",
      "price": 6.5608,
      "page_url": "https://tradingeconomics.com/commodity/copper",
      "commodity": "Copper",
      "price_date": "2026-09-29",
      "daily_change": -0.0087,
      "daily_percent": -0.13,
      "weekly_percent": -2.9396,
      "yearly_percent": 35.8935,
      "monthly_percent": -0.4959,
      "year_to_date_percent": 15.4664
    }
  ]
}
```

### Get country overview

Operation `get_country_overview`, version 1. 1 credit per call.

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 call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@trading-economics","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Trading Economics?

No. Fous is not affiliated with Trading Economics. This workflow reads the public tradingeconomics.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/kitco.md): Precious metals spot prices and market coverage.
- [US Treasury API](https://fous.com/workflows/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/workflows/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/workflows/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 workflows](https://fous.com/workflows/category/finance)
