Documentation

Everything you need to call the API.

This page covers the workflow: signing up, authenticating, rate limits, and reading a response. For the exhaustive, always-current shape of every field, use the API Reference (auto-generated from the running API).

00

Before you start: the five questions we'd ask too

01

Quickstart

Three steps: get a key, call an endpoint, read the response. No credit card, no email verification -- POST /v1/signup issues a free-tier key instantly.

0. Try it right now -- no signup required

/statements is one of the two public endpoints (see step 3 below), so this works before you've done anything else:

income-statement.sh
curl "https://api.clearyfi.com/v1/companies/AAPL/statements/income?year=2023&period=FY"
income-statement.py
import requests

resp = requests.get(
    "https://api.clearyfi.com/v1/companies/AAPL/statements/income",
    params={"year": 2023, "period": "FY"},
)
statement = resp.json()
for line in statement["lines"]:
    print(line["canonical_concept"], line["value"], "from", line["source_tag"])

Response includes Apple's real FY2023 revenue, gross profit, operating income, net income, and diluted EPS -- each line carrying the exact source gaap_tag it was mapped from, for audit. interest_expense is deliberately absent: Apple nets it into other income/expense rather than tagging it discretely, so we surface that as a documented gap instead of guessing a value.

1. Sign up for a key

signup.sh
curl -X POST https://api.clearyfi.com/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'
signup-response.json
{
  "api_key": "sfk_...redacted, shown once...",
  "tier": "free",
  "rate_limit_per_sec": 5,
  "daily_quota": 1000
}

The plaintext key is returned exactly once, in this response. Only its hash is stored -- if you lose it, sign up with a different email (there's no reissue flow yet).

2. Call a gated endpoint with X-API-Key

insider-trades.sh
curl https://api.clearyfi.com/v1/companies/AAPL/insider-trades?limit=5 \
  -H "X-API-Key: sfk_..."

3. Two endpoints need no key at all

/companies/{symbol}/statements/{statement} and /companies/{symbol}/periods are public -- they power the Data Explorer directly from browser JS. They're rate-limited per-IP instead of per-key.

02

Auth & rate limits

Every endpoint except the two statement/period endpoints above requires an X-API-Key header. An invalid, missing, or revoked key gets a 401 before any rate limit is even checked.

Each key has two independent limits: a short-window burst rate (requests/sec, resets continuously) and a daily quota (resets at UTC midnight, tracked per calendar day). Either one being exceeded returns 429. Call GET /v1/usage with your key to see your own trailing daily counts.

TierRate limitDaily quotaHow to get it
free5 req/sec1,000 req/dayDefault -- issued by POST /v1/signup
basic20 req/sec25,000 req/dayManual upgrade (no self-serve billing yet)
pro100 req/sec250,000 req/dayManual upgrade (no self-serve billing yet)

Every signup is issued the free tier today -- there's no payment integration yet, so moving to a paid tier is a manual step on our end rather than something you can trigger yourself. All tiers are free during the beta; the planned prices when billing goes live are $19/mo (basic) and $79/mo (pro), and the free tier's limits won't be reduced (see the terms for the standing commitments).

03

Error codes

StatusMeaningWhat to do next
400Bad request parameter -- e.g. a quarter-end date that isn't a valid calendar quarter-end.Check the parameter against the endpoint's schema in the API Reference; period params must be an actual calendar quarter-end date.
401Missing, unknown, or revoked X-API-Key.Confirm the X-API-Key header is present and spelled correctly. If you never signed up, POST /v1/signup (step 1 above) issues one instantly.
404Unknown ticker/CIK, or no data found for the requested company/period/CUSIP.Verify the ticker/CIK is a real SEC registrant and the period is inside our coverage floor (see §05) -- an empty/404 result never means "nothing was filed," it means outside our coverage window or a typo.
429Per-key burst rate or daily quota exceeded (or, on the two public endpoints, the per-IP burst limit).Back off and retry with backoff; call GET /v1/usage to see your current daily count against your quota. Sustained need for more room means a tier upgrade (see §02), not a workaround.
502 / 503Upstream SEC request timed out, couldn't connect, or returned an error (or, for 503 alone, an internal admin operation was misconfigured).Retry -- these mean the failure was upstream (SEC) or transient, not a bug in your request. If it persists across retries, treat it as a real outage and check /health.
04

Endpoint reference

Grouped by domain. See the API Reference for full request/response schemas and live "Try it out".

Financials public, no key required

EndpointDescription
GET /v1/companies/{symbol}/statements/{statement}One normalized income statement, balance sheet, or cash flow statement for a fiscal period.
GET /v1/companies/{symbol}/periodsFiscal periods with data available for a company.

Insider trades

EndpointDescription
GET /v1/companies/{symbol}/insider-tradesForm 3/4/5 insider transactions, most recent filings first.

Institutional ownership

EndpointDescription
GET /v1/companies/{symbol}/beneficial-ownershipSchedule 13D/13G (5%+ crossing) filings for a company.
GET /v1/companies/{symbol}/institutional-holdersManagers holding a company as of a 13F quarter-end.
GET /v1/companies/{symbol}/institutional-activityDERIVED buy/sell activity for a company, aggregated across all managers.
GET /v1/managers/{manager_cik}/holdingsOne manager's full 13F holdings snapshot for a quarter.
GET /v1/managers/{manager_cik}/activityDERIVED buy/sell activity for one manager vs. the prior quarter.
GET /v1/cusip-resolution-statsCoverage snapshot for 13F CUSIP-to-company resolution.

Account

EndpointDescription
POST /v1/signupIssue a free-tier API key for an email address.
GET /v1/usageYour key's tier, limits, and recent daily request counts.
05

13F & derived-data caveats

13F is a quarter-end holdings snapshot, not a transaction feed. Every "activity" endpoint above computes buy/sell by diffing two consecutive quarters -- it is never SEC-reported trade data. Each of those responses carries an always-present caveats field repeating this.