API documentation
Bring CatCapital’s financial data into your applications.
Explore the endpoints, make a request, and understand the response.
/apiPaths are relative to your CatCapital API host. Example response data is illustrative.
curl --get "https://catcapital.ai/api/assets/semantic-search" \
--data-urlencode "query=AI data center cooling" \
--data-urlencode "asset_class=stock" \
--data-urlencode "limit=5" \
--header "Authorization: Bearer API_KEY"Replace API_KEY with your API key.
Authentication
All endpoints require an API key. Include it in the Authorization header as a Bearer token with every request.
Checking your API key…
Authorization: Bearer API_KEYAPI reference
3 endpoints JSON responsesSearch assets#
Find stocks and funds by the meaning of a natural-language query. Get the asset identifiers you need for the next request.
/api/assets/semantic-searchMake a search
Describe the assets you want to find. This example searches stocks for AI data center cooling and requests up to five results.
For GET, put search parameters in the URL and do not send a request body:
ranking=false then orders that shortlist by market cap or fund AUM. Use ranking=true to rerank the shortlist for relevance.GET /api/assets/semantic-search?query=AI%20data%20center%20cooling&asset_class=stock&limit=5
Authorization: Bearer API_KEYSend a JSON request
Use POST when you prefer to send a JSON object. The example searches funds, applies an ISIN-prefix filter, and includes description previews.
For POST, use a non-empty UTF-8 JSON object with Content-Type: application/json and put all search parameters in the body:
null. The full parsing rules are below.POST /api/assets/semantic-search
Authorization: Bearer API_KEY
Content-Type: application/json
{
"query": "European government bonds",
"asset_class": "fund",
"ranking": true,
"region": ["DE", "FR"],
"limit": 5,
"page": 0,
"description_preview": true
}Read the response
HTTP 200 returns a JSON array, not an object wrapper:
Each item has:
ticker: ticker string.name: asset name string.isin: ISIN string ornull.asset_class:stockorfund.
All example result values shown here are illustrative. Search results can change with the available data and request time.
[
{
"ticker": "EXAMPLE",
"name": "Example Company",
"isin": "US0000000000",
"asset_class": "stock"
},
{
"ticker": "EXAMPLE.FUND",
"name": "Example Fund",
"isin": null,
"asset_class": "fund"
}
]Include a description preview
Add description_preview=true to receive a short description alongside each asset.
description_preview: present only whendescription_preview=true. It contains the first 100 Unicode code points of the sourcedescription, or an empty string if unavailable. It can be shorter than 100 code points, preserves source whitespace, and has no added ellipsis.
For example, an illustrative result with previews enabled is:
This endpoint has no language selector and does not return the full description, prices, capitalization, AUM, or relevance scores.
[
{
"ticker": "EXAMPLE",
"name": "Example Company",
"isin": "US0000000000",
"asset_class": "stock",
"description_preview": "An illustrative description."
}
]Parameters
Start with a query, then choose the asset type, ordering, and page size.
| Parameter | Default | Accepted values and behavior |
|---|---|---|
query or q | Required | Natural-language search text, 2–280 UTF-16 code units after trimming, without control characters. Either name can be used. If both are supplied, their trimmed values must be identical, including case. |
asset_class | Both | stock or fund. An omitted or empty value searches both. |
ranking | false | true reranks the entire candidate shortlist for relevance before slicing; false orders it by raw market cap or AUM, descending. |
limit | 20 | Integer from 1 through 20: maximum results on a page. |
description_preview | false | If true, include description_preview on every result. |
Filter by ISIN country, listing, size, or sector
| Parameter | Default | Accepted values and behavior |
|---|---|---|
region | No restriction | One to 32 two-letter ISIN country prefixes, for example AU,CA. Matching prefixes use OR; this is an ISIN-prefix filter, not a general geographic-exposure filter. |
listing | any | any or main. main limits results to assets marked as main listings. |
cap_min, cap_max | No bound | Inclusive minimum and maximum. Stocks use market capitalization; funds use AUM. Values are non-negative numbers in unscaled units, not millions or billions. |
ai_gics_filter | true | Allows the server's optional inferred GICS sector filter to run. Set to false to skip that classifier and its inferred sector restrictions. |
All explicit filters combine with AND, except that multiple region values combine with OR. Filters are applied before selecting the nearest semantic candidates.
AI sector filtering
ai_gics_filter=true permits an optional server-controlled sector classifier; it does not guarantee a sector restriction. The server may run it in on, shadow, or off mode; off is the server default. Only valid inferred sector inclusions in on mode are applied, and they restrict stocks, not funds. Missing or unrecognized stock GICS data is retained; an empty or failed inference applies no sector restriction. Fund-only searches skip classification. Setting ai_gics_filter=false skips classification and inferred sector filtering; it does not disable semantic search, explicit filters, or ranking.
Exact input and validation rules
Use GET /api/assets/semantic-search or POST /api/assets/semantic-search to search stocks and funds by the meaning of a natural-language query. The endpoint finds a shortlist of eligible assets using semantic similarity, orders the shortlist, and returns asset identifiers. Include your API key in the Bearer authorization header.
POST rejects recognized search parameters in the URL, even if also supplied in the body. Unrelated URL metadata is ignored. The JSON object rejects unknown or duplicate properties, null values, comments, and trailing commas. Omit unused properties instead of setting them to null. The default maximum body size is 16,384 bytes and the default body-read timeout is five seconds; server configuration can change these limits. Compressed request bodies are not supported.
GET ignores unknown URL parameters but rejects repeated known parameters. Parameter names are case-insensitive. String values are trimmed; enumerated values and boolean strings are case-insensitive.
GET booleans are true or false strings. POST accepts JSON booleans or those strings. For POST, query, q, asset_class, and listing are strings; limit, page, and the cap bounds can be JSON numbers or numeric strings. region can be a comma-separated string or an array such as ["AU", "CA"]; each array item must be a single two-letter ASCII prefix. Region values are trimmed, normalized to uppercase, and deduplicated. Empty items and trailing commas are invalid.
Pagination values must be decimal integer digits. Cap bounds accept decimal or scientific notation, such as 1000000000 or 1e9; do not use currency symbols, grouping commas, negative values, or unit suffixes. If both bounds are supplied, cap_min must not exceed cap_max. The endpoint compares values without currency conversion. Assets whose relevant cap value is missing or unusable cannot satisfy a cap filter.
How candidates are selected and ordered
The endpoint first selects nearest eligible semantic candidates, then orders and slices that shortlist:
With the default ranking=false, the shortlisted assets are sorted by raw stock market cap or fund AUM descending, with missing values last. Similarity distance and then asset class and ticker break ties. Values are compared without currency conversion. With ranking=true, a relevance model reranks the entire shortlist before paging. Neither ordering returns a score to the caller.
Load another page
page and sending page=0 are different searches. Omission evaluates up to limit candidates; paged mode evaluates up to 40 before ordering and slicing.Keep the query, filters, ranking, and limit the same while paging. Use X-Has-More to decide whether another page exists within the evaluated window. An empty array is a successful response and can occur for a page beyond the available results.
X-Has-More describes the evaluated candidate window. It is not a total-match count.
Example paged requests:
GET /api/assets/semantic-search?query=gold%20miners®ion=AU%2CCA&listing=main&limit=5&page=0
Authorization: Bearer API_KEY
GET /api/assets/semantic-search?query=gold%20miners®ion=AU%2CCA&listing=main&limit=5&page=1
Authorization: Bearer API_KEY| Parameter | Default | Accepted values and behavior |
|---|---|---|
page | Omitted | Zero-based page. Explicitly supplying it enables paged mode, including when its value is 0. The maximum is floor(39 / limit). |
Paging limits and result consistency
- Single mode: omit
page. The candidate limit is the requestedlimit, at most 20. The response hasX-Search-Mode: singleandX-Has-More: false. - Paged mode: explicitly supply
page, includingpage=0. The candidate limit is 40, regardless oflimit; the complete available shortlist is ordered before the requested page is sliced. Forlimit=5, valid pages are 0–7; forlimit=7, pages are 0–5 and the final page can contain at most five items; forlimit=20, pages are 0–1.
Omitting page and setting page=0 are different searches and can produce different first results. Pages are stateless: each request recomputes the shortlist and order, so changes in data or model results can cause movement, duplicates, or omissions between requests. The 40-candidate window is not a count of all assets that could match; X-Has-More: false only means there is no next page in the evaluated window. It is always false in single mode.
Response headers and browser access
Successful responses include Content-Type: application/json; charset=utf-8 and Cache-Control: no-store, plus:
| Header | Meaning |
|---|---|
X-Request-Id | Request identifier for diagnostics. |
X-Page | Zero-based page; 0 in single mode. |
X-Limit | Requested or default page size. |
X-Has-More | true if another page exists within the evaluated candidate window; otherwise false. |
X-Search-Mode | single or paged. |
X-Search-Candidate-Limit | limit in single mode, or 40 in paged mode. |
X-Search-Result-Count | Number of candidates evaluated in this window, before slicing; not the total number of matching assets. |
For a cross-origin browser frontend, these custom headers are not exposed by the API's current CORS response. Browser JavaScript can read them only if the deployment exposes them with Access-Control-Expose-Headers; otherwise use a same-origin proxy or arrange that configuration before relying on header-based pagination.
Handle an error
When the handler can write an error response, its body has this shape:
Search errors use a structured error object with a code and a message.
An outer routing or connection failure can produce an empty error response, so clients should not assume every failure body is JSON. Use code for programmatic handling when available, and use the request ID for diagnostics. The server handles OPTIONS preflight separately with HTTP 204.
{
"error": {
"code": "invalid_query",
"message": "Query must contain 2–280 characters without control characters."
}
}Search status codes and retry behavior
| Status | Meaning and examples |
|---|---|
| 400 | Invalid request or parameter, such as invalid_query, invalid_region, invalid_cap_range, duplicate_parameter, mixed_parameters, or invalid_json. |
| 405 | Method other than GET or POST; Allow: GET, POST. |
| 408 | POST body read timed out (request_body_timeout). |
| 413 | POST body is too large (request_body_too_large). |
| 415 | Unsupported content type, charset, or content encoding. |
| 429 | Request intake or search capacity is full (busy); Retry-After: 1. |
| 502 | Inference service transport, response, or upstream failure. |
| 503 | Search or inference service unavailable; inference capacity failures may include Retry-After: 2. |
| 504 | Search exceeded its time budget (search_timeout). |
| 500 | Unexpected search failure (search_failed). |
Asset description#
Retrieve one company or fund description by ticker or ISIN, in English or German.
/api/assets/descriptionGet a description
Supply a ticker or isin to retrieve one company or fund description.
English description by ticker (default language):
GET /api/assets/description?ticker=AAPL
Authorization: Bearer API_KEYRead the response
A successful request returns HTTP 200 and a JSON object with one field:
The example text is illustrative. description is a string or null. A null value means the asset was found but no description is available in the selected language. The endpoint does not fall back to the other language.
{"description": null} means the asset exists but the selected description is unavailable. A missing asset returns 404.{
"description": "An illustrative company description."
}Example response for a found asset whose selected description is unavailable:
{"description": null}Request German text
German description by ISIN:
lang=german. This endpoint uses the full word. lang=de, an omitted language, or any other value selects English.The language value is trimmed and matched case-insensitively. There is no fallback if the selected language has no description.
GET /api/assets/description?isin=US0378331005&lang=german
Authorization: Bearer API_KEYMatch both identifiers
Require both identifiers to match the same asset:
The endpoint returns at most one description. When several assets match, companies take precedence over funds; matches within each asset type are ordered by ticker. An ISIN can match multiple listings, so a ticker may identify a more specific listing. The response does not include the matching ticker, ISIN, asset type, or language.
GET /api/assets/description?ticker=AAPL&isin=US0378331005&lang=english
Authorization: Bearer API_KEYParameters
| Parameter | Required | Description |
|---|---|---|
ticker | At least one of ticker or isin | Asset ticker, for example AAPL. |
isin | At least one of ticker or isin | Asset ISIN, for example US0378331005. |
lang | No | Use german for German. If omitted or set to any other value, the endpoint returns English. |
Identifier, language, and HTTP rules
Use GET /api/assets/description to retrieve one company or fund description by ticker or ISIN. The endpoint returns the description in the selected language.
The endpoint requires a Bearer API key. It returns JSON and sends Cache-Control: no-store for requests handled by the endpoint.
Identifiers are trimmed and matched case-insensitively. Any identifier supplied must be non-empty. If both are supplied, both must match the same asset. Each of ticker, isin, and lang may be supplied only once; duplicate parameters return HTTP 400. The german value is also trimmed and matched case-insensitively. In particular, lang=de selects English, not German.
Handle an error
This endpoint uses an error string when a JSON error body is available.
| Status | Meaning | Example response |
|---|---|---|
| 400 | Missing or empty identifier, or a duplicate parameter. | {"error":"Provide a non-empty ticker or isin."} or {"error":"Each parameter may be supplied only once."} |
| 404 | No matching company or fund. | {"error":"Asset not found."} |
| 405 | The method is not GET. The response includes Allow: GET. | {"error":"Method must be GET."} |
| 500 | Server error. | The body may be empty. |
| 503 | The service is unavailable. | The body may be empty. |
Do not assume every error response has a JSON body. The server also handles an OPTIONS preflight request with HTTP 204.
News headlines#
Build a recent feed of X posts classified as news. Filter by language, time window, topic, and relevance score, then load older or newer headlines.
/api/news/headlinesLoad a recent feed
Read X posts classified as news. This example requests up to 50 English headlines from the last 24 hours, filtered to markets or the economy with a relevance score of at least 4.
minutes defaults to 60 and supports up to 1,440 minutes. This endpoint is separate from /api/news.GET /api/news/headlines?lang=en&minutes=1440&topic=markets,economy&score_min=4&limit=50
Authorization: Bearer API_KEY
Accept: application/jsonRead a headline
HTTP 200 returns a JSON array, including [] when no posts match. The following data is illustrative:
Stringid- Decimal ID used for cursor pagination. Preserve it as a string.
Stringcreated_at- Post creation timestamp.
String ortopicnull- Topic. Without a topic filter, the endpoint does not restrict its value.
Stringheadline- Headline in the requested language. It is non-null, although an empty string is technically possible.
Array of stringstickers- Extracted cashtags; an unavailable value becomes
[]. These are not verified market symbols. isinsArray of strings ornull- Related ISINs.
nullmeans scoring has not completed;[]means scoring completed without related ISINs. scoreRelevance score- Relevance score, from 1 to 5 when scored. Unscored headlines can be returned when
score_minis omitted.
[
{
"id": "152",
"created_at": "2026-10-29T09:00:00Z",
"topic": "markets",
"headline": "Shares rise after earnings report",
"tickers": ["AAPL"],
"isins": ["US0378331005"],
"score": 4
}
]id for pagination and deduplication.Filter the feed
All parameters are optional. Supply each recognized parameter no more than once. Different filters combine with AND; values inside the one topic list combine with OR.
| Parameter | Default | Accepted values | Meaning |
|---|---|---|---|
lang | en | en, de | Select English or German headline. Posts with a null headline in the selected language are excluded; the server does not fall back to the other language. |
minutes | 60 | Integer from 1 through 1440 | Include posts created within this rolling number of minutes, up to 24 hours. |
topic | Omitted | A comma-separated list of allowed topics | Return posts matching any listed topic. Omission means no topic restriction, including posts with a null topic. |
score_min | Omitted | Integer from 1 through 5 | Inclusive minimum relevance score. Omit to include unscored headlines; supplying it excludes them. |
limit | 50 | Integer from 1 through 100 | Maximum number of headlines in this response. |
ticker and page are ignored by this endpoint; they do not filter the feed.The score filter is applied before ordering and limiting results. For example, score_min=4 returns headlines scoring at least 4; score_min=1 still excludes unscored headlines.
Allowed topics and exact input rules
Allowed topics are markets, companies, economy, central_banks, politics, technology, commodities, and other. For example, topic=markets,economy matches either topic. A repeated parameter such as topic=markets&topic=economy, an empty topic, an empty list element, or an unsupported topic returns 400. Duplicate values within a single list are accepted but do not add results.
The server trims and lowercases lang, direction, and each topic value. Numeric values must contain decimal digits without whitespace, a sign, or a decimal point. Leading zeroes are accepted if the value is in range. An explicitly empty value is invalid; omit a parameter to use its default. Unknown query parameters are ignored by the headline parser: for example, ticker and page do not filter this endpoint.
Eligibility, response metadata, and HTTP behavior
This reference describes GET /api/news/headlines for a frontend displaying a recent feed of X posts classified as news. It returns a rolling window of headlines, not a permanent archive. It is separate from /api/news.
Include your API key in the Bearer authorization header with every request.
The endpoint accepts GET only. Authentication is checked before the handler validates the method or query parameters. The server handles browser OPTIONS preflight separately and returns 204.
The endpoint returns posts classified as news with an ID, a non-null headline in the selected language, and a created_at within the requested rolling window, including its boundaries. Posts with missing or future creation times do not match. A requested topic must match the post's topic. Article and other post types are excluded. Prices are not returned.
Responses handled by this endpoint use Cache-Control: no-store; successful responses use Content-Type: application/json; charset=utf-8. There is no response envelope, total count, next-cursor field, or has_more header. Clients derive cursor boundaries and whether to request another page from the returned items and limit.
Paginate and refresh
Maintain two independent boundaries: the smallest retained ID for older results, and the largest retained ID for newer results.
The server compares and orders numeric headline IDs, not created_at. The cursor itself is always excluded:
| Request | Selection | Result order |
|---|---|---|
No cursor or direction | Initial page | ID descending |
cursor=N&direction=older | id < N | ID descending |
cursor=N&direction=newer | id > N | ID ascending |
limit items; a shorter or empty response ends that loop.Load older headlines
- Request the feed without
cursorordirection. - If results are returned, retain their smallest and largest IDs as the older and newer cursors. If the response is empty, poll again without a cursor until a result appears.
- To load older results, send the smallest retained ID as
cursoranddirection=older. Append or merge and deduplicate the returned items, then update the older cursor to the smallest ID received. - Repeat while a page contains
limititems. A shorter or empty page indicates that no further matching results were returned for that request's current window. An empty response leaves the cursor unchanged.
GET /api/news/headlines?lang=en&minutes=1440&limit=50
Authorization: Bearer API_KEY
GET /api/news/headlines?lang=en&minutes=1440&limit=50&cursor=120&direction=older
Authorization: Bearer API_KEYRefresh for newer headlines
- Send the largest retained ID as
cursorwithdirection=newer. - Merge and deduplicate the returned items, then advance the newer cursor to the largest returned ID. Leave the older cursor unchanged unless the client deliberately recalculates its overall boundaries.
- If the response has
limititems, repeat using the updated newer cursor. Stop when a response is shorter thanlimitor empty. An empty response leaves the newer cursor unchanged.
GET /api/news/headlines?lang=en&minutes=1440&limit=50&cursor=152&direction=newer
Authorization: Bearer API_KEYFollow the cursors through an example
Assume limit=3, with illustrative IDs shown in response order:
| Step | Request | Returned IDs | Cursor update |
|---|---|---|---|
| Initial load | No cursor | [152, 151, 150] | Older cursor 150; newer cursor 152. |
| Load older | cursor=150&direction=older | [149, 148, 147] | Older cursor becomes 147; newer remains 152. |
| Refresh | cursor=152&direction=newer | [153, 154, 155] | Newer cursor becomes 155; older remains 147. |
| Continue refresh | cursor=155&direction=newer | [156] | Newer cursor becomes 156; fewer than limit results ends this refresh. |
The older boundary moves down; the newer boundary moves up. Each request excludes its cursor ID.
BigInt(id) for numeric comparisons. Do not increment or decrement IDs to construct a cursor.Exact cursor rules and filter changes
| Parameter | Default | Accepted values | Meaning |
|---|---|---|---|
cursor | Omitted | Positive signed 64-bit integer, 1 through 9223372036854775807 | Exclusive boundary using a returned headline's id. Must be sent with direction. |
direction | Omitted | older or newer | Choose IDs below or above cursor and their return order. Must be sent with cursor. |
Keep two independent boundaries for each feed: the smallest ID for loading older results and the largest ID for refreshing newer results. Do not use a timestamp, an array index, or a page number as the cursor. id is a decimal string because it can exceed JavaScript's safe integer range. Preserve the original string in requests and use BigInt(id) for numeric comparisons; string comparison would order values such as "9" and "10" incorrectly.
The newer response is ascending so the client processes the earliest unseen IDs first. Keep the largest ID as the refresh cursor even if the UI displays headlines in another order. IDs are unique boundaries but need not be contiguous; do not increment or decrement a cursor to construct the next one.
Deduplicate by id and merge updated fields such as score and isins. Keep lang, minutes, topic, and score_min consistent while paging; if they change, reload without a cursor and establish new boundaries. A changed limit changes page size, not the exclusive ID boundary, but keeping it consistent makes the drain loop easier to reason about.
Rolling windows, delayed classification, and ordering
Every request evaluates the rolling time window again against the server's current time. Posts can age out between pages, so a short or empty page describes that request, not a permanent end of the archive. A post classified after its creation time has left the requested window will not appear. The default is one hour; use minutes=1440 to search the maximum 24-hour window.
ID order can differ from publication-time order; a delayed classification can appear in a later newer refresh even when its created_at is older than displayed posts. The endpoint provides a live, filtered view rather than a snapshot, so clients should merge results rather than assume that the entire feed remains unchanged while paging.
Scores and related ISINs can become available after a headline first appears. A newer-only cursor request does not return updates to an existing headline; with score_min, it can also miss an older headline that becomes eligible later. Periodically reload without a cursor and page through the portion of the rolling window you need, merging results by id to refresh changed fields.
Handle an error
When a JSON error body is present, error is a string. Authentication and some server failures may return an empty body.
| Status | Meaning | Body / headers |
|---|---|---|
| 400 | Invalid parameters, including an incomplete cursor/direction pair. | JSON such as {"error":"cursor and direction must be supplied together."}. |
| 401 | Missing or invalid API key. | May be empty. |
| 405 | Authenticated request uses a method other than GET. | {"error":"Method must be GET."} and Allow: GET. |
| 500 | Unexpected server failure. | May be empty. |
| 503 | Handler cancellation. | May be empty. |
Do not assume every failure body is JSON. When present, the 400 error is a string, not an object. Examples of invalid input include lang=, minutes=0, topic=markets,, score_min=0, limit=101, cursor=152 without direction, and direction=newer without cursor.