9fin 0.2 The data model: identifiers and finding a company
APIs used in this notebook
| API | Version | Endpoints |
|---|---|---|
| News & Content v2 | 0.3.41 | GET /v2/news/headlines |
| Entity | 0.5.7 | GET /v0/entity |
| Instruments (Bonds & Loans) | 0.10.1 | GET /v0/instruments/bonds-and-loans |
| Developer portal (OpenAPI) | n/a | GET /api/v3/apis, /versions, /versions/{id} |
Almost every workflow starts by turning a company name into an entity id. This notebook covers how we organise our data and which identifier each API uses, then the Entity API in detail.
Companies sit at the centre
We give every company an nf_ent_... identifier, and most of our APIs refer to a company by that id rather than by name. So whichever dataset you are heading for, the usual first move is to turn a name into an entity id.
| API | Primary identifier | Company reference | Walkthrough |
|---|---|---|---|
Entity/v0/entity | nf_id, an nf_ent_... | the company itself | this notebook |
News & Content/v2/news | uuid per article | entities.main.nf_id, plus entities.additional | 1.1, 1.2, 1.3 |
Instruments, Bonds & Loans/v0/instruments/bonds-and-loans | nf_id, an nf_ins_... | entity_nf_id | 2.1, 2.2, 2.3 |
Instruments, Private Credit/v0/instruments/private-credit | nf_id, an nf_ins_... | company.nf_id | coming soon |
ABF/v0/abf/deals | deal_code | entity_nf_id | coming soon |
CLO/v0/clo/deals | deal_id | entity_nf_id | coming soon |
Distressed/v0/distressed/restructurings | uuid per restructuring | company.nf_id | coming soon |
Covenant/v0/covenants/data | deal.id | the issuer is named, not referenced by id | coming soon |
BDCs/v0/bdc/holdings | bdc_cik with accession_no | SEC identifiers rather than ours | coming soon |
Six of the nine APIs point at a company through an nf_ent_... id, under one of three field names: entity_nf_id, company.nf_id, or the entities block on an article. Learn that one identifier and most of the platform opens up.
Two exceptions. BDCs is built from SEC filings, so it keys on the filer's CIK and the accession number of the filing. Covenant names its issuer as a string rather than linking one.
The notebooks in bold cover three of these APIs in depth. The rest follow the same conventions, so what you learn here carries over: the same bearer token, the same field__operator filters, the same cursor paging.
The records the covered APIs use, and how they join
| Record | Identifier | What it is |
|---|---|---|
| Entity | nf_ent_... | a company, and also advisors, sponsors and CLO vehicles |
| Instrument | nf_ins_... | one tranche of a bond or a loan |
| Article | a uuid | one piece of news or one third party document |
- An instrument carries
entity_nf_id, the company that issued it. So an entity id gives you a company's whole debt stack, and any instrument gives you its issuer. - An article carries the entities it names, as
entities.mainandentities.additional. So an entity id tells you what has been written about a company. - An instrument also carries a
deal_idand atranche_seq. When an article links an instrument inline it uses that same pair, which is how a news story reaches the exact tranche it discusses.
Nothing is matched on company names. Names are for finding an identifier the first time, which is the rest of this notebook.
%run "9fin 0.1 Authentication - getting a token.ipynb"
import json, re, requests
import pandas as pd
pd.set_option("display.max_colwidth", 120)
The APIs document themselves
Every filter, value and limit quoted in these notebooks comes from our own OpenAPI documents. We publish one for every API, and our developer portal serves them over a JSON API that needs no authentication and does not count against your rate limit. So when you want to know what an endpoint accepts, you can read it rather than guess.
Three calls: list the APIs, list one API's versions, then fetch that version.
PORTAL = "https://console.9fin.com/api/v3"
def api_spec(name_contains):
"""The OpenAPI document 9fin publishes for one of its APIs."""
api = next(a for a in requests.get(f"{PORTAL}/apis", timeout=60).json()["data"]
if name_contains.lower() in a["name"].lower())
versions = requests.get(f"{PORTAL}/apis/{api['id']}/versions", timeout=60).json()["data"]
latest = max(versions, key=lambda v: v["version"])
detail = requests.get(f"{PORTAL}/apis/{api['id']}/versions/{latest['id']}", timeout=60).json()
return json.loads(detail["spec"]["content"])
The catalogue, and the version each API is on today:
catalogue = requests.get(f"{PORTAL}/apis", timeout=60).json()["data"]
pd.DataFrame(sorted((a["name"], a["version"]) for a in catalogue), columns=["API", "version"])
Sample output, captured October 2026. Static snapshot, not live data.
| API | version |
|---|---|
| 9fin ABF API | 0.1.9 |
| 9fin BDCs API | 0.1.6 |
| 9fin CLO API | 2.0.1 |
| 9fin Covenant API | 0.7.0 |
| 9fin Demo API | 0.3.1 |
| 9fin Distressed API | 0.1.18 |
| 9fin Entity API | 0.5.7 |
| 9fin Instruments (Bonds & Loans) API | 0.10.1 |
| 9fin Instruments (Private Credit) API | 0.1.10 |
| 9fin News & Content API - v2 | 0.3.41 |
And the filter surface of any one of them. Here the Entity API, which the rest of this notebook uses:
entity_spec = api_spec("Entity API")
params = entity_spec["paths"]["/v0/entity"]["get"]["parameters"]
len(params), [p["name"] for p in params][:8]
Sample output, captured October 2026. Static snapshot, not live data.
(88,
['sort_by',
'limit',
'cursor',
'nf_id__eq',
'nf_id__neq',
'nf_id__contains',
'nf_id__in',
'roles__contains'])
That is the field__operator surface set out later in this notebook, enumerated by the API itself
rather than transcribed. Where a parameter accepts a closed list of values the spec carries it as
an enum, so there is never a reason to hardcode one: notebook 1.2 builds its whole filter table
and its list of content tags exactly this way.
Two habits follow. Check the spec before assuming a filter does not exist, because a plausible guess at a parameter name is rejected rather than silently ignored. And check it again when something stops behaving, because these versions move.
What an entity is
An entity is any party we track, not only borrowers. There are 36,748 of them:
| Role | Count | |
|---|---|---|
LEVFIN_COMPANY | 23,367 | leveraged finance borrowers |
CLO_COMPANY | 7,476 | CLO issuing vehicles |
ADVISOR | 3,641 | banks, law firms, advisers |
ABF_COMPANY | 930 | asset based finance borrowers |
SPONSOR | 920 | private equity sponsors |
CLO_MANAGER, UMBRELLA | 207 each |
Each record carries several names, and the difference matters when you search:
street_nameis the name we file the company under, and the one to search first.full_nameis the longer registered name. It is on 96.8% of records.aliasis a list of everything else: former names, issuing vehicles, sometimes a ticker.
Most of this universe is private, so public identifiers do not get you far. A CIK is on only 8.0% of records. Names and websites do the work.
Searching by name
street_name__contains is a substring match and is not case sensitive. Ask for a full page of 100 when the name is short, or the match you want can sit past the end of a small page.
found = api_get("/v0/entity", street_name__contains="Iceland", limit=100)["items"]
pd.DataFrame(found)[["street_name", "full_name", "nf_id", "country_ref_name", "industry_1"]]
Sample output, captured October 2026. Static snapshot, not live data.
| street_name | full_name | nf_id | country_ref_name | industry_1 |
|---|---|---|---|---|
| Icelandirect | Icelandirect | nf_ent_44f843d873e242a9bf05a80233672e03 | United States | Consumer Staples |
| Islandsbanki - Bank Of Iceland | Islandsbanki - Bank Of Iceland | nf_ent_5a23973f56df41438355efa1e5561a90 | NaN | NaN |
| Iceland | Iceland | nf_ent_df4aa6984c5e4d69bac1b8809cb8b6b2 | United Kingdom | Consumer Staples |
| Republic of Iceland | Republic of Iceland | nf_ent_ff1b5364a8124189904e9e31970461a5 | Iceland | NaN |
Four results for one word, and only the second is the frozen food retailer. This is the normal case: a name search returns candidates, and you choose.
Because it is a substring match, short names also pick up longer ones. Searching for Ford finds Clifford and Rexford:
ford = api_get("/v0/entity", street_name__contains="Ford", limit=100)["items"]
[e["street_name"] for e in ford][:6]
Sample output, captured October 2026. Static snapshot, not live data.
['Clifford Capital',
'Rockford Tower CLO 2025-1',
'Rexford Industrial Realty',
'Rockford Tower Europe CLO 2019-1',
'Rockford Tower CLO 2025-3',
'Rockford Tower CLO 2021-2 (R)']
Keeping only whole word matches is one line, and gets you the three you meant:
[e["street_name"] for e in ford if re.search(r"(?<!\w)Ford(?!\w)", e["street_name"] or "", re.I)]
Sample output, captured October 2026. Static snapshot, not live data.
['Ford Otosan', 'Ford', 'GETRAG Ford Transmissions']
Searching by website
Often the better route for a private company, where the borrowing entity and the trading name differ. The same __contains operator, on a different field.
pd.DataFrame(api_get("/v0/entity", website__contains="ineos.com")["items"])[
["street_name", "nf_id", "website", "industry_1"]]
Sample output, captured October 2026. Static snapshot, not live data.
| street_name | nf_id | website | industry_1 |
|---|---|---|---|
| INEOS Enterprises | nf_ent_099875afba2c4a30a6504d7e4a42034b | https://www.ineos.com/businesses/ineos-enterprises/ | Materials |
| INEOS Energy | nf_ent_47fd538191a24b6aa131ddd93203a21d | https://www.ineos.com/businesses/ineos-energy/ | Energy |
| INEOS | nf_ent_48a73557382f4c398ac5e6990bbbc8a8 | http://www.ineos.com/ | Materials |
| INEOS Quattro | nf_ent_ced96a9eef7b43ecbec81185db426458 | https://www.ineos.com/ineos-quattro-investor-relations/ | Materials |
Searching by alias
alias holds the other names a company issues under. It behaves differently from the name search: it matches a whole value and it is case sensitive. Use it when you have an exact legal name, and the name search when you do not.
api_get("/v0/entity", alias__contains="Kemble Water Finance Limited")["items"][0]["street_name"]
Sample output, captured October 2026. Static snapshot, not live data.
'Thames Water (Kemble) Finance'
A partial word finds nothing:
len(api_get("/v0/entity", alias__contains="Kemble")["items"])
Sample output, captured October 2026. Static snapshot, not live data.
0
Searching by CIK
Exact and unambiguous, for the 8% of records that are US SEC filers.
api_get("/v0/entity", cik__eq=1618921)["items"][0]
That is a whole entity record. The fields that matter:
| Field | What it gives you |
|---|---|
nf_id | the identifier the other APIs take |
street_name, full_name, short_name, alias | the names |
roles | borrower, advisor, sponsor, CLO vehicle |
industry_1, industry_2, industry_3 | sector, broad to specific |
country_ref_name, coverage_region | geography |
website, description, cik | |
active_flag, created_at, modified_at | record housekeeping |
Every field you can filter on
Filters take the form field__operator, and they combine. The same convention runs through the Instruments API.
| Field | Operators |
|---|---|
street_name, full_name, short_name, website, description | contains, eq, in, neq |
industry_1, industry_2, industry_3, industry_ref_code | contains, eq, in, neq |
country_ref_name | contains, eq, in, neq |
nf_id | contains, eq, in, neq |
alias, roles, coverage_region | contains |
cik | eq, in, gt, gte, lt, lte, neq |
active_flag | eq, neq |
created_at, modified_at | eq, gt, gte, lt, lte, neq, in |
Plus limit, up to 100, and cursor.
Combining them turns a search into a screen. UK borrowers in healthcare:
uk_health = api_get("/v0/entity", roles__contains="LEVFIN_COMPANY",
country_ref_name__eq="United Kingdom", industry_1__eq="Healthcare")
pd.DataFrame(uk_health["items"])[["street_name", "nf_id", "industry_2"]].head(8)
Sample output, captured October 2026. Static snapshot, not live data.
| street_name | nf_id | industry_2 |
|---|---|---|
| Theramax | nf_ent_00085d0d4e324f19a54f551df05e05a3 | Unknown |
| Patientline | nf_ent_033b88b406dc45b0b783bde8eaa23241 | Health Care Equipment & Services |
| Compliance Group | nf_ent_037052f1c71d4fbe9c0835f9635de83d | Pharmaceuticals, Biotechnology & Life Sciences |
| Pharmanovia (Atnahs) | nf_ent_0c31dee1006e4f2293b2c23d4c92fb3e | Pharmaceuticals, Biotechnology & Life Sciences |
| McCarthy & Stone | nf_ent_0cb2298f6ef547c2850761217f92412b | Health Care Equipment & Services |
| Steelite | nf_ent_0ce7921a934049b9a85261f00bd369e3 | Health Care Equipment & Services |
| Consensus Support Services | nf_ent_108a028ebd724149b367f2b613a6fe6b | Health Care Equipment & Services |
| Goldshield Group | nf_ent_16e8313eaaae4f5da23ee9d26765ba0a | Pharmaceuticals, Biotechnology & Life Sciences |
Paging
A page is at most 100 records. If next_cursor comes back, pass it to get the next page, and keep going until it does not.
page = api_get("/v0/entity", industry_1__eq="Utilities", limit=100)
len(page["items"]), page["next_cursor"][:24] + "..."
Sample output, captured October 2026. Static snapshot, not live data.
(100, 'eyJrIjogImI2NTJiMzEwNzM3...')
more = api_get("/v0/entity", industry_1__eq="Utilities", limit=100, cursor=page["next_cursor"])
len(more["items"])
Sample output, captured October 2026. Static snapshot, not live data.
100
Taking the identifier onward
With an nf_ent_... in hand, the rest of the platform opens up.
To the Instruments API, as entity_nf_id__eq, for everything the company has issued:
INEOS = "nf_ent_48a73557382f4c398ac5e6990bbbc8a8"
held = api_get("/v0/instruments/bonds-and-loans", entity_nf_id__eq=INEOS, limit=200)["items"]
len(held), sum(1 for i in held if i["instrument_type"] == "Bond")
Sample output, captured October 2026. Static snapshot, not live data.
(72, 25)
To the News API, which filters on entity ids directly: nf_ids__in takes up to ten of them
and returns anything referencing any of them. The match is on identifiers, never on a company name
appearing in the text.
api_get("/v2/news/headlines", nf_ids__in=INEOS, limit=3)["items"][0]["entities"]
Sample output, captured October 2026. Static snapshot, not live data.
{'main': {'nf_id': 'nf_ent_48a73557382f4c398ac5e6990bbbc8a8',
'name': 'INEOS',
'country_code': 'GB'},
'additional': []}
Each headline also carries the entities it names, which is how you tell which of several watched companies a story is about when you filter on more than one:
def names_entity(article, nf_id):
"""Does this headline name the company?"""
return nf_id in {(article["entities"].get("main") or {}).get("nf_id")} \
| {e["nf_id"] for e in article["entities"].get("additional", [])}
Getting to an identifier
The map of which identifier each API uses, and five ways to get the one that matters most:
| You have | Use |
|---|---|
| a name | street_name__contains, then filter to whole word matches |
| a legal name or ticker | alias__contains, exact and case sensitive |
| a website | website__contains |
| a CIK | cik__eq |
| a sector, country or role | combine the filters into a screen |
Where to go next depends on what your key carries. Notebook 1.1 reads an article and resolves the companies it names. Notebook 2.1 takes an entity id to the Instruments API to see what a company has issued.