Investing.com is one of the best free sources of market data: stocks, ETFs, forex, crypto, commodities, bonds, plus the economic calendar most traders keep open all day. The problem is that Investing.com has no public API, and DIY scrapers tend to break whenever the site changes.
I maintain an unofficial Investing.com Ultimate API on RapidAPI that returns this data as clean JSON. This post shows how to use it from Python and Node.js.
What you can get
- Quotes & overview for stocks, ETFs, funds, indices, forex pairs, crypto, commodities, bonds and certificates
- Historical prices (daily, weekly, monthly OHLC) with custom date ranges
- Economic calendar filtered by country and importance, plus earnings, dividends, IPO, splits and market-holiday calendars
- Company data: profile, financial statements, ratios, earnings, analyst forecasts
- Technical analysis, market movers, news, and symbol search by ticker, ISIN or name
- 32 languages and price conversion to any currency
Setup
- Get an API key on the RapidAPI listing.
- Send two headers with every request:
X-RapidAPI-Key: YOUR_KEY
X-RapidAPI-Host: investing-com-ultimate-api.p.rapidapi.com
Python
import requests
HOST = "investing-com-ultimate-api.p.rapidapi.com"
HEADERS = {"X-RapidAPI-Key": "YOUR_KEY", "X-RapidAPI-Host": HOST}
def get(path, **params):
r = requests.get(f"https://{HOST}{path}", headers=HEADERS, params=params, timeout=30)
r.raise_for_status()
return r.json()
# 1. Apple quote
print(get("/v2/stocks", symbol="AAPL", country="US"))
# 2. Apple daily prices since January 2025
print(get("/v2/stocks/historical", symbol="AAPL", country="US", **{"from": "2025-01-01"}))
# 3. This week's high-impact US economic events
print(get("/v2/calendars/economic", countries="US", importance="high"))
The v2 pattern is the same for every asset class: pick the asset (stocks, etfs, indices, currencies, crypto, commodities, bonds...), pass a symbol, and add country for stocks and ETFs. Append /historical, /technical or /news for more.
Node.js
const HOST = "investing-com-ultimate-api.p.rapidapi.com";
async function get(path, params = {}) {
const url = `https://${HOST}${path}?${new URLSearchParams(params)}`;
const res = await fetch(url, {
headers: { "X-RapidAPI-Key": process.env.RAPIDAPI_KEY, "X-RapidAPI-Host": HOST },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
return res.json();
}
console.log(await get("/v2/currencies", { symbol: "EUR/USD" }));
console.log(await get("/v2/crypto/technical", { symbol: "BTC" }));
console.log(await get("/v2/markets/movers", { country: "US", type: "gainers" }));
Ideas for what to build
- A trading bot or backtester fed with historical OHLC data
- A Telegram/Discord bot that posts high-impact economic events before they hit
- A portfolio tracker or stock screener
- A macro dashboard combining the economic calendar with index and bond yields
Links
- Full endpoint list and runnable examples: github.com/BelNaruto/investing-com-api
- API key and docs: RapidAPI listing
- Questions or endpoint requests: Telegram @pintoflow
Not affiliated with or endorsed by Investing.com.
Top comments (0)