Api Segments
Revenue breakdown by operating segment, geography, and product line.
Data source priority:
- PostgreSQL segment_revenue table (cached)
- On-disk *_xbrl.json file (extracted on demand, then cached to PG)
Response shape::
{
"ticker": "AAPL",
"operating": [{"name": "iPhone", "years": [{"year": 2023, "revenue": 200583000000}, ...]}, ...],
"geographic": [...],
"product": [...],
"source": "pg_cache" | "pg_cache_refreshing" | "xbrl_live",
# pg_cache_refreshing: these rows came from an OLDER extractor and a
# background re-extraction was just started (v229). The rows are real;
# a later request carries the improved ones.
"has_data": true
}
Each segment has a years array sorted newest-first so chart rendering is straightforward.
get/api/segments
Request
- Base URL: https://www.oxfordledge.com (the document declares no server; this is the origin it was published from)
- URL: https://www.oxfordledge.com/api/segments
- Auth: none declared
Query parameters
tickerstring required
Ticker symbol
Response
Successful Response
Stock Analysis Response required
Loose response_model for /api/fundamentals, /api/segments, /api/exec-comp, /api/sensitivity, /api/proxy, /api/chart-data, and similar analysis routes in routes_analysis_fastapi/stock.py. Multi-shape responses with deeply nested company/financial/chart data; loose contract since the FE consumers are typed via the typed-client wrappers, not directly off these schemas.
Changes
No recorded changes to this operation across all 1 revision of this API.