+
VectorFin

VectorFin Python Client

Query VectorFin via REST API or pyiceberg — pandas DataFrames, semantic search, and full signal pipelines in Python.

2 min
Setup time
7
Iceberg tables
5K+
US tickers
Nightly
Updates

Prerequisites

📋VectorFin Free plan
🔑API key from app.vectorfinancials.com
☁️Python account

Connection Guide

1

Install and authenticate

Install requests (or httpx) and set your VectorFin API key.

python
pip install requests pandas numpy

import os
VF_API_KEY = os.environ["VECTORFIN_API_KEY"]  # from app.vectorfinancials.com
2

Fetch embeddings via REST API

Pull transcript embeddings for a ticker using the VectorFin REST API.

python
import requests, pandas as pd

resp = requests.get(
    "https://api.vectorfinancials.com/v1/embeddings/transcripts/AAPL",
    params={"fiscal_period": "2024-Q3"},
    headers={"X-API-Key": VF_API_KEY},
)
resp.raise_for_status()

data = resp.json()
df = pd.DataFrame(data["chunks"])
print(f"Fetched {len(df)} chunks for AAPL 2024-Q3")
print(df[["chunk_idx", "text_preview"]].head())
3

Semantic search over earnings calls

Use cosine similarity to find the most relevant earnings call passages for a query.

python
import numpy as np

# Fetch all AAPL embeddings
resp = requests.get(
    "https://api.vectorfinancials.com/v1/embeddings/transcripts/AAPL",
    headers={"X-API-Key": VF_API_KEY},
)
chunks = resp.json()["chunks"]
E = np.array([c["embedding"] for c in chunks])

# Your query embedding (use Gemini text-embedding-004 or similar)
query = np.array([...])  # 768-dim

# Cosine similarity
sims = E @ query / (np.linalg.norm(E, axis=1) * np.linalg.norm(query))
top5 = np.argsort(sims)[::-1][:5]
for i in top5:
    print(f"[{chunks[i]['fiscal_period']} chunk {chunks[i]['chunk_idx']}] sim={sims[i]:.3f}")
4

Fetch quant signals

Pull all signal types for a ticker in one call.

python
# Fetch composite whystock score
signals = requests.get(
    "https://api.vectorfinancials.com/v1/signals/NVDA",
    params={"signal_type": "whystock_score", "start_date": "2024-01-01"},
    headers={"X-API-Key": VF_API_KEY},
).json()

df = pd.DataFrame(signals["data"])
df["date"] = pd.to_datetime(df["date"])
df = df.set_index("date").sort_index()

import matplotlib.pyplot as plt
df["score"].plot(title="NVDA VectorFin Score 2024")
plt.show()

Available Tables

All 7 VectorFin data tables — bitemporal (effective_ts + knowledge_ts), append-only, nightly updates.

/v1/embeddings/transcripts/{ticker}Earnings call embeddings per ticker
sql
requests.get("https://api.vectorfinancials.com/v1/embeddings/transcripts/AAPL", headers={"X-API-Key": key})
/v1/embeddings/filings/{ticker}SEC filing embeddings
sql
requests.get("https://api.vectorfinancials.com/v1/embeddings/filings/MSFT", params={"filing_type": "10-K"}, headers={"X-API-Key": key})
/v1/signals/{ticker}All signal types for a ticker
sql
requests.get("https://api.vectorfinancials.com/v1/signals/NVDA", params={"signal_type": "whystock_score"}, headers={"X-API-Key": key})
/v1/signals/batchBatch signals for multiple tickers
sql
requests.post("https://api.vectorfinancials.com/v1/signals/batch", json={"tickers": ["AAPL","MSFT","NVDA"]}, headers={"X-API-Key": key})
/v1/embeddings/searchVector similarity search
sql
requests.post("https://api.vectorfinancials.com/v1/embeddings/search", json={"query_vector": [...], "top_k": 10}, headers={"X-API-Key": key})

Start querying in 2 minutes

Sign up for VectorFin and get immediate API access.