beginner
5 minQuickstart: First Query in 60 Seconds
Install valuein-sdk and pull Apple's annual revenue history with one query — no API key needed.
SDKDuckDBfundamentals
## Install the SDK
Install `valuein-sdk` from PyPI. Either `pip` or `uv` works in any virtual environment — the SDK requires Python 3.10+ and ships DuckDB transitively. **No API key required to start** — the SDK falls back to the SAMPLE dataset (S&P 500, last 5 years) automatically.
bash
# pip (universal)python -m venv .venv && source .venv/bin/activatepip install valuein-sdk # uv (faster — https://docs.astral.sh/uv/)uv venv && source .venv/bin/activateuv pip install valuein-sdk## Authenticate and Run Your First Query
python
from valuein_sdk import ValueinClient, ValueinError try: with ValueinClient() as client: # AAPL annual revenue, one row per fiscal year (latest-filed value) df = client.run_query(""" SELECT period_end, numeric_value / 1e9 AS revenue_bn, accepted_at FROM fact WHERE standard_concept = 'TotalRevenue' AND entity_id = '0000320193' -- AAPL CIK AND fiscal_period = 'FY' QUALIFY ROW_NUMBER() OVER ( PARTITION BY period_end ORDER BY accepted_at DESC ) = 1 ORDER BY period_end DESC LIMIT 10 """) print(df)except ValueinError as e: print(f"Error: {e}")Output
period_end revenue_bn accepted_at
0 2025-09-27 416.161 2025-10-31 10:01:26-04:00
1 2024-09-28 391.035 2025-10-31 10:01:26-04:00
2 2023-09-30 383.285 2025-10-31 10:01:26-04:00
3 2022-09-24 394.328 2024-11-01 10:01:36-04:00
4 2021-09-25 365.817 2023-11-02 22:08:27-04:00Try it yourself
Every snippet runs on the free sample with no token. Add one to run this notebook against all 120.5M+ SEC EDGAR facts.