Company Search

Look up resource names with the SDK's entity search

Our export and import methods address entities by resource name (e.g. entityTypes/company/entities/F_000C7F-E). When you only have a Bloomberg ticker, MIC/ticker pair, or company name, use the search helpers on client.entity_api.search to resolve it.

The following examples assume the client is created like this:

from exabel import ExabelClient

client = ExabelClient()

Search by Bloomberg ticker

Pass one or more tickers; each maps to the matching company entity.

results = client.entity_api.search.company_by_bloomberg_ticker("AAPL US", "GOOGL US")
# {'AAPL US': Entity(name='entityTypes/company/entities/F_000C7F-E', display_name='Apple, Inc.'),
# 'GOOGL US': Entity(name='entityTypes/company/entities/F_0FPWZZ-E', display_name='Alphabet, Inc.')}

Returns a Mapping[str, Entity]. Tickers that don't resolve are simply absent from the mapping.

Search by MIC and ticker

Use this when a plain ticker is ambiguous across exchanges. Pass (MIC, ticker) tuples.

results = client.entity_api.search.company_by_mic_and_ticker(
    ("XNAS", "AAPL"),
    ("XNAS", "GOOGL"),
)
# {('XNAS', 'AAPL'): Entity(name='entityTypes/company/entities/F_000C7F-E', display_name='Apple, Inc.'),
#  ('XNAS', 'GOOGL'): Entity(name='entityTypes/company/entities/F_0FPWZZ-E', display_name='Alphabet, Inc.')}

Returns a Mapping[tuple[str, str], Entity].

Search by text

For company-name lookups, companies_by_text does a fuzzy match across name and ticker fields. Each query can match multiple companies, so the result lists are pre-sorted by relevance. Prefer to use company identifiers search to avoid ambiguity.

results = client.entity_api.search.companies_by_text("Apple, Inc.", "Alphabet")

Returns a Mapping[str, Sequence[Entity]].

All convenience helpers

client.entity_api.search exposes one helper per supported identifier type. Each takes inputs and returns a mapping keyed by the input value.

HelperInputReturn
company_by_bloomberg_ticker*str (e.g. "AAPL US")Mapping[str, Entity]
company_by_bloomberg_symbol*str (e.g. "AAPL US Equity")Mapping[str, Entity]
company_by_figi*str (e.g. "BBG001S5N8V8")Mapping[str, Entity]
company_by_factset_identifier*str (e.g. "000C7F-E")Mapping[str, Entity]
company_by_mic_and_ticker*tuple[str, str]Mapping[tuple, Entity]
companies_by_text*strMapping[str, Sequence[Entity]]

Lower-level: search_for_entities

The convenience helper methods uses the equivalent method:

result = client.entity_api.search_for_entities(
    entity_type="entityTypes/company",
    bloomberg_ticker="AAPL US",
)