Skip to main content gottem  — one API for every scraper.
Finance
Verified

Macrotrends Scraper

Download long-term historical financial data, revenue charts, and macroeconomic indicators from Macrotrends. Built on spider-browser .

Get started Docs
target
macrotrends.net
success rate
99.9%
latency
~4ms
Quick start

Extract data in minutes.

macrotrends-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue");
await page.content();

const data = await page.evaluate(`(() => {
  const rows = [];
  document.querySelectorAll("#style-1 table tbody tr").forEach(el => {
    const date = el.querySelector("td:nth-child(1)")?.textContent?.trim();
    const revenue = el.querySelector("td:nth-child(2)")?.textContent?.trim();
    if (date && revenue) rows.push({ date, revenue });
  });
  return JSON.stringify({ total: rows.length, data: rows.slice(0, 20) });
})()`);

console.log(JSON.parse(data));
await spider.close();
ready to run · spider-browser · TypeScript
Fetch API

One endpoint for macrotrends.net.

Structured JSON from macrotrends.net with a single POST. AI-resolved selectors, cached on the first call.

POST /fetch/macrotrends.net/
DateRevenueNet incomeEPSP/E ratioMarket cap
cURL
curl -X POST https://api.spider.cloud/fetch/macrotrends.net/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_format": "json"}'
Python
import requests

resp = requests.post(
    "https://api.spider.cloud/fetch/macrotrends.net/",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={"return_format": "json"},
)
print(resp.json())
Node.js
const resp = await fetch("https://api.spider.cloud/fetch/macrotrends.net/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ return_format: "json" }),
});
const data = await resp.json();
console.log(data);
Extraction

Fields you can pull.

DateRevenueNet incomeEPSP/E ratioMarket capShares outstandingDividend
Data

Market data capture

Extract real-time quotes, charts, and financial metrics from macrotrends.net.

Rendering

Dynamic charts

Full browser rendering for interactive charts, tables, and streaming tickers.

Scale

Bulk screening

Process thousands of tickers and financial instruments concurrently.

Related

More Finance scrapers.

Start

Start scraping macrotrends.net.

Grab an API key and call the endpoint above. The first request resolves the config; every request after hits cache.