Skip to content

GET /v1/symbol_search

GET /v1/symbol_search

Resolves a free-text query to a ranked list of instruments. Useful for autocomplete, ticker disambiguation, and importing from a CSV that names companies inconsistently.

Request

GET /v1/symbol_search?query=apple HTTP/1.1
Host: api.oneapi.finance
Authorization: Bearer oa_live_<your_key>

Query parameters

ParamTypeRequiredNotes
querystringyesFree text. Matches ticker, name, ISIN, FIGI, CIK.
limitintnoMax results. Default 10, cap 50.
countrystringnoISO 3166 alpha-2 to restrict results.
typestringnoRestrict by instrument type (Common Stock, ETF, Index).

Response

{
"symbols": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"type": "Common Stock",
"country": "US",
"currency": "USD",
"isin": "US0378331005",
"figi": "BBG000B9XRY4",
"score": 0.98
},
{
"symbol": "APC.DE",
"name": "Apple Inc.",
"exchange": "XETR",
"type": "Common Stock",
"country": "DE",
"currency": "EUR",
"isin": "US0378331005",
"figi": "BBG000B9XQB4",
"score": 0.85
}
]
}

Field reference

FieldTypeNotes
symbolsarrayRanked descending by score.
symbols[].symbolstringTicker, with Yahoo suffix where applicable.
symbols[].namestring | nullDisplay name.
symbols[].exchangestring | nullCanonical exchange code.
symbols[].typestring | nullCommon Stock | ETF | Mutual Fund | Index | Crypto | FX | Bond.
symbols[].countrystring | nullISO 3166 alpha-2.
symbols[].currencystring | nullISO 4217.
symbols[].isinstring | null
symbols[].figistring | null
symbols[].scorenumber | nullRelevance, 0..1. Higher is better. Useful as a confidence threshold.

The wire-format models are SymbolSearchResult, SymbolSearchResponse.

How matching works

The endpoint runs a hybrid search:

  1. Exact match on symbol, isin, figi, or cik always wins.
  2. Trigram match on symbol and name provides fuzzy results for typos and partial names.
  3. Vector similarity (sentence-transformers MiniLM-L6-v2 embeddings stored in pgvector) catches semantic matches like “the iPhone company” → AAPL.

The score column reflects the combined ranking. For autocomplete UIs, treat results below score = 0.5 with skepticism.

Examples

Terminal window
# Free text
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/symbol_search?query=apple"
# By ISIN
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/symbol_search?query=US0378331005"
# Restrict to German listings
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/symbol_search?query=BMW&country=DE"

Errors

StatuscodeWhen
400bad_requestEmpty query, or limit > 50.
401unauthenticatedMissing or invalid API key.
429rate_limitSee rate limits.

/v1/symbol_search does not return 404. An empty match list is a valid response: {"symbols": []}.

See also