# Trading Economics Scraper (`crawlerbros/trading-economics-scraper`) Actor

Scrape live macro/finance data from tradingeconomics.com - commodities, currencies, stock indices, government bond yields, crypto prices, country-by-country economic indicators (GDP, inflation, unemployment...), global indicator rankings, and the economic calendar.

- **URL**: https://apify.com/crawlerbros/trading-economics-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Trading Economics Scraper

Scrape **Trading Economics** — live commodities, currencies, stock indices, government bond yields, cryptocurrency prices and top-moving individual shares; country-by-country economic indicators (GDP, inflation, unemployment...); global indicator rankings across every tracked country; and the daily economic calendar of upcoming/recent releases. HTTP-only via the public tradingeconomics.com tables. No auth, no proxy, no login.

### What this actor does

- **Seven modes:** `markets`, `countryIndicators`, `indicatorRanking`, `calendar`, `countryForecast`, `holidays`, `earningsCalendar`
- **Every market axis:** commodities (7 categories), currencies, stock indices, bond yields, crypto and top-gaining/losing individual shares — each split into regions/categories
- **Every country's indicators:** 12 categories (GDP, labour, prices, money, trade, government, business, consumer, housing, energy, health, overview) for any of 190+ countries
- **Global rankings:** 163 indicators (interest rate, inflation, unemployment, GDP growth, credit rating, wages, trade, health, demographics, energy...) ranked across every country that reports them
- **Economic calendar:** global or per-country, with actual/previous/consensus/forecast values and date-range filtering
- **Country forecasts:** Trading Economics' own quarter-ahead projections (next 4 quarters) for every indicator on a country's page, plus currency/stock-market/bond-yield market forecasts
- **Public holidays:** global list of upcoming market/bank holidays across every tracked country, or the full-year holiday list for a single country, with ISO dates and country codes
- **Earnings calendar:** per-country corporate earnings releases (EPS/revenue actual, consensus, previous, market cap, fiscal period, report time, market-impact rating)
- **Empty fields are omitted** — no null placeholders anywhere in the output

### Output: markets (mode = `markets`)

- `name` — instrument name (e.g. `Crude Oil`, `EURUSD`, `US500`, `United States`, `Bitcoin`, `Airbnb`)
- `marketType` — `commodities` / `currencies` / `stocks` / `bonds` / `crypto` / `shares`
- `category` — table category/region (e.g. `Energy`, `Major`, `Europe`, `Crypto`, `Top Gainers`)
- `unit` — pricing unit (commodities only, e.g. `USD/Bbl`)
- `symbol` — exchange ticker symbol
- `last` — latest price / yield
- `change`, `changePercent` — absolute and percent change since previous close
- `weekly`, `monthly`, `ytd`, `yoy` — percent change over each period
- `marketCap` — crypto only
- `referenceDate` — date of the latest quote
- `country` — derived when the instrument maps to a specific country (currencies/stocks/bonds)
- `sourceUrl`
- `recordType: "market"`, `scrapedAt`

### Output: country indicators (mode = `countryIndicators`)

- `indicatorName` — e.g. `GDP Growth Rate`, `Unemployment Rate`
- `country`, `category` — one of `overview`/`gdp`/`labour`/`prices`/`money`/`trade`/`government`/`business`/`consumer`/`housing`/`energy`/`health`
- `last`, `previous`, `highest`, `lowest`
- `unit` — e.g. `percent`, `USD Billion`
- `referenceDate`
- `sourceUrl`
- `recordType: "countryIndicator"`, `scrapedAt`

### Output: indicator ranking (mode = `indicatorRanking`)

- `indicator` — the ranked indicator slug
- `country`
- `last`, `previous`
- `referenceDate`, `unit`, `nextRelease`
- For `indicator=rating` (sovereign credit rating): `spRating`, `moodysRating`, `dbrsRating`, `teScore` instead of `last`/`previous`
- `sourceUrl`
- `recordType: "indicatorRanking"`, `scrapedAt`

