curl https://expert-system.starmode.dev/api/v1/docsClaude Code
/plugin install github://starmode-base/expert-system-plugin
Any agent (Cursor, Copilot, Cline, Codex)
npx skills add starmode-base/expert-system-plugin
The plugin ships three focused skills that trigger automatically based on context. See the plugin repository for details.
All API requests require an API key. Generate one on the API Keys page, then include it in every request:
Authorization: Bearer esak_<your-key>
curl -H "Authorization: Bearer esak_<your-key>" \
https://expert-system.starmode.dev/api/v1/takeaways/recentA missing or invalid key returns 401 Unauthorized. Revoked keys are rejected immediately.
/api/v1/takeaways/recentReturns the most recent takeaways ordered by publication date (newest first).
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | optional | Number of takeaways to return. Default: 10. Max: 100. |
{
"items": [ TakeawayObject, ... ]
}| Field | Type | Description |
|---|---|---|
| id | string | Takeaway unique identifier. |
| documentId | string | ID of the source document. |
| title | string | Short headline summarising the takeaway. |
| summary | string | Brief summary of the takeaway. |
| publicationDate | string (ISO 8601) | Publication date of the source document. |
| document | object | Source metadata: id, title, source, link, publicationDate. |
curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/takeaways/recent?limit=5"{
"items": [
{
"id": "tak_abc123",
"documentId": "doc_xyz789",
"title": "Fed signals pause through Q2",
"summary": "The Federal Reserve indicated it will hold rates...",
"publicationDate": "2026-03-01T00:00:00.000Z",
"document": {
"id": "doc_xyz789",
"title": "Remarks on the Economic Outlook",
"source": "Fed Speeches",
"link": "https://www.federalreserve.gov/...",
"publicationDate": "2026-03-01T00:00:00.000Z"
}
}
]
}/api/v1/takeawaysFetch up to 50 takeaways by ID with full details, document metadata, and inline references.
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | string | required | Comma-separated list of takeaway IDs. Maximum 50 IDs per request. |
{
"items": [ TakeawayObject, ... ]
}| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier. |
| title | string | Short headline summarising the takeaway. |
| summary | string | Brief summary of the takeaway. |
| takeaway | string | Full takeaway text — the actionable or notable finding. |
| url | string | Link to the takeaway on expert-system. |
| document | object | Source document metadata: id, title, source, link, publicationDate. |
| takeawayReferences | array | Ordered list of inline references. Each entry has referenceNumber (integer) and reference (string). |
curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/takeaways?ids=tak_abc123,tak_def456"{
"items": [
{
"id": "tak_abc123",
"title": "Fed signals pause through Q2",
"summary": "The Fed expects inflation to cool before changing rates.",
"takeaway": "The Federal Reserve indicated it will hold rates...",
"url": "https://expert-system.starmode.dev/takeaway/tak_abc123",
"document": {
"id": "doc_xyz789",
"title": "Remarks on the Economic Outlook",
"source": "Fed Speeches",
"link": "https://www.federalreserve.gov/...",
"publicationDate": "2026-03-01T00:00:00.000Z"
},
"takeawayReferences": [
{ "referenceNumber": 1, "reference": "Federal Reserve Press Release, Jan 2026" }
]
}
]
}/api/v1/takeaways/searchSemantic search across all takeaways using vector similarity, with optional time-weighted reranking.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | required | Natural-language search query. |
| limit | number | optional | Number of results to return. Default: 10. Max: 100. |
| recent | string | optional | Set to "true" to apply time-weighted reranking that favours newer content. |
{
"items": [ SearchResultObject, ... ]
}| Field | Type | Description |
|---|---|---|
| id | string | Takeaway unique identifier. |
| documentId | string | ID of the source document. |
| title | string | Short headline summarising the takeaway. |
| summary | string | Brief summary of the takeaway. |
| publicationDate | string | ISO 8601 publication date of the source document. |
| document | object | Source metadata: id, title, source, link, publicationDate. |
curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/takeaways/search?query=inflation+expectations&limit=5"curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/takeaways/search?query=inflation+expectations&recent=true"{
"items": [
{
"id": "tak_abc123",
"documentId": "doc_xyz789",
"title": "Inflation expectations remain anchored",
"summary": "Long-term inflation expectations hold steady near 2%...",
"publicationDate": "2026-03-01T00:00:00.000Z",
"document": {
"id": "doc_xyz789",
"title": "Remarks on the Economic Outlook",
"source": "Fed Speeches",
"link": "https://www.federalreserve.gov/...",
"publicationDate": "2026-03-01T00:00:00.000Z"
}
}
]
}/api/v1/documentsFetch up to 50 source documents by ID, including full article text and metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | string | required | Comma-separated list of document IDs. Maximum 50 IDs per request. |
{
"items": [ DocumentObject, ... ]
}| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier. |
| source | string | Origin of the document, e.g. "a16z", "Fed Speeches", "MacroVoices". |
| title | string | Document title. |
| description | string | Short description or abstract of the document. |
| publicationDate | string (ISO 8601) | When the document was originally published. |
| link | string | URL to the original source. |
| articleText | string | Full plain-text body of the document. |
| isSubstantive | boolean | Whether the document contains enough content to be worth processing. |
| createdAt | string (ISO 8601) | When the document was ingested. |
| updatedAt | string (ISO 8601) | When the document record was last updated. |
curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/documents?ids=doc_xyz789,doc_abc123"{
"items": [
{
"id": "doc_xyz789",
"source": "Fed Speeches",
"title": "Remarks on the Economic Outlook",
"description": "Governor Powell discusses the path of inflation...",
"publicationDate": "2026-03-01T00:00:00.000Z",
"link": "https://www.federalreserve.gov/...",
"articleText": "Thank you for the opportunity to speak...",
"isSubstantive": true,
"createdAt": "2026-03-01T08:15:00.000Z",
"updatedAt": "2026-03-01T08:15:00.000Z"
}
]
}/api/v1/documents/{documentId}/contentRead one source document in bounded character ranges for primary-source verification and deeper context.
| Parameter | Type | Required | Description |
|---|---|---|---|
| offset | integer | optional | Zero-based character offset. Default: 0. |
| limit | integer | optional | Characters to return. Default: 12000. Max: 30000. |
{
"item": {
"id": "doc_xyz789",
"title": "Remarks on the Economic Outlook",
"source": "Fed Speeches",
"link": "https://www.federalreserve.gov/...",
"publicationDate": "2026-03-01T00:00:00.000Z",
"content": {
"text": "Thank you for the opportunity to speak...",
"offset": 0,
"nextOffset": 12000,
"totalCharacters": 48320,
"truncated": true
}
}
}The financials API normalizes publicly filed SEC EDGAR company-facts data into stable, versioned metric IDs. It does not use an LLM, infer missing values, or combine different SEC concepts into one series.
Company endpoints accept either a ticker symbol such as AAPL or a numeric SEC CIK such as CIK320193. Every response includes the normalized 10-digit CIK.
Income statement
revenue, costOfRevenue, grossProfit, operatingIncome, netIncome, epsBasic, epsDiluted, researchAndDevelopment, sellingGeneralAdministrative, incomeTaxExpense
Balance sheet
cash, accountsReceivable, inventory, currentAssets, totalAssets, accountsPayable, currentLiabilities, totalLiabilities, shortTermDebt, longTermDebt, stockholdersEquity
Cash flow
operatingCashFlow, capitalExpenditures, investingCashFlow, financingCashFlow, dividendsPaid, shareRepurchases
instant — a balance-sheet value measured as of the observation date.
quarter — a standalone fiscal-quarter duration.
yearToDate — a filed multi-quarter cash-flow duration; the response includes its start date.
annual — a complete fiscal-year duration.
/api/v1/financials/metricsReturns the global versioned catalog of canonical financial metric IDs.
{
"catalogVersion": "1",
"metrics": [
{
"id": "revenue",
"label": "Revenue",
"statement": "incomeStatement",
"unitType": "monetary"
}
]
}curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/financials/metrics"/api/v1/financials/{symbol}/metricsReturns only the canonical metrics available for one company and reporting period.
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | required | Ticker symbol or SEC CIK. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | quarterly | annual | optional | Reporting period to inspect. Default: quarterly. |
{
"catalogVersion": "1",
"symbol": "AAPL",
"cik": "0000320193",
"company": "Apple Inc.",
"period": "quarterly",
"metrics": [
{
"id": "revenue",
"label": "Revenue",
"statement": "incomeStatement",
"unit": "USD"
}
],
"source": "SEC"
}curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/financials/AAPL/metrics?period=quarterly"/api/v1/financials/{symbol}/{metric}Returns one compact, normalized SEC time series with optional filing provenance.
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | required | Ticker symbol or SEC CIK. |
| metric | string | required | Canonical metric ID from the v1 catalog. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | quarterly | annual | optional | Reporting period. Default: quarterly. |
| limit | number | optional | Observations to return. Default: 8. Minimum: 1. Maximum: 40. |
| include | provenance | optional | Adds filing date, form, accession number, original concept, and SEC source URL. |
| Field | Type | Description |
|---|---|---|
| catalogVersion | string | Version of the canonical metric catalog. |
| symbol | string | Uppercase ticker when the request used a known ticker. |
| cik | string | Normalized 10-digit SEC CIK. |
| company | string | SEC entity name. |
| metric | string | Canonical metric ID. |
| unit | string | SEC unit, such as USD or USD/shares. |
| data | array | Newest-first observations with date, value, and periodType. |
| source | string | object | "SEC" by default; SEC EDGAR provider and URL in provenance mode. |
curl -H "Authorization: Bearer esak_<your-key>" \
"https://expert-system.starmode.dev/api/v1/financials/AAPL/accountsPayable?period=quarterly&limit=4"{
"catalogVersion": "1",
"symbol": "AAPL",
"cik": "0000320193",
"company": "Apple Inc.",
"metric": "accountsPayable",
"period": "quarterly",
"unit": "USD",
"data": [
{
"date": "2026-06-27",
"value": 64525000000,
"periodType": "instant"
}
],
"source": "SEC"
}{
"date": "2026-06-27",
"value": 64525000000,
"periodType": "instant",
"filed": "2026-07-31",
"form": "10-Q",
"accession": "0000320193-26-000020",
"concept": "AccountsPayableCurrent"
}/api/v1/financialsRetrieves several canonical metrics with one company-facts lookup and explicit per-metric availability errors.
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | required | Ticker symbol or SEC CIK. |
| metrics | string[] | required | Between 1 and 27 unique canonical metric IDs. |
| period | quarterly | annual | optional | Reporting period. Default: quarterly. |
| limit | number | optional | Observations per metric. Default: 8. Minimum: 1. Maximum: 40. |
| include | provenance | optional | Adds filing provenance to returned observations. |
curl -X POST -H "Authorization: Bearer esak_<your-key>" \
-H "Content-Type: application/json" \
-d '{"symbol":"JPM","metrics":["netIncome","inventory"],"period":"quarterly","limit":4}' \
"https://expert-system.starmode.dev/api/v1/financials"{
"catalogVersion": "1",
"symbol": "JPM",
"cik": "0000019617",
"company": "JPMORGAN CHASE & CO",
"period": "quarterly",
"metrics": {
"netIncome": {
"unit": "USD",
"data": [
{
"date": "2026-03-31",
"value": 16494000000,
"periodType": "quarter"
}
]
}
},
"errors": {
"inventory": {
"code": "METRIC_UNAVAILABLE",
"message": "inventory is unavailable for JPM"
}
},
"source": "SEC"
}Valid but unavailable metrics appear in errors while available metrics are returned normally with status 200. An unknown metric ID rejects the whole request with METRIC_NOT_FOUND.
/api/v1/macro/seriesList or search the supported FRED series before requesting observations.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | optional | Optional search across series IDs, descriptions, categories, and keywords. |
{
"items": [
{
"id": "UNRATE",
"description": "Civilian Unemployment Rate (%)",
"category": "Labor Market",
"nativeFrequency": "monthly",
"nativeUnits": "Percent",
"sourceUrl": "https://fred.stlouisfed.org/series/UNRATE"
}
]
}/api/v1/macro/observationsFetch independently configured observations for one to five supported FRED series.
Select series directly or search the macro series catalog first. Each series keeps its native timeline unless you explicitly request a lower frequency.
Growth / Real Economy: Real GDP, Industrial Production, Capacity Utilization, Real Personal Consumption, Real Business Fixed Investment.
Labor Market: Unemployment Rate, Labor Force Participation, Employment-Population Ratio, Nonfarm Payrolls, Initial Jobless Claims, Continuing Jobless Claims, Job Openings Rate, Quits Rate.
Inflation / Prices: CPI All Items, Core CPI, PCE Price Index, Core PCE, Trimmed Mean PCE, Median CPI.
Wages / Income: Average Hourly Earnings, Employment Cost Index, Real Disposable Personal Income.
Monetary Policy / Liquidity: Fed Funds Rate, Effective Fed Funds Rate, Interest on Reserve Balances, Fed Total Assets, Reserve Balances, Overnight Reverse Repo, M2 Money Supply.
Rates / Yield Curve: 2-Year Treasury, 10-Year Treasury, 10Y-2Y Spread, 10-Year Term Premium, 10-Year Breakeven Inflation.
Credit / Financial Stress: Baa Corporate Spread, High Yield OAS, Senior Loan Officer Survey, Financial Conditions Index, Bank Credit.
Housing: Housing Starts, Building Permits, Existing Home Sales, Case-Shiller Home Price Index, 30-Year Mortgage Rate.
Sentiment: Consumer Sentiment.
{
"series": [
{ "id": "UNRATE", "lastN": 12, "units": "lin" },
{
"id": "ICSA",
"lastN": 12,
"frequency": "m",
"aggregationMethod": "avg"
}
]
}Send one to five unique series. Each accepts either lastN or a complete startDate/endDate range. Transformations are lin, chg, ch1, pch, pc1, pca, cch, and cca. Frequency aggregation supports avg, sum, and eop; upsampling is rejected.
lin returns levels; chg and ch1 return period and year-ago changes; pch and pc1 return period and year-ago percent changes; pca is compounded annualized percent change; and cch/cca are continuously compounded period and annualized changes.
Use one series for simple questions and batches for comparisons. Keep native frequency by default; request an explicit lower frequency and aggregation method only when comparable periods are required.
{
"asOf": "2026-08-02T00:00:00.000Z",
"items": [
{
"seriesId": "UNRATE",
"description": "Civilian Unemployment Rate (%)",
"sourceUrl": "https://fred.stlouisfed.org/series/UNRATE",
"nativeFrequency": "monthly",
"returnedFrequency": "monthly",
"nativeUnits": "Percent",
"transformation": "lin",
"observations": [{ "date": "2026-07-01", "value": 4.2 }]
}
],
"errors": []
}| Field | Type | Description |
|---|---|---|
| items | array | Successful series with independent frequency, transformation, source, and observations. |
| errors | array | Per-series provider errors; successful series remain available. |
curl -X POST -H "Authorization: Bearer esak_<your-key>" \
-H "Content-Type: application/json" \
-d '{"series":[{"id":"UNRATE","lastN":12}]}' \
"https://expert-system.starmode.dev/api/v1/macro/observations"Errors return a JSON body with an error field and the corresponding HTTP status code. Financial endpoints use a nested, machine-readable code and message.
| Field | Type | Description |
|---|---|---|
| 400 Bad Request | Missing or invalid parameter (e.g. missing ids, invalid limit, malformed cursor or date). | |
| 401 Unauthorized | Missing, invalid, or revoked API key. | |
| 404 Not Found | Company, metric, or company-specific metric data was not found. | |
| 429 Too Many Requests | Monthly API quota or upstream SEC rate limit was reached. | |
| 502 Bad Gateway | SEC EDGAR was unavailable or returned an invalid payload. |
{ "error": "Missing required parameter: ids" }{
"error": {
"code": "METRIC_UNAVAILABLE",
"message": "inventory is unavailable for JPM"
}
}Financial error codes include UNAUTHORIZED, INVALID_REQUEST, COMPANY_NOT_FOUND, METRIC_NOT_FOUND, METRIC_UNAVAILABLE, SEC_UNAVAILABLE, RATE_LIMITED, and INTERNAL_ERROR.