TradingEconomics Scraper
Pricing
Pay per event
TradingEconomics Scraper
Extract economic indicators from TradingEconomics.com. Get GDP, inflation, unemployment, interest rates, and 20M+ indicators across 196 countries. No API key needed.
TradingEconomics Scraper
Pricing
Pay per event
Extract economic indicators from TradingEconomics.com. Get GDP, inflation, unemployment, interest rates, and 20M+ indicators across 196 countries. No API key needed.
You can access the TradingEconomics Scraper programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, youโll need an Apify account and your API token, found in Integrations settings in Apify Console.
1import { ApifyClient } from 'apify-client';2
3// Initialize the ApifyClient with your Apify API token4// Replace the '<YOUR_API_TOKEN>' with your token5const client = new ApifyClient({6 token: '<YOUR_API_TOKEN>',7});8
9// Prepare Actor input10const input = {11 "mode": "country-indicators",12 "countries": [13 "united-states",14 "germany"15 ],16 "categories": [],17 "indicator": "gdp",18 "directUrl": "https://tradingeconomics.com/country-list/gdp",19 "maxIndicators": 10,20 "proxy": {21 "useApifyProxy": true,22 "apifyProxyGroups": [23 "BUYPROXIES94952"24 ]25 }26};27
28// Run the Actor and wait for it to finish29const run = await client.actor("automation-lab/tradingeconomics-scraper").call(input);30
31// Fetch and print Actor results from the run's dataset (if any)32console.log('Results from dataset');33console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);34const { items } = await client.dataset(run.defaultDatasetId).listItems();35items.forEach((item) => {36 console.dir(item);37});38
39// ๐ Want to learn more ๐? Go to โ https://docs.apify.com/api/client/js/docsThe Apify API client for JavaScript is the official library that allows you to use TradingEconomics Scraper API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.
Install the apify-client
$npm install apify-clientOther API clients include: