MCP Server live — AI agents can now query 105M+ SEC facts. Connect your agent →
ValueinValuein
beginner
5 min

Quickstart: First Query in 60 Seconds

Install valuein-sdk, authenticate, and pull your first 10 years of Apple revenue data.

SDKDuckDBfundamentals
## Install the SDK Install `valuein-sdk` from PyPI. It requires Python 3.9+ and DuckDB.
bash
pip install valuein-sdk
## Authenticate and Run Your First Query
python
from valuein_sdk import ValueinClient, ValueinError

try:
    with ValueinClient() as client:
        # Pull AAPL annual revenue, last 10 years
        df = client.query("""
          SELECT 
            fiscal_year,
            period_end,
            numeric_value / 1e9 AS revenue_bn
          FROM fact
          WHERE standard_concept = 'TotalRevenue'
            AND entity_id = '0000320193'  -- AAPL CIK
            AND fiscal_period = 'FY'
          ORDER BY fiscal_year DESC
          LIMIT 10
        """)
        print(df)
except ValueinError as e:
    print(f"Error: {e}")
Output
   fiscal_year  period_end  revenue_bn
0         2024  2024-09-28      391.04
1         2023  2023-09-30      383.29
2         2022  2022-09-24      394.33
3         2021  2021-09-25      365.82
4         2020  2020-09-26      274.52

Try it yourself

Get your API token and run this notebook against 105M+ real SEC EDGAR facts.