Profitelligence Logo (Light mode) Profitelligence
API Reference

Python Client

The profitelligence package is a typed client over this API. It parses the pipe-delimited CSV for you, so a notebook gets rows and numbers instead of a string to split.

Bash
pip install profitelligence
Python
import profitelligence as prof

prof.api_key("pk_live_...")                    # or set PROFITELLIGENCE_API_KEY
prices = prof.company.ohlc("AAPL", days=90)    # 90 rows, typed
prices[0].close                                # 305.69, a float
prices.df                                      # a DataFrame, with [pandas]

You can also call with no key. Guests reach the free endpoints on the top 500 symbols, which is enough to try the package before you sign up.

When you want your own tier, generate a key in Account settings, or pick a plan first. Keep it out of version control — the package reads PROFITELLIGENCE_API_KEY from the environment.

Namespaces

Nine namespaces cover all 68 endpoints. Every method is generated from the same reference this site is built from, so the package describes exactly the API you see here.

Scroll the table sideways →

NamespaceDataEndpoints
prof.companyProfiles, prices, technical signals, corporate actions9
prof.filings8-K summaries and filing patterns3
prof.form4Insider transactions, clusters, insider profiles21
prof.institutional13F holdings, managers, crowded trades11
prof.financialsIncome statement, balance sheet, cash flow4
prof.fredEconomic series from the Federal Reserve6
prof.discoverySearch, spotlights, interesting companies4
prof.graphThe knowledge graph3
prof.analyticsCorrelations, opportunity scores, strategies7

Each method carries its endpoint's documentation. In a notebook, prof.form4.clusters? shows the arguments, the tier the call needs, and the columns it returns.

Tables

CSV endpoints return a Table: named columns, typed values, and one row object per record. It is a normal Python sequence.

Python
prices = prof.company.ohlc("AAPL,MSFT", days=180)

prices.columns              # ['symbol', 'time', 'open', 'high', 'low', 'close']
prices[0].close             # 305.69            a float
prices[0].time              # date(2026, 8, 17) a date
prices.column("close")      # the whole column
prices.to_dicts()           # plain dictionaries

A column is typed as a whole. If one value will not parse as a number, the column stays text rather than becoming a mix you cannot do arithmetic on. An empty cell is None, never 0 and never "".

For pandas, install the extra. Date columns arrive as datetime64, so resampling and plotting work with no further conversion.

Bash
pip install 'profitelligence[pandas]'
Python
frame = prof.company.ohlc("AAPL", days=365).df
frame.set_index("time").close.resample("W").last()

JSON endpoints — the page routes, FRED, search, and the knowledge graph — return the decoded body as it stands.

Errors

The client raises rather than returning a body you have to check.

Python
try:
    scores = prof.analytics.opportunities()
except prof.UpgradeRequired as error:
    print(error.message)         # the plan this endpoint needs
except prof.RateLimited as error:
    print(error.retry_after)     # seconds until the window resets
ErrorMeans
AuthenticationErrorThe key is absent, wrong, or revoked
UpgradeRequiredYour plan does not include this endpoint or this symbol
RateLimitedThe window is spent. Carries window, limit, remaining, reset
BadRequestAn argument is missing or out of range
NoDataThe API looked and found nothing to return
ServerErrorThe API failed. The client already retried twice
TimeoutNo answer inside the timeout

All of them inherit ProfitelligenceError. A rate limit is never retried for you. Server errors and timeouts are retried twice, with backoff.

The API reports some problems in-band: HTTP 200 with a body of error,<message>. Read raw, that looks like success and parses to nothing. The client raises BadRequest or NoData instead, so an empty result never passes for a real one. A genuinely empty result — a header row with no data rows — stays an empty Table.

In a service

Build a client and hold it. One client is one connection pool.

Python
from profitelligence import Client

with Client(api_key="pk_live_...", timeout=60) as prof:
    holdings = prof.institutional.manager_top_holdings("0001067983")

The client is read-only. Nothing in it writes to your account, and nothing places a trade. It reports what filings and market data show.