Macrotrends Scraper
Pricing
from $3.00 / 1,000 results
Macrotrends Scraper
Scrape Macrotrends.net for historical financial data including stock prices, revenue, earnings, PE ratios, and macroeconomic indicators for thousands of stocks and economic metrics
Pricing
from $3.00 / 1,000 results
Rating
5.0
(4)
Developer
Crawler Bros
Maintained by CommunityActor stats
4
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Extract historical financial data from Macrotrends.net — covering stock price history, revenue, earnings per share, net income, P/E ratios, and macroeconomic indicators for thousands of publicly traded companies and economic metrics dating back decades.
What This Actor Does
This actor scrapes Macrotrends.net to retrieve:
- Stock Price History — Daily data aggregated to monthly, quarterly, or annual OHLCV (open, high, low, close, volume) prices
- Revenue — Quarterly and annual revenue figures for any publicly listed company
- Earnings Per Share — Diluted EPS data on a quarterly or annual basis
- Net Income — Quarterly and annual net income figures
- P/E Ratio History — Historical price-to-earnings ratios
- Macroeconomic Indicators — Federal Funds Rate, 10-Year Treasury Rate, GDP, inflation, unemployment, and S&P 500 returns
Input Configuration
| Parameter | Type | Description |
|---|---|---|
mode | String (required) | What data to fetch. Options: stockPrice, revenue, earnings, netIncome, peRatio, macroIndicators |
ticker | String | Stock ticker symbol (e.g. AAPL, MSFT, TSLA). Required for stock/fundamental modes |
frequency | String | Data granularity: monthly, quarterly, or annual |
indicator | String | Macro indicator for macroIndicators mode (e.g. fed-funds-rate) |
fromYear | Integer | Filter stock price history from this year (e.g. 2020) |
toYear | Integer | Filter stock price history up to this year (e.g. 2024) |
maxItems | Integer | Maximum number of records to return (1–10,000, default 500) |
Available Modes
stockPrice— Historical OHLCV stock prices with moving averagesrevenue— Income statement revenue (quarterly or annual)earnings— EPS diluted (quarterly or annual)netIncome— Net income (quarterly or annual)peRatio— Price-to-earnings ratio historymacroIndicators— Economic indicators
Available Macro Indicators
| Indicator | Description |
|---|---|
fed-funds-rate | Federal Reserve target interest rate |
us-10-year-treasury-rate | 10-Year US Treasury bond yield |
us-gdp | US GDP growth rate |
us-inflation-rate | US Consumer Price Index inflation rate |
us-unemployment-rate | US unemployment rate |
sp500-historical-returns | S&P 500 index historical returns |
Output Fields
Each record includes:
| Field | Type | Description |
|---|---|---|
ticker | String | Stock ticker symbol (stock/fundamental modes) |
indicator | String | Macro indicator name (macroIndicators mode) |
date | String | Date in YYYY-MM-DD format |
frequency | String | Data frequency (monthly/quarterly/annual) |
metricName | String | Human-readable metric name |
value | Number | Primary metric value (close price, revenue, EPS, etc.) |
open | Number | Opening price (stockPrice mode only) |
high | Number | Daily high price (stockPrice mode only) |
low | Number | Daily low price (stockPrice mode only) |
close | Number | Closing price (stockPrice mode only) |
volume | Number | Trading volume in millions (stockPrice mode only) |
unit | String | Unit of measurement (e.g. "Billions USD", "%") |
source | String | Always "Macrotrends" |
metricUrl | String | Direct URL to the Macrotrends page |
scrapedAt | String | ISO 8601 timestamp when the record was scraped |
Example Use Cases
Get Apple Stock Price History (Last 5 Years Monthly)
{"mode": "stockPrice","ticker": "AAPL","frequency": "monthly","fromYear": 2020,"maxItems": 60}
Get Tesla Quarterly Revenue
{"mode": "revenue","ticker": "TSLA","frequency": "quarterly","maxItems": 20}
Get Federal Funds Rate History
{"mode": "macroIndicators","indicator": "fed-funds-rate","frequency": "monthly","maxItems": 120}
Frequently Asked Questions
Q: What stocks are available? A: All stocks listed on major US exchanges (NYSE, NASDAQ, etc.) are available. Simply use the ticker symbol (AAPL, GOOGL, AMZN, TSLA, etc.).
Q: How far back does the data go? A: Stock price history is available from the company's IPO date. For well-established companies like Apple, data goes back to 1980. Macro economic indicators often go back 50+ years.
Q: How often is the data updated? A: Macrotrends updates stock data daily and fundamentals quarterly (following earnings releases).
Q: Can I get daily stock prices?
A: The actor retrieves daily data and aggregates it. Use frequency: "monthly" for 1 record per month, "quarterly" for one per quarter, or "annual" for one per year.
Q: Are P/E ratios adjusted for splits? A: Macrotrends provides split-adjusted historical data.
Q: What currencies are revenue/net income in? A: Revenue and net income are reported in billions USD by default (as Macrotrends provides them).
Q: Is proxy or authentication required? A: No. This actor uses browser impersonation (curl_cffi) to access public Macrotrends pages. No authentication is required.