### Output: calendar events (mode = `calendar`)

- `event` — release name (e.g. `Balance of Trade`, `Inflation Rate YoY`)
- `country`, `countryCode`
- `category` — the underlying indicator series this release belongs to (e.g. `Interest Rate`, `Inflation Rate Mom`)
- `symbol` — Trading Economics ticker symbol for the series, when published (e.g. `CNCPIYOY`)
- `importance` — market-impact level Trading Economics assigns the release: `Low` / `Medium` / `High` (omitted for the handful of rows TE doesn't rate, e.g. bank holidays)
- `date` (ISO `YYYY-MM-DD`), `time`
- `referencePeriod` — the period the release covers (e.g. `JUL`, `Q2`), when published
- `actual`, `previous`, `consensus`, `forecast`
- `sourceUrl`
- `recordType: "calendarEvent"`, `scrapedAt`

### Output: country forecasts (mode = `countryForecast`)

- `indicatorName` — e.g. `GDP Growth Rate`, `Currency`, `Stock Market`
- `country`, `category` — one of `overview`/`gdp`/`labour`/`prices`/`money`/`trade`/`government`/`business`/`consumer`/`housing`/`energy`/`markets` (`markets` = currency / stock market / 10Y bond yield forecast, not on the countryIndicators page)
- `unit` — e.g. `%`, `USD Billion`, `points`
- `actual` — latest reported value
- `forecasts` — array of `{ period, value }` for Trading Economics' next four forecasted quarters (e.g. `Q3/26`, `Q4/26`...); quarter labels shift forward every release, so they're carried as data rather than fixed field names
- `sourceUrl`
- `recordType: "countryForecast"`, `scrapedAt`

### Output: public holidays (mode = `holidays`)

- `date` — ISO `YYYY-MM-DD`
- `country`
- `countryCode` — 2-letter code Trading Economics assigns the country's flag (e.g. `US`, `TZ`)
- `holidayName` — e.g. `New Year's Day`, `National Day`
- `sourceUrl`
- `recordType: "holiday"`, `scrapedAt`

### Output: earnings calendar (mode = `earningsCalendar`)

- `company` — company name (e.g. `Berkshire Hathaway`)
- `symbol` — Trading Economics ticker (e.g. `BRKB:US`)
- `country`, `countryCode`
- `date` — ISO `YYYY-MM-DD` report date
- `epsActual`, `epsConsensus`, `epsPrevious` — earnings per share (actual is omitted until the report is released)
- `revenueActual`, `revenueConsensus`, `revenuePrevious` — revenue text with `K`/`M`/`B` magnitude suffix (e.g. `96.52B`)
- `marketCap` — e.g. `$688.51B`
- `fiscalPeriod` — e.g. `Q2`
- `time` — `AM` or `PM` report session, when published
- `importance` — market-impact level Trading Economics assigns the release: `Low` / `Medium` / `High`
- `sourceUrl`
- `recordType: "earnings"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `markets` | `markets` / `countryIndicators` / `indicatorRanking` / `calendar` / `countryForecast` / `holidays` / `earningsCalendar` |
| `marketType` | string | `commodities` | mode=markets: `commodities` / `currencies` / `stocks` / `bonds` / `crypto` / `shares` |
| `category` | string | – | mode=markets: category/region filter (options depend on `marketType`) |
| `country` | string | – | mode=countryIndicators / mode=countryForecast / mode=earningsCalendar (all required — pick a country) / mode=calendar / mode=holidays (both optional, leave unset for the global calendar / global holiday list) |
| `indicatorCategory` | string | – | mode=countryIndicators: restrict to one of 12 categories. mode=countryForecast: restrict to one of 12 categories (`markets` instead of `health`) |
| `indicator` | string | `interest-rate` | mode=indicatorRanking: which indicator to rank across countries (163 available — macro, labour, trade, prices, health, demographics, energy...) |
| `searchKeyword` | string | – | Case-insensitive substring match against the record name/event/holiday |
| `minChangePercent` | number | – | mode=markets: minimum daily % change |
| `maxChangePercent` | number | – | mode=markets: maximum daily % change |
| `dateFrom` | string | – | mode=calendar, holidays: ISO date (`YYYY-MM-DD`), inclusive lower bound |
| `dateTo` | string | – | mode=calendar, holidays: ISO date (`YYYY-MM-DD`), inclusive upper bound |
| `importance` | string | – | mode=calendar: keep only `low` / `medium` / `high` impact events; leave unset for all |
| `maxItems` | integer | `100` | Hard cap on emitted records (1–2000) |

#### Example: all commodities, energy only

```json
{
  "mode": "markets",
  "marketType": "commodities",
  "category": "Energy",
  "maxItems": 50
}
```

#### Example: US economic indicators, GDP category

```json
{
  "mode": "countryIndicators",
  "country": "united-states",
  "indicatorCategory": "gdp",
  "maxItems": 50
}
```

#### Example: interest rates ranked across every country

```json
{
  "mode": "indicatorRanking",
  "indicator": "interest-rate",
  "maxItems": 100
}
```

#### Example: today's global economic calendar

```json
{
  "mode": "calendar",
  "maxItems": 100
}
```

#### Example: quarter-ahead forecasts for Germany's GDP indicators

```json
{
  "mode": "countryForecast",
  "country": "germany",
  "indicatorCategory": "gdp",
  "maxItems": 50
}
```

#### Example: upcoming public holidays for Germany

```json
{
  "mode": "holidays",
  "country": "germany",
  "maxItems": 50
}
```

#### Example: upcoming US corporate earnings, high impact only

```json
{
  "mode": "earningsCalendar",
  "country": "united-states",
  "importance": "high",
  "maxItems": 50
}
```

### Use cases

- **Trading desks** — pull live commodity/currency/index/bond quotes into a research pipeline
- **Macro research** — compare a country's GDP/inflation/unemployment trajectory over categories
- **Cross-country benchmarking** — rank every country by interest rate, credit rating or debt-to-GDP
- **Event-driven strategies** — track the economic calendar for upcoming releases that move markets
- **Fintech dashboards** — feed live market and indicator data into a client-facing product
- **Academic / journalistic research** — bulk-export macro data without manual copy-paste

### FAQ

**What's the data source?** The public tables on [tradingeconomics.com](https://tradingeconomics.com) — no API key, login or paid subscription required.

**Is this affiliated with Trading Economics?** No — this is an independent, third-party actor that reads the same public pages a browser would.

**How fresh is the data?** Market quotes update intraday (delayed, not real-time tick data). Country indicators and calendar events update as Trading Economics republishes each release.

**Why do some market rows lack a `country` field?** `country` is only populated when the instrument maps to a specific country page (currencies, stock indices, bond yields). Commodities and crypto pairs are global instruments and don't have a single country.

**What does `category` mean for mode=markets?** It depends on `marketType`: for commodities it's a sector (`Energy`, `Metals`, ...); for currencies/stocks/bonds it's a geographic region (`Major`, `Europe`, ...); for crypto it's the quote currency grouping (`Crypto` = USD pairs, `BTC`/`ETH` = altcoin pairs).

**Why does `indicator=rating` return different fields?** Sovereign credit ratings are letter grades (`AAA`, `Baa2`...) from three agencies, not a single numeric series, so that ranking returns `spRating`/`moodysRating`/`dbrsRating`/`teScore` instead of `last`/`previous`.

**Can I get a specific country's calendar?** Yes — set `country` (e.g. `united-states`) in mode=calendar; omit it for the global calendar across all countries.

**What does `importance` mean for calendar events?** It's Trading Economics' own market-impact rating for the release (`Low`/`Medium`/`High`) — the same color-coding shown on their site. Use the `importance` input to keep only one level, e.g. `high` for the releases most likely to move markets.

**Can I get a specific country's upcoming corporate earnings?** Yes — set `country` (e.g. `united-states`) in mode=earningsCalendar (required). `epsActual`/`revenueActual` are omitted until the company actually reports; until then only the consensus/previous figures are populated.

**Can I get a specific country's public holidays?** Yes — set `country` (e.g. `germany`) in mode=holidays for that country's full-year holiday list; omit it for the global upcoming-holidays list (from today through the end of the year, across every tracked country).

**What if my `country` or `indicator` filter matches nothing?** The actor returns zero records and sets a clear status message rather than emitting a placeholder record.

**What are the `period` labels in `forecasts` (mode=countryForecast)?** Trading Economics forecasts four quarters ahead of the current one (e.g. `Q3/26`, `Q4/26`, `Q1/27`, `Q2/27` as of Q2 2026); the labels roll forward every quarter, so they're returned as data on each forecast entry instead of fixed output columns. Not every small economy has forecast coverage — those return zero records.

# Actor input Schema

## `mode` (type: `string`):

Which data surface to scrape.

## `marketType` (type: `string`):

Which live market table to scrape.

## `category` (type: `string`):

Restrict the market table to one category or region. Options depend on marketType: commodities -> Energy/Metals/Agricultural/Industrial/Livestock/Index/Electricity; currencies, stocks, bonds -> Major/Europe/America/Asia/Oceania/Africa; crypto -> Crypto (USD pairs) / BTC pairs / ETH pairs; shares -> Top Gainers / Top Losers. Leave unset for all rows across every category/region.

## `country` (type: `string`):

Country to fetch indicators, calendar events, forecasts, public holidays or the earnings calendar for. Required for mode=countryIndicators, mode=countryForecast and mode=earningsCalendar. Optional for mode=calendar and mode=holidays (omit for the global calendar / global holiday list).

## `indicatorCategory` (type: `string`):

Restrict country indicators or forecasts to one category. `markets` (currency / stock market / 10Y bond yield forecast) and `health` are not both available in every mode: `health` only appears for mode=countryIndicators, `markets` only for mode=countryForecast. Leave unset for all categories.

## `indicator` (type: `string`):

Economic indicator to rank across all countries (163 indicators covering macro, labour, trade, prices, health, demographics and more).

## `searchKeyword` (type: `string`):

Case-insensitive substring match against the record name (commodity/pair/index/indicator/event/holiday/company name). Leave blank for no filtering.

## `minChangePercent` (type: `number`):

Only keep instruments whose daily percent change is at least this value (e.g. -100 to 100). Uses whole percent; enter -5 for -5%.

## `maxChangePercent` (type: `number`):

Only keep instruments whose daily percent change is at most this value.

## `dateFrom` (type: `string`):

ISO date (YYYY-MM-DD). Only keep calendar events / holidays / earnings releases on/after this date.

## `dateTo` (type: `string`):

ISO date (YYYY-MM-DD). Only keep calendar events / holidays / earnings releases on/before this date.

## `importance` (type: `string`):

Only keep calendar events / earnings releases at this market-impact level. Trading Economics color-codes each release's importance; leave unset for all levels.

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "markets",
  "marketType": "commodities",
  "category": "",
  "country": "",
  "indicatorCategory": "",
  "indicator": "interest-rate",
  "importance": "",
  "maxItems": 100
}
```

# Actor output Schema

## `items` (type: `string`):

Dataset containing all scraped Trading Economics records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "markets",
    "marketType": "commodities",
    "category": "",
    "country": "",
    "indicatorCategory": "",
    "indicator": "interest-rate",
    "importance": "",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/trading-economics-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "markets",
    "marketType": "commodities",
    "category": "",
    "country": "",
    "indicatorCategory": "",
    "indicator": "interest-rate",
    "importance": "",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/trading-economics-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "markets",
  "marketType": "commodities",
  "category": "",
  "country": "",
  "indicatorCategory": "",
  "indicator": "interest-rate",
  "importance": "",
  "maxItems": 100
}' |
apify call crawlerbros/trading-economics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/trading-economics-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/n27hJgGix89hzPvZe/builds/UmokB3Xe7BexI9XEA/openapi.json
