Alpha Vantage
Alpha Vantage · Company
Real-time and historical stock prices, forex rates, and cryptocurrency data. Free API key with 25 requests/day — no credit card required.
Authentication
Parameter name: apikey (in query)
Sample Requests
Returns the latest price, volume, and change for a stock symbol.
Hover any highlighted part to learn what it does
curl -X GET "https://www.alphavantage.co/query?apikey=demo&symbol=AAPL&function=GLOBAL_QUOTE"
import requests
params = {
"apikey": "demo",
"symbol": "AAPL",
"function": "GLOBAL_QUOTE"
}
response = requests.get(
"https://www.alphavantage.co/query",
params=params,
)
print(response.json())const url = new URL('https://www.alphavantage.co/query');
url.searchParams.set('apikey', 'demo');
url.searchParams.set('symbol', 'AAPL');
url.searchParams.set('function', 'GLOBAL_QUOTE');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://www.alphavantage.co/query")
q := baseURL.Query()
q.Set("apikey", "demo")
q.Set("symbol", "AAPL")
q.Set("function", "GLOBAL_QUOTE")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.alphavantage.co/query")
uri.query = URI.encode_www_form({
"apikey" => "demo",
"symbol" => "AAPL",
"function" => "GLOBAL_QUOTE"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.alphavantage.co/query?" . http_build_query([
"apikey" => "demo",
"symbol" => "AAPL",
"function" => "GLOBAL_QUOTE"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Returns daily open, high, low, close, and volume for the last 100 trading days.
Hover any highlighted part to learn what it does
curl -X GET "https://www.alphavantage.co/query?apikey=demo&symbol=AAPL&function=TIME_SERIES_DAILY&outputsize=compact"
import requests
params = {
"apikey": "demo",
"symbol": "AAPL",
"function": "TIME_SERIES_DAILY",
"outputsize": "compact"
}
response = requests.get(
"https://www.alphavantage.co/query",
params=params,
)
print(response.json())const url = new URL('https://www.alphavantage.co/query');
url.searchParams.set('apikey', 'demo');
url.searchParams.set('symbol', 'AAPL');
url.searchParams.set('function', 'TIME_SERIES_DAILY');
url.searchParams.set('outputsize', 'compact');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://www.alphavantage.co/query")
q := baseURL.Query()
q.Set("apikey", "demo")
q.Set("symbol", "AAPL")
q.Set("function", "TIME_SERIES_DAILY")
q.Set("outputsize", "compact")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.alphavantage.co/query")
uri.query = URI.encode_www_form({
"apikey" => "demo",
"symbol" => "AAPL",
"function" => "TIME_SERIES_DAILY",
"outputsize" => "compact"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.alphavantage.co/query?" . http_build_query([
"apikey" => "demo",
"symbol" => "AAPL",
"function" => "TIME_SERIES_DAILY",
"outputsize" => "compact"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Get a free API key at alphavantage.co/support/#api-key — instant, no credit card
- Create a new GET request to https://www.alphavantage.co/query
- In the Params tab add: function = GLOBAL_QUOTE, symbol = AAPL, apikey = YOUR_KEY
- You can use apikey = demo for the AAPL and IBM symbols only
- Send — look for Global Quote in the response for the latest price
- Tip: save your key as a Postman variable {{av_key}} to reuse across requests
What can you build with Alpha Vantage?
Alpha Vantage is a Company API. Developers commonly use company APIs for:
- enriching CRM records with company firmographics
- building lead-generation and prospecting tools
- verifying business identity and registration details
- monitoring competitors and market intelligence
- powering B2B data enrichment pipelines
API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?