Marketstack API

⭐ Beginner's Pick Finance / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Marketstack is a real-time, intraday, and historical stock market data API covering 70 plus global exchanges. It uses a simple API key for authentication and returns end-of-day, intraday, and ticker data in JSON format. Beginners will appreciate its clear documentation and a free tier that allows up to 100 requests per month.

💡

Beginner Tip

The free tier only supports HTTP (not HTTPS) — upgrade to a paid plan if you need secure connections. Start with the /eod endpoint to fetch end-of-day prices for any stock symbol.

Available Data

stock price and symbol
open/close/high/low values
trading volume
market cap
historical price data

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Marketstack",
    "description": "Real-Time, Intraday & Historical Market Data API",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

symbol Stock ticker symbol, e.g. AAPL for Apple Inc.
date Trading date in ISO 8601 format
open Opening price for the trading session
close Closing price for the trading session
high Highest price reached during the trading session
volume Total number of shares traded during the session

Implementation Example

const url = "https://marketstack.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

101 invalid_access_key Access key is missing or incorrect
Pass your key as ?access_key=YOUR_API_KEY in every request URL
105 https_access_restricted Trying to use HTTPS on the free plan
Use http:// instead of https:// on the free tier, or upgrade to a paid plan for HTTPS support
Empty data array Querying a symbol that does not exist on the exchange
Verify the ticker symbol is correct and supported by Marketstack; use the /tickers endpoint to look up valid symbols

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to Marketstack

Technical alternatives for different use cases.

Broader coverage including forex, crypto, and technical indicators

Better For

Multi-asset analysis with technical indicators

Trade-off

Simple stock price lookups (more complex API)

Free WebSocket for real-time prices, plus company profiles

Better For

Real-time price updates and company fundamentals

Trade-off

Batch historical data retrieval

Includes news data alongside stock prices

Better For

Apps that combine price data with news feeds

Trade-off

Historical data going back decades

Similar APIs

View All →