Now serving 105M+ standardized SEC EDGAR factsBrowse the Data Catalog →
Valuein
Python SDK

Python SDK Guide

From install to your first DataFrame in 60 seconds.

Install

Install

bash
pip install valuein

Authenticate

Authenticate

python
import valuein as v

v.authenticate(api_key="vi_live_your_api_key_here")

First Query

Your First Query

python
import valuein as v

v.authenticate(api_key="vi_live_your_api_key_here")

# Fetch 10 years of AAPL income statement data
df = v.fundamentals(
    ticker="AAPL",
    form_type="10-K",
    period="10y"
).to_dataframe()

print(df[["period_end", "revenue", "net_income", "eps_diluted"]].head())

Point-in-Time

Bitemporal (Point-in-Time) Query

python
import valuein as v
from datetime import date

v.authenticate(api_key="vi_live_your_api_key_here")

# What did we KNOW about AAPL's FY2022 revenue as of Jan 1, 2023?
# (before any restatements filed after that date)
df = v.fundamentals(
    ticker="AAPL",
    form_type="10-K",
    as_of=date(2023, 1, 1)  # knowledge_at filter
).to_dataframe()

print(df[["period_end", "revenue", "knowledge_at"]])

Screener

Screen the S&P 500

python
import valuein as v
import pandas as pd

v.authenticate(api_key="vi_live_your_api_key_here")

# Find S&P 500 companies with ROE > 20% and D/E < 1.0 in the latest fiscal year
df = v.screener(
    universe="sp500",
    filters={
        "roe": (">=", 0.20),
        "debt_to_equity": ("<=", 1.0),
    },
    fields=["ticker", "company_name", "roe", "debt_to_equity", "eps_diluted"]
).to_dataframe()

print(df.sort_values("roe", ascending=False).head(20))

Error Handling

Error Handling

python
import valuein as v
from valuein.exceptions import AuthenticationError, RateLimitError, NotFoundError

try:
    df = v.fundamentals(ticker="AAPL", form_type="10-K").to_dataframe()
except AuthenticationError:
    print("Invalid API key — check your key at valuein.biz/api-keys")
except RateLimitError as e:
    print(f"Rate limit hit. Retry after {e.retry_after}s")
except NotFoundError:
    print("No data found for this ticker or form type")

Ready to pull real data?

Generate your API key and run these examples against live SEC EDGAR data.

Get API Key — Free Tier Available