Macrotrends Scraper avatar

Macrotrends Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Macrotrends Scraper

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

Crawler Bros

Maintained by Community

Actor stats

4

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

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

ParameterTypeDescription
modeString (required)What data to fetch. Options: stockPrice, revenue, earnings, netIncome, peRatio, macroIndicators
tickerStringStock ticker symbol (e.g. AAPL, MSFT, TSLA). Required for stock/fundamental modes
frequencyStringData granularity: monthly, quarterly, or annual
indicatorStringMacro indicator for macroIndicators mode (e.g. fed-funds-rate)
fromYearIntegerFilter stock price history from this year (e.g. 2020)
toYearIntegerFilter stock price history up to this year (e.g. 2024)
maxItemsIntegerMaximum number of records to return (1–10,000, default 500)

Available Modes

  • stockPrice — Historical OHLCV stock prices with moving averages
  • revenue — Income statement revenue (quarterly or annual)
  • earnings — EPS diluted (quarterly or annual)
  • netIncome — Net income (quarterly or annual)
  • peRatio — Price-to-earnings ratio history
  • macroIndicators — Economic indicators

Available Macro Indicators

IndicatorDescription
fed-funds-rateFederal Reserve target interest rate
us-10-year-treasury-rate10-Year US Treasury bond yield
us-gdpUS GDP growth rate
us-inflation-rateUS Consumer Price Index inflation rate
us-unemployment-rateUS unemployment rate
sp500-historical-returnsS&P 500 index historical returns

Output Fields

Each record includes:

FieldTypeDescription
tickerStringStock ticker symbol (stock/fundamental modes)
indicatorStringMacro indicator name (macroIndicators mode)
dateStringDate in YYYY-MM-DD format
frequencyStringData frequency (monthly/quarterly/annual)
metricNameStringHuman-readable metric name
valueNumberPrimary metric value (close price, revenue, EPS, etc.)
openNumberOpening price (stockPrice mode only)
highNumberDaily high price (stockPrice mode only)
lowNumberDaily low price (stockPrice mode only)
closeNumberClosing price (stockPrice mode only)
volumeNumberTrading volume in millions (stockPrice mode only)
unitStringUnit of measurement (e.g. "Billions USD", "%")
sourceStringAlways "Macrotrends"
metricUrlStringDirect URL to the Macrotrends page
scrapedAtStringISO 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.