Macrotrends Scraper | Stock Financials and Historical Data
Pricing
from $19.00 / 1,000 results
Macrotrends Scraper | Stock Financials and Historical Data
Pull historical stock prices, financial statements, ratios, and macroeconomic charts from Macrotrends. Track revenue, earnings, margins, debt, dividends, and cash flow across decades for any public company. Perfect for analysts, investors, and quant research workflows worldwide.
Pricing
from $19.00 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share

📈 Macrotrends Scraper
🚀 Export decades of financial and macro data in seconds. Scrape stock revenue, earnings, PE ratios, GDP, inflation, unemployment, and 1,000+ other historical time-series from Macrotrends - no API key required, fully automated.
🕒 Last updated: 2026-05-21 · 📊 7 fields per record · Decades of history · Global coverage
The Macrotrends Scraper extracts historical time-series data directly from Macrotrends chart pages. It supports both stock financial charts (revenue, EPS, PE ratio, free cash flow, and more) and global macro charts (GDP, inflation, unemployment, interest rates). Data is parsed from the embedded JavaScript data layer - no browser required, results in seconds.
The dataset covers S&P 500 companies with quarterly and annual data going back to the 1970s for stocks, and annual macro data from the 1960s onward for countries worldwide.
Coverage
- Stock charts: Revenue, Net Income, EPS, PE Ratio, Free Cash Flow, Gross Profit, EBITDA, and 100+ other metrics for any ticker on Macrotrends
- Macro charts: GDP, Inflation (CPI), Unemployment, Interest Rates, National Debt, and more for 200+ countries
- History: Up to 50+ years of quarterly or annual data per series
- 7 output fields per record including date, value, metric name, ticker, source URL, and timestamp
Target Audience / Use Cases
| Who | How they use it |
|---|---|
| Financial analysts | Build revenue and earnings models for public companies |
| Economists | Track macro trends across countries and time periods |
| Quant researchers | Backtest strategies using historical PE ratios and earnings data |
| Data journalists | Verify and visualize long-run economic narratives |
| Business intelligence teams | Enrich dashboards with external benchmarks |
| Academic researchers | Collect ground-truth financial data for studies |
📋 What the Macrotrends Scraper does
- Scrapes any Macrotrends stock chart URL (e.g. Apple Revenue, Tesla PE Ratio, Microsoft EPS)
- Scrapes any Macrotrends global-metrics URL (e.g. US GDP, Germany Inflation, Japan Unemployment)
- Returns one record per time period with date, value, metric name, and ticker
- Automatically detects URL type and selects the correct data extraction path
- Limits output to
maxItemsfor cost control; free users get up to 10 records as a preview
💡 Why it matters: Macrotrends is one of the richest free sources of historical financial and macro data on the internet. This scraper makes that data programmatically accessible for any workflow - financial modeling, macro research, dashboard enrichment, or academic study.
🎬 Full Demo
🚧 Coming soon
⚙️ Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
startUrl | string | Yes | https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue | Full Macrotrends chart URL to scrape |
maxItems | integer | No | 10 | Maximum number of records to return (free: 10, paid: up to 1,000,000) |
Example 1 - Apple Quarterly Revenue
{"startUrl": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue","maxItems": 50}
Example 2 - US GDP (Annual)
{"startUrl": "https://www.macrotrends.net/global-metrics/countries/usa/united-states/gdp-gross-domestic-product","maxItems": 60}
⚠️ Good to Know: The
startUrlmust be a full Macrotrends chart page URL - either/stocks/charts/{TICKER}/{slug}/{metric}for stock data or/global-metrics/countries/{country-id}/{slug}/{metric}for macro data. The scraper automatically detects which type it is and adapts accordingly.
📊 Output
| Field | Type | Description |
|---|---|---|
📅 date | string | Date of the data point in YYYY-MM-DD format |
💹 value | number | Numeric value of the metric for this period |
📊 metric | string | Human-readable metric name (e.g. "Apple Revenue", "GDP") |
🔖 ticker | string | Stock ticker (e.g. AAPL) or country ID (e.g. usa) |
🔗 url | string | Source Macrotrends chart URL |
🕒 scrapedAt | string | ISO 8601 timestamp of when the record was collected |
❌ error | string/null | Error message if scraping failed, otherwise null |
Sample Records
Stock data (Apple Revenue):
[{"date": "2012-03-31","value": 39.186,"metric": "Apple Revenue","ticker": "AAPL","url": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue","scrapedAt": "2026-05-21T23:23:25.741Z","error": null},{"date": "2012-06-30","value": 35.023,"metric": "Apple Revenue","ticker": "AAPL","url": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue","scrapedAt": "2026-05-21T23:23:25.741Z","error": null},{"date": "2012-09-30","value": 35.966,"metric": "Apple Revenue","ticker": "AAPL","url": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue","scrapedAt": "2026-05-21T23:23:25.741Z","error": null}]
Macro data (US GDP):
[{"date": "1960-01-01","value": 541988586206.9,"metric": "GDP","ticker": "usa","url": "https://www.macrotrends.net/global-metrics/countries/usa/united-states/gdp-gross-domestic-product","scrapedAt": "2026-05-21T23:21:26.955Z","error": null}]
✨ Why choose this Actor
| Feature | Details |
|---|---|
| ⚡ Fast | Extracts data directly from embedded JavaScript - no browser, no delays |
| 🌐 Dual mode | Supports both stock charts and global macro charts from one actor |
| 📅 Long history | Decades of quarterly or annual data per series |
| 🔒 No auth needed | Public data, no account or API key required |
| 💡 Auto-detection | Automatically detects URL type and picks the right extraction path |
| 📦 Clean output | Structured JSON/CSV/Excel/XML - ready for spreadsheets or databases |
📈 How it compares to alternatives
| Feature | This Actor | Manual download | Financial data APIs |
|---|---|---|---|
| Historical depth | 50+ years | 50+ years | Varies (often 10-20 years) |
| Cost | Free preview / Pay-per-use | Free (manual) | $50-$500/month subscription |
| Automation | Fully automated | Manual CSV download | Requires API integration |
| No-code friendly | Yes (Apify UI) | Spreadsheet only | Requires coding |
| Macro + stock combined | Yes | Separate pages | Separate providers |
| Output formats | JSON, CSV, Excel, XML | CSV only | JSON |
🚀 How to use
- Create a free Apify account with $5 in free credit
- Open this Actor in the Apify Console
- Paste any Macrotrends chart URL into the
startUrlfield - Set
maxItemsto control how many records you want (10 for preview, or higher for full history) - Click Start and wait a few seconds
- Download your dataset as CSV, Excel, JSON, or XML
💼 Business use cases
Financial Modeling and Valuation
Analysts building DCF models or comparable company analyses need historical revenue, earnings, and margin data. This scraper provides quarterly financial data going back 10+ years for any S&P 500 company - pull AAPL, MSFT, TSLA, NVDA revenue in one run and feed it directly into your model.
Macroeconomic Research and Dashboards
Economists and BI teams tracking inflation, GDP growth, or unemployment trends can automate collection of time-series data across multiple countries. Schedule this scraper on a cadence to keep dashboards current without manual CSV downloads.
Quantitative Strategy Backtesting
PE ratio history, EPS trends, and free cash flow yield are key inputs for quant strategies. This scraper extracts decades of that data so you can backtest valuation-based signals across full market cycles including 2008, 2020, and beyond.
Academic and Journalism Research
Students, professors, and journalists need verifiable, citable economic data. Macrotrends aggregates World Bank, Fed, and FRED data in one place. This scraper makes it programmable for reproducible research pipelines.
🔌 Automating Macrotrends Scraper
Connect this Actor to your favorite automation tool:
- Make (Integromat): Trigger on a schedule, push results to Google Sheets or Airtable
- Zapier: Run the actor weekly and send new records to Slack or a database
- Apify Scheduler: Set a daily or weekly cron to keep financial data fresh
- Webhooks: Receive a POST notification when each run finishes with dataset URL
- REST API: Call the Apify API directly from Python, Node.js, or any HTTP client
🌟 Beyond business use cases
Research and Academia
Track long-run relationships between variables - does PE ratio expansion precede recessions? Does GDP per capita correlate with life expectancy? Automate data collection for studies that would otherwise require hours of manual work.
Creative and Storytelling
Data journalists can build compelling timelines showing how Apple's revenue grew from $39B to $400B in a decade, or how US GDP recovered after 2008. The clean structured output is chart-ready.
Non-profit and Policy Analysis
Policy researchers can extract inflation and unemployment data for multiple countries to compare recovery trajectories after crises, identify outliers, and inform evidence-based recommendations.
Experimentation and Learning
Finance students learning valuation can pull real data for case studies. Data science students can practice time-series modeling on actual quarterly earnings data. No fake datasets needed.
🤖 Ask an AI assistant about this scraper
You can ask an AI assistant to help you use this actor. For example:
- "Write me a Python script that calls the Apify API to run ParseForge/macrotrends-scraper and download AAPL PE ratio history as a CSV"
- "How do I schedule this scraper to run monthly and push results to Google Sheets using Make?"
- "What Macrotrends URL should I use to get Tesla's free cash flow history?"
❓ Frequently Asked Questions
❓ What URLs does this scraper support?
Any Macrotrends chart page URL. Stock charts follow the pattern /stocks/charts/{TICKER}/{company-slug}/{metric}. Macro charts follow /global-metrics/countries/{country-id}/{country-slug}/{metric}. Paste the URL directly from your browser.
❓ What metrics are available for stocks?
Revenue, net income, EPS (diluted), PE ratio, free cash flow, gross profit, operating income, EBITDA, book value per share, and dozens more. Any metric with a chart on Macrotrends will work.
❓ What macro indicators are available?
GDP, GDP per capita, inflation (CPI), unemployment rate, interest rates, national debt, trade balance, and more. Availability varies by country. The US, EU, and major economies have the most complete coverage.
❓ How far back does the data go?
For most S&P 500 stocks, quarterly data starts in the early 2000s or earlier. For macro data, annual series often go back to 1960. The exact start date depends on the specific metric and company.
❓ Is the data quarterly or annual?
Stock data is quarterly by default (the scraper uses the quarterly frequency endpoint). Macro data frequency depends on the chart - GDP is annual, CPI may be monthly or annual.
❓ Are the values in billions or millions?
Values are in the same units as displayed on the Macrotrends chart - typically billions of USD for revenue and market cap, dollars per share for EPS, and a ratio for PE. Check the source page for the unit label.
❓ How do I get data for a different company or country?
Just change the startUrl to any Macrotrends chart URL. Navigate to macrotrends.net, find the chart you want, and copy the URL from your browser.
❓ How fast is the scraper?
Typically under 5 seconds per URL. Data is embedded in the page HTML, so no pagination or JavaScript rendering is needed.
❓ Will this work if the site changes its layout?
The scraper targets the data layer (JavaScript variables embedded in the page), which is more stable than HTML structure. If Macrotrends changes its data format, the actor will be updated.
❓ Is there a limit on how many records I can get?
Free users get up to 10 records as a preview. Paid users can set maxItems up to 1,000,000. Most charts have 50-200 records of history, so a single run typically uses minimal compute.
❓ Can I run multiple URLs in one run?
The current version supports one URL per run. To scrape multiple metrics or tickers, run the actor multiple times (or use Apify's parallelism features).
❓ Do I need a Macrotrends account?
No. The data is publicly available without login.
🔌 Integrate with any app
Export the dataset in your preferred format and connect to:
Spreadsheets: Google Sheets, Microsoft Excel, LibreOffice Calc
Databases: PostgreSQL, MySQL, MongoDB, Snowflake, BigQuery, Redshift
BI Tools: Tableau, Power BI, Looker, Metabase, Grafana
Data Pipelines: Airbyte, Fivetran, dbt, Apache Airflow
No-code Platforms: Airtable, Notion, Coda, Retool
Automation: Make (Integromat), Zapier, n8n, Pipedream
Programming: Python (pandas, requests), Node.js, R, Julia
🔗 Recommended Actors
| Actor | Description |
|---|---|
| HUD User Data Scraper | Scrape US housing data from HUD including fair market rents and income limits |
| FINRA BrokerCheck Scraper | Extract financial advisor and broker records from FINRA |
| USGS Earthquake Scraper | Real-time and historical seismic data from USGS |
| EPA AQS Air Quality Scraper | Air quality monitoring data from the EPA AQS database |
| World Bank Data Scraper | 16,000+ World Bank economic indicators by country |
💡 Pro Tip: browse the complete ParseForge collection to find scrapers for financial data, government databases, job boards, and more.
Disclaimer: This actor is not affiliated with, endorsed by, or sponsored by Macrotrends. It accesses only publicly available data. Use in accordance with Macrotrends' terms of service and applicable laws. Data accuracy depends on the source; always verify critical figures before use in financial decisions.