Macrotrends Scraper
Spider read macrotrends.net in 147 ms without a browser and returned 72 lines of clean markdown.
# Macrotrends - The Premier Research Platform for Long Term Investors* ##### Stock screener with over 50 performance and fundamental criteria.* ##### 50+ years of historical stock price and dividend data.* ##### 10 years of quarterly stock fundamental data.* ##### 100+ years of inflation-adjusted data for major market indices.* ##### 100+ years of precious metals data.* ##### 45 years of commodity, interest rate and exchange rate data. The same call, in code.
The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on macrotrends.net.
import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.macrotrends.net/stocks/charts/AAPL/apple/revenue");
// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();
console.log(data);
await spider.close(); 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 for volume? Get an API key →
Fields you can pull.
Spider names these from the page. The capture above came back as markdown; the same
call with return_format: "json" returns them as keys.
What macrotrends.net costs to scrape.
The capture above cost $0.000039 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.
- Free balance on signup
- No card required to test
- Balance never expires
Run it keyless, no account
More Finance scrapers.
Yahoo Finance Scraper
Extract stock quotes, financial statements, analyst ratings, and market news from Yahoo Finance.
Google Finance Scraper
Extract stock quotes, market indices, and financial news from Google Finance.
CoinGecko Scraper
Extract cryptocurrency prices, market caps, volume data, and historical charts from CoinGecko.
Start scraping macrotrends.net.
You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.