Macrotrends Scraper avatar

Macrotrends Scraper

Pricing

from $19.00 / 1,000 results

Go to Apify Store
Macrotrends Scraper

Macrotrends Scraper

Scrapes historical financial and macro data from Macrotrends chart pages. Returns each data point as a flat row with date, value, and chart title.

Pricing

from $19.00 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

7

Total users

0

Monthly active users

3 days ago

Last modified

Share

ParseForge

Macrotrends Scraper

Scrape Macrotrends historical financial data from any stock or macro chart URL, up to a million records per run. Every row comes with the date, value, and chart title in one flat schema. No login or API key. Export to CSV, JSON, Excel, or XML.

Macrotrends publishes decades of stock fundamentals, price history, and country-level economic indicators, but the site has no public API and downloading each chart by hand is slow. This Actor reads the chart pages directly, extracts the underlying data series, and returns every point as a clean row. Feed it a stock chart like AAPL revenue or a macro chart like USA GDP, and it handles the rest.

Who uses itWhat they scrape Macrotrends for
Financial analystsPull a company's full revenue or earnings history into a spreadsheet for modeling.
Quant researchersBuild a time series dataset of stock fundamentals across many tickers.
EconomistsDownload country-level indicators like GDP or inflation for cross-country studies.
Data engineersAutomate Macrotrends data collection into a warehouse or pipeline.
InvestorsCompare long-term valuation metrics like PE ratio across companies.

What it does

This Actor collects historical data points from Macrotrends chart pages and returns each one as a flat row with the date, value, and chart title.

  • ๐Ÿ“ˆ Stock charts: revenue, net income, EPS, PE ratio, stock price, and more for any ticker.
  • ๐ŸŒ Macro charts: GDP, inflation, unemployment, debt, and other country-level indicators.
  • ๐Ÿ”— Direct URL input: paste any Macrotrends chart URL and get the data behind it.
  • ๐Ÿ“Š Flat row output: each record has the date, value, and chart title, ready for CSV or JSON.
  • โš™๏ธ Max records control: cap the run at any number from 1 to 1,000,000.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Macrotrends data

๐Ÿ“Š Build a fundamentals dataset.

A quant researcher runs the Actor on a list of stock chart URLs and collects revenue, earnings, and PE ratio history into one CSV for backtesting.

๐ŸŒ Track economic indicators.

An economist scrapes GDP and inflation charts for several countries and compares long-term trends in a spreadsheet.

๐Ÿ“ˆ Monitor valuation over time.

An investor pulls the PE ratio history for a watchlist of stocks to spot when valuations are stretched.

๐Ÿ” Automate data refreshes.

A data engineer schedules the Actor to update a warehouse table with the latest Macrotrends data every week.

Why choose this scraper

What you get
No API keyMacrotrends has no official API, so this Actor reads the public chart pages directly.
One fixed schemaEvery chart returns the same flat structure, so you can merge stock and macro data easily.
Historical depthGet the full series shown on the chart, often decades of annual or quarterly data.
Export anywhereDownload as CSV, JSON, Excel, or XML for use in any tool.

How it compares

This Actor and the other Macrotrends Scraper both target Macrotrends chart data, but this one focuses on a simple one-URL input with a flat row output.

FeatureParseForgeMacrotrends Scraper
Stock chart dataYesYes
Macro/country chart dataYesYes
Single URL inputYesNot listed
Max records limitYesNot listed
Flat row outputYesNot listed

Configure the run

Drive the Actor from a single Macrotrends chart URL and set a maximum record count to keep runs predictable. The Input tab lists every parameter.

A first run with the defaults:

{
"startUrl": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue",
"maxItems": 10
}

A larger pull:

{
"startUrl": "https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue",
"maxItems": 200
}

Pricing

Pay-per-result: $0.21 per result collected. You pay only for the results written to your dataset.

Results collectedApproximate cost
100 results$21.00
1,000 results$210.00
10,000 results$2100.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Macrotrends Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Macrotrends through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/macrotrends-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Make sure the startUrl points to a valid Macrotrends chart page, not a homepage or search page. Also check that maxItems is at least 1. If the page has no chart data, the Actor will return an empty dataset.

The run fails with an error.

Verify the URL is correct and accessible in a browser. Macrotrends may block automated requests occasionally, so retry after a few minutes. If the problem persists, check the Actor log for details.

Some data points are missing.

The Actor extracts exactly what is shown on the chart. If Macrotrends truncates the series or uses a different chart type, some points may not be available. Try a different chart URL for the same metric.

The output has unexpected fields.

The schema is fixed for all charts, but some fields may be empty if the chart does not provide that information. Check the sample output to see the expected structure.

Can I scrape a list of URLs?

The Actor takes one startUrl per run. To process multiple URLs, use Apify's API or scheduler to run the Actor once per URL, or build a small script that calls it in a loop.

FAQ

QuestionAnswer
What exactly does this Actor scrape from Macrotrends?It extracts the data points behind any Macrotrends chart page, including stock fundamentals like revenue and earnings, stock price history, and macroeconomic indicators like GDP or inflation. Each point is returned as a row with the date, value, and chart title.
Do I need a Macrotrends account or API key?No. The Actor reads the public chart pages directly, so there is no login or key required.
Can I scrape multiple charts in one run?The input accepts one start URL per run. To scrape multiple charts, run the Actor once per URL or use Apify's scheduler or API to loop over a list.
What format is the output data in?Each record is a flat object with fields like date, value, and chart title. You can export the dataset as CSV, JSON, Excel, or XML.
How far back does the data go?It depends on the chart. Macrotrends often provides decades of annual or quarterly history, and the Actor returns whatever is shown on the page.
Does it work for both stocks and country macro data?Yes. Any Macrotrends chart URL works, whether it is a stock chart like AAPL revenue or a macro chart like USA GDP.
Can I limit how many records are collected?Yes, set the maxItems input to any number from 1 to 1,000,000. The Actor stops after that many rows.
Is the data live or historical?The Actor scrapes the data as it appears on the Macrotrends page at run time, which includes the full historical series shown on the chart.
What if the chart page changes or breaks?Macrotrends occasionally updates its page structure. If you see missing data, check that the URL is still valid and try again. The Actor is maintained to handle common changes.
Can I use this for commercial purposes?You should review Macrotrends' terms of service for your use case. The Actor only accesses publicly available pages.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Macrotrends LLC. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.