Introduction
The Nivvuro API gives programmatic access to normalized fundamental data: income statement, balance sheet, cash flow and derived ratios, annual and quarterly, with the same schema in every covered market (currently US, JP and KR). All responses are JSON and every request is authenticated with an API key.
The API also serves country-level macroeconomic data: one JSON file per country with annual metrics from the World Bank and the IMF. See Macro data.
The examples in these docs are written in Python, so you can build a complete program (a screener, a valuation model, a data pipeline) without touching a console.
Base URL: https://nivvuro-api.nivvuro.workers.dev/v1
Authentication
Sign in, open Settings → API Usage and click Generate API key. The free tier doesn't require a card. Send the key with every request in the Authorization header:
# HTTP header
Authorization: Bearer nv_live_...
In Python, keep the key in an environment variable rather than in your source code:
# Windows PowerShell
$env:NIVVURO_API_KEY = "nv_live_..."
# macOS / Linux
export NIVVURO_API_KEY="nv_live_..."
Keep your key server-side. A key used directly in browser code is visible to anyone viewing the page source. If a key leaks, use Regenerate in Settings; the old key stops working within about a minute.
Quickstart
Install the two libraries (pip install requests pandas) and run:
import os
import pandas as pd
import requests
BASE_URL = "https://nivvuro-api.nivvuro.workers.dev/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NIVVURO_API_KEY']}"}
r = requests.get(
f"{BASE_URL}/fundamentals/AAPL",
headers=HEADERS,
params={"period": "annual", "limit": 5, "fields": "revenue,net_income,eps_diluted"},
timeout=30,
)
r.raise_for_status()
resp = r.json()
df = pd.DataFrame(resp["data"]).set_index("fiscal_years")
print(df)
You get five years of revenue, net income and diluted EPS as a DataFrame indexed by fiscal year. One request counts as one call against your quota, no matter how many fields or periods it returns.
Python client
For anything beyond a single request, save this small client as nivvuro_client.py next to your script. It adds authentication, error handling, an automatic retry on burst limits, and a remaining counter that tells you how many calls are left.
# nivvuro_client.py
import os
import time
import requests
BASE_URL = "https://nivvuro-api.nivvuro.workers.dev/v1"
class NivvuroError(Exception):
pass
class Nivvuro:
def __init__(self, api_key=None, base_url=BASE_URL):
self.api_key = api_key or os.environ.get("NIVVURO_API_KEY")
if not self.api_key:
raise NivvuroError("Missing API key (argument or NIVVURO_API_KEY).")
self.base_url = base_url.rstrip("/")
self.session = requests.Session()
self.session.headers["Authorization"] = f"Bearer {self.api_key}"
self.remaining = None # calls left in the current period
def _get(self, path, params=None, retry=True):
r = self.session.get(f"{self.base_url}{path}", params=params, timeout=30)
self.remaining = r.headers.get("X-RateLimit-Remaining", self.remaining)
if r.status_code == 429:
code = r.json()["error"]["code"]
if code == "burst_limit" and retry: # too fast: wait, retry once
time.sleep(int(r.headers.get("Retry-After", 10)))
return self._get(path, params, retry=False)
if not r.ok:
err = r.json()["error"]
raise NivvuroError(f"{r.status_code} {err['code']}: {err['message']}")
return r.json()
def fundamentals(self, ticker, period="annual", limit=5, fields=None, country=None):
params = {"period": period, "limit": limit}
if fields:
params["fields"] = ",".join(fields)
if country:
params["country"] = country
return self._get(f"/fundamentals/{ticker}", params)
def companies(self, country=None, page=1, page_size=100):
params = {"page": page, "page_size": page_size}
if country:
params["country"] = country
return self._get("/companies", params)
def to_dataframe(resp):
"""Column-oriented API response -> pandas DataFrame indexed by period."""
import pandas as pd
data = dict(resp["data"])
key = "fiscal_years" if resp["period"] == "annual" else "fiscal_quarters"
return pd.DataFrame(data).set_index(key)
Nivvuro() reads the key from NIVVURO_API_KEY. Errors raise NivvuroError with the HTTP status, the error code and the message, so you can catch them like any other exception.
Examples
Compare companies
Pull the latest value of a few fields for several tickers into one table. With limit=1 each list holds only the newest period.
import pandas as pd
from nivvuro_client import Nivvuro
api = Nivvuro() # reads NIVVURO_API_KEY
rows = {}
for ticker in ["AAPL", "MSFT", "NVDA"]:
resp = api.fundamentals(ticker, limit=1, fields=["roe", "net_margin", "revenue_growth_yoy"])
rows[ticker] = {k: v[-1] for k, v in resp["data"].items() if k != "fiscal_years"}
print(pd.DataFrame(rows).T)
print("Calls left:", api.remaining)
Screen a market
List the covered companies, fetch the fields you filter on, and keep the matches. Ratios are decimals, so 0.20 means 20 %. The values can be None where a company doesn't report a figure, so check before comparing.
import json
from pathlib import Path
from nivvuro_client import Nivvuro
api = Nivvuro()
CACHE = Path("cache")
CACHE.mkdir(exist_ok=True)
def cached(ticker, period="annual", limit=1, fields=()):
"""Disk cache: fundamentals change a few times a year, so never fetch twice."""
f = CACHE / f"{ticker}_{period}_{limit}_{'-'.join(fields)}.json"
if f.exists():
return json.loads(f.read_text())
resp = api.fundamentals(ticker, period=period, limit=limit, fields=list(fields))
f.write_text(json.dumps(resp))
return resp
# Screen US companies: ROE above 20 % and net margin above 15 %
companies = api.companies(country="US", page_size=500)["data"] # 1 call per page
hits = []
for c in companies[:50]: # 1 call per ticker
d = cached(c["ticker"], fields=("roe", "net_margin"))["data"]
roe, margin = d["roe"][-1], d["net_margin"][-1]
if roe is not None and margin is not None and roe > 0.20 and margin > 0.15:
hits.append(c["ticker"])
print(hits)
Every ticker costs one call. A full-market screen therefore needs a paid plan; the free tier (100 calls per month) is meant for building and testing.
Handle errors
from nivvuro_client import Nivvuro, NivvuroError
api = Nivvuro()
try:
resp = api.fundamentals("XXXX")
except NivvuroError as e:
print(e) # 404 not_found: No data for ticker XXXX.
Saving calls
Your quota counts requests, not data volume. Three habits keep usage low:
| Habit | Why |
| Fetch full history once | Use limit=100 to get every available period in a single call instead of one call per year. |
| Cache on disk | Fundamentals change a few times a year. The cached() helper above avoids repeat calls for the same ticker. |
Check api.remaining | Stop a long loop before the quota runs out instead of catching a 429 halfway. |
Companies
Lists the tickers covered by the API, sorted by ticker within each market.
List companies
GET /v1/companies?country=US&page=1&page_size=100
| Param | Type | Description |
| country | string | US, JP or KR (optional, default: all markets) |
| page | integer | Page number, default 1 |
| page_size | integer | Entries per page, default 100, maximum 500 |
Example response:
{
"total": 1243,
"page": 1,
"page_size": 100,
"data": [
{"ticker": "A", "country": "US"},
{"ticker": "AAPL", "country": "US"}
]
}
Fundamentals
Returns income statement, balance sheet, cash flow and ratio data for one ticker.
GET /v1/fundamentals/{ticker}?period=annual&limit=5&fields=revenue,net_income
| Param | Type | Description |
| country | string | Optional: US, JP or KR. Omit to search all covered markets |
| period | string | annual (default) or quarterly |
| limit | integer | Number of most recent periods, default 5, maximum 100 |
| fields | string | Optional comma-separated field names, e.g. revenue,net_income. Omit to return all fields |
Example response:
{
"ticker": "AAPL",
"country": "US",
"period": "annual",
"metadata": {
"symbol": "AAPL",
"name": "Apple Inc.",
"currency": "USD",
"last_updated": "2026-08-02T14:15:20Z"
},
"data": {
"fiscal_years": [2023, 2024, 2025],
"revenue": [383285000000, 391035000000, 416161000000],
"net_income": [96995000000, 93736000000, 112010000000]
}
}
Data conventions
The data object is column-oriented: one array per field, all arrays the same length, aligned by index. This loads straight into a pandas DataFrame.
| Topic | Convention |
| Order | Oldest period first, newest last. values[-1] is the latest period. |
| Period column | fiscal_years (annual, e.g. 2025) or fiscal_quarters (quarterly, period end date, e.g. 2026-06-27). It is always included, even when you pass fields. |
| Currency and units | Monetary values are in the reporting currency (metadata.currency), in full units, not thousands or millions. Per-share values are currency per share. |
| Ratios | Margins, returns and growth rates are decimals: 0.4691 means 46.91 %. |
| Sign | Cash outflows are negative, for example capex. |
| Missing values | null (Python None) where a company doesn't report a figure or a ratio can't be computed, such as growth in the first period. |
Fields
All fields are returned for both annual and quarterly data; book_value_per_share is only available quarterly. Use these names in the fields parameter.
| Group | Fields |
| Income statement | revenue, cost_of_revenue, gross_profit, rd_expense, sga_expense, ebitda, operating_income, interest_expense, income_tax_expense, net_income |
| Per share | eps_basic, eps_diluted, dividends_per_share, shares_outstanding, book_value_per_share |
| Balance sheet | total_assets, current_assets, cash_and_short_term_investments, accounts_receivable, inventory, goodwill, intangible_assets, total_liabilities, current_liabilities, accounts_payable, total_debt, temporary_equity, total_stockholders_equity, total_liabilities_and_equity, retained_earnings, working_capital |
| Cash flow | operating_cash_flow, capex, free_cash_flow, dividends_paid |
| Margins and returns | gross_margin, operating_margin, ebitda_margin, net_margin, fcf_margin, roe, roa, roic, effective_tax_rate, dividend_payout_ratio |
| Leverage and liquidity | debt_to_equity, current_ratio, quick_ratio, interest_coverage_ratio |
| Efficiency | asset_turnover, inventory_turnover, receivables_turnover, payables_turnover |
| Intensity | rd_to_revenue, capex_to_revenue |
| Growth (YoY) | revenue_growth_yoy, net_income_growth_yoy, eps_diluted_growth_yoy |
Macro data
Country-level macroeconomic data: annual metrics across 10 categories (growth, structure, prices, labor, external, monetary, fiscal, demographics, development, energy), taken from World Bank WDI and IMF WEO. One request returns the complete file for one country, with 61 metrics for Canada.
Get a country
GET /v1/macro/{country}
| Param | Type | Description |
| country | string | Path parameter. English country name in lowercase, words joined by underscores, e.g. canada or south_korea |
Response
Shortened example: series are cut to three years.
{
"generated_at": "2026-11-18T18:59:57+00:00",
"source": "World Bank - World Development Indicators",
"license": "CC BY 4.0",
"country": {
"iso3": "CAN",
"iso2": "CA",
"name": "Canada",
"region": "North America",
"income_level": "High income",
"aggregate": false
},
"metric_count": 61,
"metrics": {
"gdp_growth": {
"name": "GDP growth (real)",
"category": "growth",
"unit": "%",
"source": "World Bank WDI",
"stale": false,
"latest": {"year": 2025, "value": 1.74268536175708},
"series": {"2023": 1.95308552199025, "2024": 2.04626605401701, "2025": 1.74268536175708}
},
"gdp_growth_imf": {
"name": "Real GDP growth",
"category": "growth",
"unit": "%",
"source": "IMF WEO",
"stale": false,
"latest": {"year": 2025, "value": 1.8534},
"series": {"...": "..."},
"forecast": {"2026": 1.120226, "2027": 1.734128, "...": "..."}
}
},
"sources": ["IMF WEO", "World Bank WDI"]
}
| Field | Description |
| generated_at | When the file was generated (ISO 8601, UTC) |
| source, license | Primary source and licence of the file |
| country | ISO codes, name, region, income level. aggregate is true for regional or income groups |
| metric_count | Number of metrics in metrics |
| metrics | Object keyed by metric name, see below |
| sources | All sources used in this file |
Every metric has the same shape:
| Field | Description |
| name | Human-readable name |
| category | Category of the metric, e.g. growth, prices, fiscal |
| unit | Unit of the values, e.g. %, % of GDP, USD |
| source | World Bank WDI or IMF WEO |
| stale | True when the latest observation is well behind the rest of the file. Check latest.year before relying on it |
| latest | Most recent observation: year and value |
| series | Annual history as an object keyed by year, e.g. "2024": 2.05 |
| forecast | Only on IMF WEO metrics: projected values for the following years, same shape as series |
Python
import os
import pandas as pd
import requests
BASE_URL = "https://nivvuro-api.nivvuro.workers.dev/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NIVVURO_API_KEY']}"}
r = requests.get(f"{BASE_URL}/macro/canada", headers=HEADERS, timeout=30)
r.raise_for_status()
macro = r.json()
m = macro["metrics"]["gdp_growth"]
growth = pd.Series(m["series"])
growth.index = growth.index.astype(int) # years come as strings
print(m["name"], m["latest"])
# history plus IMF projection in one series
imf = macro["metrics"]["gdp_growth_imf"]
path = pd.Series({**imf["series"], **imf["forecast"]})
Conventions
| Topic | Convention |
| Frequency | Annual. Years are object keys, so sort them numerically if order matters. |
| Missing years | Years without a value are left out, not set to null. Series start at different years per metric. |
| Two sources | Where World Bank and IMF both cover a concept, both are included. IMF WEO metrics end in _imf or _general and carry a forecast. |
| Units | Always given in unit. Ratios are percent values: 1.74 means 1.74 %, unlike the decimals in fundamentals. |
| Attribution | The file carries its licence in license. Keep the source credit when you republish figures. |
Metrics
All metric names with their units, grouped by category, are listed on the Fields page.
Errors
Standard HTTP status codes. Every error response has a machine-readable code and a human-readable message:
{
"error": {
"code": "not_found",
"message": "No data for ticker XXXX."
}
}
| Status | Code | Meaning |
| 400 | invalid_ticker, invalid_period, invalid_country | A parameter has an unsupported value |
| 401 | unauthorized | Missing or invalid API key |
| 404 | not_found | No data for this ticker (in the requested market) |
| 429 | burst_limit | Too many requests in a short time. Wait for Retry-After seconds |
| 429 | quota_exceeded | Your daily or monthly quota is used up. It resets at X-RateLimit-Reset |
| 500 | internal_error | Unexpected error on our side. Retry later |
Rate limits
Two limits apply: a quota per period and a short-term burst limit that protects the service. Only successful (2xx) calls count against the quota. See Data & Pricing for plans.
| Plan | Quota | Burst limit |
| Free | 100 calls per month | 10 per minute |
| Basic | 500 calls per day | 60 per minute |
| Pro | 1,500 calls per day | 60 per minute |
| Enterprise | Custom | 60 per minute |
Every response carries these headers:
| Header | Meaning |
| X-RateLimit-Limit | Quota for the current period |
| X-RateLimit-Remaining | Calls left in the current period |
| X-RateLimit-Reset | Unix time (UTC) when the quota resets |
| Retry-After | On 429: seconds to wait before retrying |
Changelog
v1 · October 2026
Initial release: /v1/companies and /v1/fundamentals/{ticker} for the US, Japan and South Korea, with annual and quarterly data, field selection, and per-key quotas.