import json, os, urllib.parse, urllib.request base = "https://prod.api.market/api/v1/veriline/sec-edgar-financials" query = urllib.parse.urlencode({"period": "annual", "limit": 4}) url = f"{base}/v1/financials/AAPL?{query}" req = urllib.request.Request( url, headers={"x-api-market-key": os.environ["API_MARKET_KEY"]}, ) with urllib.request.urlopen(req) as resp: payload = json.load(resp) for row in payload["data"]["statements"]: year = row["end"][:4] # use the period end, not the filing's fy revenue = row["revenue"]["value"] net_income = row["net_income"]["value"] print(f"{year} revenue={revenue:,} net_income={net_income:,}") Run against the live gateway on 5 Dec 2026 (Australia/Brisbane), that printed:
2026 revenue=478,834,000,000 net_income=132,175,000,000 2025 revenue=416,161,000,000 net_income=112,010,000,000 2024 revenue=391,035,000,000 net_income=93,736,000,000 2023 revenue=383,285,000,000 net_income=96,995,000,000 Those figures come from official SEC EDGAR data (data.sec.gov). The code does not parse XBRL, pick a US-GAAP tag, or special-case BRK.B versus BRK-B. The period label is taken from end because comparative rows in a 10-K often carry the filing's fy.
Why the raw files are awkward
A typical path looks like this: resolve a ticker to a zero-padded CIK, download the company submissions JSON, then pull companyfacts or a per-concept file that can be several megabytes for a large filer. Revenue might be RevenueFromContractWithCustomerExcludingAssessedTax on one issuer and Revenues on another. Comparative columns in the latest 10-K share the filing's fiscal year. None of that is wrong, but it is a lot of work if you only needed a four-year revenue and income series.
The financials call
GET /v1/financials/{ticker_or_cik} accepts a US ticker (AAPL, BRK-B, BRK.B) or a CIK (320193 or 0000320193). period is annual (default, 10-K FY) or quarterly (10-Q Q1–Q3; Q4 is not invented). limit is 1–20 (default 4 annual, 8 quarterly).
curl -G 'https://prod.api.market/api/v1/veriline/sec-edgar-financials/v1/financials/AAPL' \ --data-urlencode 'period=annual' \ --data-urlencode 'limit=4' \ -H 'x-api-market-key: YOUR_API_KEY' A trimmed form of the live 5 Dec 2026 response (full rows also include capex, assets, liabilities, equity, EPS, and shares, each with a tag and unit):
{ "success": true, "data": { "company": { "name": "Apple Inc.", "cik": "0000320193", "tickers": ["AAPL"] }, "period": "annual", "limit": 4, "currency": "USD", "statements": [ { "fy": 2026, "fp": "FY", "form": "10-K", "filed": "2026-11-03", "start": "2025-09-28", "end": "2026-09-26", "revenue": { "value": 478834000000, "unit": "USD" }, "net_income": { "value": 132175000000, "unit": "USD" }, "operating_cash_flow": { "value": 145097000000, "unit": "USD" }, "free_cash_flow": { "value": 136056000000, "unit": "USD", "derived": true, "formula": "operating_cash_flow - |capital_expenditures|" } } ] }, "error": null } free_cash_flow is derived as operating cash flow minus the absolute value of capex. The values above are not audited by Veriline API and are not investment advice. They will move when a new filing is ingested.
Unknown tickers return HTTP 404.
Company profile and recent filings
The same identifier works on two other read-only endpoints. These examples were captured earlier; they were not re-fetched for this post, so filing lists may be missing later submissions.
curl -X GET 'https://prod.api.market/api/v1/veriline/sec-edgar-financials/v1/company/AAPL' \ -H 'x-api-market-key: YOUR_API_KEY' { "success": true, "data": { "name": "Apple Inc.", "cik": "0000320193", "tickers": ["AAPL"], "exchange": "Nasdaq", "sic": "3571", "sic_description": "Electronic Computers", "fiscal_year_end": "09-25", "entity_type": "operating", "category": "Large accelerated filer", "state_of_incorporation": "CA", "source": "SEC EDGAR submissions (data.sec.gov)" }, "error": null } curl -G 'https://prod.api.market/api/v1/veriline/sec-edgar-financials/v1/filings/AAPL' \ --data-urlencode 'form=10-K,10-Q,8-K' \ --data-urlencode 'limit=5' \ -H 'x-api-market-key: YOUR_API_KEY' Each filing row includes filed, report_date, the accession number, and filing_url / index_url on sec.gov. Default form is 10-K,10-Q,8-K. Amendments such as 10-K/A are included only when requested.
The same calls from an MCP client
The @verilineapi/mcp server wraps these endpoints as get_sec_company, get_sec_financials, and get_sec_filings. After you set VERILINE_API_KEY, an agent can ask for last year's AAPL revenue without an XBRL library. Claude Desktop goes in claude_desktop_config.json; Cursor goes in ~/.cursor/mcp.json or the project .cursor/mcp.json:
{ "mcpServers": { "veriline": { "command": "npx", "args": ["-y", "@verilineapi/mcp"], "env": { "VERILINE_API_KEY": "your-api-market-key" } } } } The API these calls use
The endpoint is SEC EDGAR Clean Company Financials on the Veriline API store. Base URL:
https://prod.api.market/api/v1/veriline/sec-edgar-financials Send x-api-market-key on every request, including GET /health. Use the prod.api.market host; https://api.market/api/v1/... returns HTTP 421. The Basic plan is a 7-day trial with 100 calls at 1 request per second. Successful 200 responses count toward the quota, including /health. Validation errors (4xx) do not.
The opening financials series was captured live through that gateway on 5 Dec 2026 (Australia/Brisbane), during the product's trial window (through 9 Dec 2026). The company and filings envelopes were captured earlier and may lag newer submissions.

