---
name: alpha-vantage-ingestion
description: "How to get Alpha Vantage data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load Alpha Vantage daily prices into pandas and Parquet for personal research

Source entry: https://signal-lab-jet.vercel.app/datasets/alpha-vantage
Provider: https://www.alphavantage.co
Checked against the provider's documentation: 2026-10-29

## Access
- A free API key is required. Put it in ALPHAVANTAGE_API_KEY.
- The standard terms limit use to personal, non-commercial purposes unless Alpha Vantage agrees otherwise.

## Request
```bash
curl 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=IBM&outputsize=compact&apikey='$ALPHAVANTAGE_API_KEY
```

## Format
JSON: metadata plus a Time Series (Daily) object keyed by date. OHLC and volume values are strings.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""Alpha Vantage daily prices -> pandas -> Parquet. Personal research; free API key."""
import os
import requests
import pandas as pd

params = {"function": "TIME_SERIES_DAILY", "symbol": "IBM", "outputsize": "compact",
          "apikey": os.environ["ALPHAVANTAGE_API_KEY"]}
r = requests.get("https://www.alphavantage.co/query", params=params, timeout=30)
r.raise_for_status()
body = r.json()
if "Time Series (Daily)" not in body:
    raise RuntimeError(body.get("Information") or body.get("Note") or body.get("Error Message") or "Unexpected response")
df = pd.DataFrame.from_dict(body["Time Series (Daily)"], orient="index").rename_axis("date").reset_index()
df["date"] = pd.to_datetime(df["date"])
for column in df.columns[1:]:
    df[column] = pd.to_numeric(df[column])
df.to_parquet("alpha_vantage_ibm_daily.parquet", index=False)
print(len(df), "rows", df["date"].min().date(), "to", df["date"].max().date())
```
Needs a personal API key; not run.

## Limits
- Free service limit: 25 requests per day.
- The compact daily response contains the latest 100 data points; full daily history is premium.

## Quirks
- API errors can arrive as HTTP 200 JSON under Information, Note or Error Message; check those fields before parsing.
- Column names contain numeric prefixes such as 1. open.
- Adjusted daily data is a separate premium endpoint.

## Terms and attribution
- Standard access is for personal, non-commercial use. Commercial use requires a separate agreement.
- Do not redistribute API data unless your agreement permits it.
- Terms page: https://www.alphavantage.co/terms_of_service/

## Sources
- https://www.alphavantage.co/support/: "Claim your free key for the Alpha Vantage Stock API"
- https://www.alphavantage.co/documentation/: "compact returns only the latest 100 data points"
- https://www.alphavantage.co/terms_of_service/: "for personal, non-commercial use, unless you and Alpha Vantage have agreed otherwise in writing"

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
