Skip to content

Macrotrends API: Get long-term price history

Gets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.

Unofficial. Not affiliated with or endorsed by Macrotrends.

Inputs

Values from the run on Oct 31, 2026, shown under Output.

Asset, requiredasset

Commodity or stock index name, for example gold, crude oil, or S&P 500.

gold

End Year optionalend_year

Last calendar year to include, for example 2024. Defaults to the last available year.

2024

Whole number. Default 9999.

Start Year optionalstart_year

First calendar year to include, for example 2000. Defaults to the first available year.

2000

Whole number. Default 1900.

Output

From a run on Oct 31, 2026, shortened for this page.
{  "unit": "US dollars per troy ounce",  "asset": "Gold",  "price_history": [    {      "year": 2024,      "page_url": "https://www.macrotrends.net/1333/historical-gold-prices-100-year-chart",      "year_low": 2039.1538,      "year_high": 2746.7019,      "year_open": 2039.1538,      "year_close": 2624.603,      "annual_change_percent": 27.23,      "average_closing_price": 2404.58,      "inflation_adjusted_value": 2792.81    },    {      "year": 2023,      "page_url": "https://www.macrotrends.net/1333/historical-gold-prices-100-year-chart",      "year_low": 1826.7404,      "year_high": 2062.9233,      "year_open": 1928.1201,      "year_close": 2062.9233,      "annual_change_percent": 13.08,      "average_closing_price": 1953.69,      "inflation_adjusted_value": 2258.53    },    {      "year": 2022,      "page_url": "https://www.macrotrends.net/1333/historical-gold-prices-100-year-chart",      "year_low": 1632.38,      "year_high": 1953.04,      "year_open": 1796.12,      "year_close": 1824.3233,      "annual_change_percent": -0.23,      "average_closing_price": 1798.96,      "inflation_adjusted_value": 2064.26    }  ]}
Price
1 credit per completed run (1¢ with pay as you go); failed runs are free.
Method
macrotrends.net/get_long_term_price_history
Returns
asset, unit, yearly average, open, high, low, close, annual change percent, inflation-adjusted value

Use it from your agent

Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method macrotrends.net/get_long_term_price_history with the inputs above.

Ask your agent

  • Show me yearly gold prices from 1970 to 2024 with the open, high, low, close and annual percent change for each year
  • I need the inflation-adjusted average price of crude oil for every year since 1980 from macrotrends.net
  • What were the Dow Jones annual closing values and year-over-year changes between 1929 and 1950?
  • Pull the full yearly price history of silver, including average price and inflation-adjusted value, using Macrotrends data
  • Give me copper's annual high and low prices per pound from 2000 through 2023

See more

  • Returns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.

    finance.yahoo.com/get_price_history
  • Gets current commodity prices and price movements from the Trading Economics commodities page, in the page's group order; filter by a commodity name, slug, symbol or group (e.g. copper, energy), or leave blank for all groups including Electricity.

    tradingeconomics.com/get_commodity_prices
  • Gets current quoted prices for energy, metals, and agricultural commodities from Investing.com's real-time futures page, optionally for one commodity. Some quotes may be delayed or indicative; units are null when the contract specification is missing.

    investing.com/get_commodity_prices
  • Gets the current quoted price and key figures for a stock, fund, index, or cryptocurrency on Google Finance, by name or ticker. Prices may be delayed, and figures Google does not show are null.

    google.com/get_quote
  • Gets Kitco spot bid, ask, daily change and range for gold, silver, platinum or palladium. Non-USD prices use Kitco's current exchange rate, so converted daily changes are not adjusted for exchange-rate moves since the prior close.

    kitco.com/get_precious_metal_prices
  • Looks up a stock, fund, index, or cryptocurrency by name or ticker and returns its latest displayed price and key statistics. Unavailable figures are null; quotes may be delayed.

    finance.yahoo.com/get_quote
  • Gets a coin's daily prices and price change over the last 7, 30, 90 or 365 days, with UTC dates. Today's price may change.

    coingecko.com/get_coin_price_history
  • Gets Binance spot price candles for a coin and quote currency, newest by default or within a UTC date range, up to 1,000 candles.

    binance.com/get_price_history