On this page
TL;DR: the best API depends on the earnings layer
FMP is the most complete single-stack option here for calendars, company earnings, surprises, and transcripts. Finnhub is strong for event timing plus EPS and revenue actuals versus estimates. Alpha Vantage is simple for prototypes and historical EPS. EODHD is useful for global calendar coverage and estimate trends. SEC EDGAR is the primary evidence layer, not a consensus-estimate API.
Choose it when one agent needs calendars, reported earnings, estimates, surprise screening, statements, and transcripts.
Choose it when event timing, international inclusion, EPS, revenue, and broader market data belong in one workflow.
Choose it for a straightforward calendar plus quarterly and annual EPS history, accepting CSV for the calendar endpoint.
Choose it when exchange-qualified symbols, worldwide coverage, estimate ranges, analyst counts, and revisions matter.
Who this guide is for
This guide is for engineers building earnings monitors, portfolio-alert agents, research copilots, post-earnings summaries, estimate-revision screens, or event-driven trading research. It assumes you can store normalized JSON, schedule pre- and post-event jobs, and retain source records for review.
Stable symbol mapping, UTC-aware timestamps, a fiscal-period model, provider credentials in server-side secrets, a revision policy, and an evidence store for releases, transcripts, and filings.
What “earnings data” actually includes
The word earnings often hides six different products. Treating them as one table causes date, period, and provenance errors.
| Layer | Typical fields | Agent use |
|---|---|---|
| Calendar | reportDate, timeOfDay, confirmed status | Schedule alerts, prefetch context, open an event window |
| Consensus estimates | EPS, revenue, low/high, analyst count, as-of time | Set the market expectation before release |
| Reported results | actual EPS, actual revenue, period end, currency | Measure the released result for the correct fiscal period |
| Surprise | difference, percentage, provider formula, estimate snapshot | Detect beats and misses without losing denominator context |
| Narrative | release, prepared remarks, Q&A, guidance, speaker | Explain drivers, management language, and outlook |
| Primary evidence | investor-relations URL, accession number, filing, exhibit | Verify material claims and preserve citations |
Evaluation criteria for an agent-ready earnings API
- Coverage: exchanges, countries, symbols, history depth, and delisted companies.
- Event quality: predicted versus confirmed dates, before/after market labels, timezone, and reschedules.
- Estimate quality: source methodology, analyst count, ranges, revisions, and as-of timestamps.
- Result semantics: GAAP versus adjusted EPS, diluted versus basic, revenue unit, and fiscal period.
- Freshness: calendar refresh cadence, post-release latency, correction handling, and webhooks or polling.
- Evidence: release, transcript, or filing URLs and enough metadata to reproduce an answer.
Best earnings APIs compared
| Option | Best fit | Documented strengths | Validate before launch |
|---|---|---|---|
| FMP Stable API | One financial-data stack | Calendar; symbol earnings; actual and estimated EPS/revenue; surprise bulk; transcripts; statements | Plan entitlements, regional coverage, transcript availability, exact update latency |
| Finnhub | Event and market-data workflows | Date windows, optional symbol, international flag, before/after market, EPS and revenue actuals/estimates | Historical depth by plan, estimate methodology, corrections, transcript access |
| Alpha Vantage | Simple prototypes and EPS history | EARNINGS JSON for annual/quarterly EPS, estimates and surprise; CSV calendar for 3/6/12-month horizons | CSV ingestion, rate limits, revenue requirements, global identifiers, production throughput |
| EODHD | Global symbols and estimate trends | Historical/upcoming calendar, exchange-qualified symbols, EPS actual/estimate, report timing, trend ranges and revisions | Null-field behavior, symbol omissions, batching, entitlement and market-specific latency |
| SEC EDGAR | Primary-source verification | Company submissions, 8-K/10-Q/10-K evidence, exhibits, accession identity, XBRL facts | Not a consensus calendar; you own filing retrieval, parsing, caching, and fair access |
Run a representative bake-off. Include a confirmed event, a rescheduled event, a company with a non-calendar fiscal year, a negative EPS estimate, a zero estimate, an ADR, a dual listing, and a result later corrected by the provider.
Provider notes: where each option wins
FMP's Stable documentation places earnings calendars, symbol-level results, transcripts, and bulk surprise data beside statements and company data. That reduces joins, but source URLs, regional depth, and latency still require testing.
The documented calendar response includes bmo, amc, and dmh timing plus EPS and revenue fields. That is useful for scheduling, but a date remains provisional unless confirmation semantics say otherwise.
EARNINGS returns annual and quarterly EPS history with estimates and surprise metrics. EARNINGS_CALENDAR returns CSV over 3-, 6-, or 12-month horizons. It is easy to prototype but narrower than a full earnings evidence stack.
The Trends API documents average, low, high, analyst count, growth, 7/30/60/90-day EPS trend points, and revision counts. These fields help an agent explain how expectations changed—not only whether a company beat.
Reference architecture for an earnings analysis agent
Map user input to an exchange-qualified symbol, legal entity, CIK where applicable, currency, and primary listing.
Store predicted and confirmed announcement times, timezone, status, and every observed reschedule.
Persist EPS/revenue consensus, ranges, analyst counts, source, and as-of time before results arrive.
Capture actual values, fiscal period, GAAP/adjusted basis, currency, units, provider timestamp, and correction version.
Join the release, guidance, prepared remarks, Q&A, SEC filing, exhibits, and source URLs without merging their authority levels.
Compare only compatible periods and definitions, then return the summary with the exact estimate snapshot and evidence bundle.
Step-by-step: build a normalized earnings event
FMP's Stable API is a useful implementation example because calendar and symbol-level earnings use the same authentication pattern. Keep the API key in a server-side secret and query only the window your scheduler needs.
curl --get "https://financialmodelingprep.com/stable/earnings-calendar" \
--header "apikey: YOUR_API_KEY" \
--data-urlencode "from=2026-07-27" \
--data-urlencode "to=2026-07-31"import hashlib
import json
import os
from datetime import datetime, timezone
from decimal import Decimal, InvalidOperation
import requests
BASE = "https://financialmodelingprep.com/stable"
HEADERS = {"apikey": os.environ["FMP_API_KEY"]}
response = requests.get(
f"{BASE}/earnings-calendar",
headers=HEADERS,
params={"from": "2026-07-27", "to": "2026-07-31"},
timeout=30,
)
response.raise_for_status()
records = response.json()
def number(value):
if value is None or value == "":
return None
try:
return Decimal(str(value))
except InvalidOperation:
return None
def surprise(actual, estimate):
actual, estimate = number(actual), number(estimate)
if actual is None or estimate is None or estimate == 0:
return {"difference": None, "percent": None}
return {
"difference": str(actual - estimate),
"percent": str((actual - estimate) / abs(estimate) * 100),
}
normalized = []
for row in records:
actual = row.get("epsActual")
estimate = row.get("epsEstimated") or row.get("epsEstimate")
raw = json.dumps(row, sort_keys=True, separators=(",", ":"))
normalized.append({
"symbol": row.get("symbol"),
"reportDate": row.get("date"),
"fiscalDateEnding": row.get("fiscalDateEnding"),
"epsActual": actual,
"epsEstimate": estimate,
"revenueActual": row.get("revenueActual"),
"revenueEstimate": row.get("revenueEstimated"),
"surprise": surprise(actual, estimate),
"provider": "financial-modeling-prep",
"retrievedAt": datetime.now(timezone.utc).isoformat(),
"rawSha256": hashlib.sha256(raw.encode()).hexdigest(),
"raw": row,
})The fallback field names make the example resilient to common provider naming differences, but production code should validate the exact schema returned by your subscribed endpoint. Do not recompute a provider's published surprise percentage without documenting whether its denominator uses the estimate, absolute estimate, or another convention.
Define the earnings evidence contract
| Field group | Required values | Why it matters |
|---|---|---|
| Identity | symbol, exchange, issuer ID, CIK | Prevents ADR, dual-listing, and ticker-reuse mistakes |
| Event | reportDate, time, timezone, status, observedAt | Distinguishes predictions, confirmations, and reschedules |
| Fiscal period | FY, FQ, period start/end, provider label | Stops calendar-quarter assumptions |
| Estimate snapshot | EPS/revenue average, low, high, analyst count, asOf | Makes consensus time-dependent and reproducible |
| Actual result | value, GAAP/adjusted, basic/diluted, currency, unit | Prevents semantically invalid comparisons |
| Provenance | provider, endpoint, retrievedAt, source URLs, raw hash, version | Supports corrections, audit, and exact citations |
Earnings surprise logic is more fragile than it looks
A beat or miss is meaningful only when actual and estimate share the same company, fiscal period, accounting basis, currency, unit, and estimate snapshot. Negative or zero EPS estimates make percentage surprise particularly easy to misread.
Store the published difference and percentage alongside the documented formula. Recompute only for cross-provider normalization.
A later estimate revision must not rewrite the market expectation the company actually faced at announcement time.
GAAP versus adjusted and basic versus diluted EPS are separate metrics, not interchangeable labels.
Convert only after confirming currency, scale, period, and whether values are reported or provider-normalized.
Validation checklist before the agent can answer
- The exchange-qualified symbol and issuer identity match the intended company.
- Predicted, confirmed, rescheduled, and actual publication times remain separate versions.
- Fiscal year, fiscal quarter, period end, and report date are not inferred from one another.
- Actual and estimate use the same GAAP/adjusted and basic/diluted definition.
- Revenue values share currency and scale, and null estimates do not become zero.
- The consensus snapshot includes provider, analyst count when available, and as-of time.
- Corrections create a new version and trigger re-evaluation of affected claims.
- Material claims link to a release, transcript passage, or SEC filing—not only the normalized API row.
Security, cost, and latency controls
Keep provider tokens in a secret manager. Never expose them in browser JavaScript, logs, screenshots, or prompts.
Refresh future calendars slowly, then poll a bounded symbol set near confirmed event windows.
Cache estimate snapshots and provider payloads by symbol, period, and observed timestamp instead of overwriting.
Retrieve only relevant transcript sections and source records after structured validation has narrowed the event.
Common failure modes and fixes
| Failure | Cause | Fix |
|---|---|---|
| Alert fires on the wrong day | Predicted date was treated as confirmed or timezone was dropped | Version event status and store timezone plus market-session label |
| False beat or miss | Different fiscal period, EPS basis, or estimate snapshot | Compare only after the evidence contract matches on every semantic key |
| Infinite surprise percentage | Estimate is zero or missing | Return null percentage and preserve the absolute difference |
| Historical answer changes silently | Provider corrections overwrote old rows | Use append-only snapshots, content hashes, and correction versions |
| Transcript is cited as the reported number | Narrative and structured result layers were merged | Use structured actuals for numbers and transcript passages for explanation |
| Duplicate issuer events | ADR, dual listing, or provider-specific symbols were not mapped | Separate issuer, security, listing, and provider identifiers |
Transcripts and SEC filings are evidence layers—not substitutes
An earnings transcript explains management's narrative and analyst questions. An 8-K exhibit may contain the earnings release; a 10-Q or 10-K carries the filed financial statements and disclosures. Neither one supplies a time-stamped consensus estimate. The reliable pattern is to freeze the estimate, ingest the reported result, then attach narrative and primary evidence.
QVeris implementation pattern: Discover → Inspect → Call
QVeris can sit above provider-specific earnings endpoints as an agent-facing discovery and routing layer. The agent searches for the exact capability—calendar, estimates, actuals, surprise, transcript, or filing—inspects its schema and limits, then calls it with bounded inputs. The response must still preserve the underlying provider and evidence URLs.
Find a capability by data layer and market coverage, not by a generic “earnings” label.
Check symbol format, fiscal-period semantics, timestamps, estimate methodology, schema, entitlements, and source fields.
Invoke the smallest date or symbol scope, validate the payload, and write an immutable evidence record.
Frequently asked questions
Which earnings API is best for AI agents?
FMP is a strong all-in-one choice, Finnhub is useful for event timing and estimate fields, Alpha Vantage is simple for prototypes, and EODHD is useful for global calendars and estimate trends. Test each against your own coverage and freshness requirements.
What is the difference between a calendar and earnings history?
A calendar predicts or records an announcement event. Earnings history stores reported results for fiscal periods. Event date and fiscal period are separate fields.
How should an agent calculate earnings surprise?
Prefer the provider's documented value. If you calculate it, preserve actual, estimate, formula, denominator policy, currency, and as-of timestamp. Zero or missing estimates need explicit handling.
Are transcripts the same as earnings results?
No. Transcripts contain management commentary and questions. Reported EPS and revenue should come from a structured results source and be verified against a release or filing when material.
Why do earnings dates change?
Companies can confirm or reschedule announcements, and providers can revise predicted dates. Store confirmation status and every observed update.
How should fiscal quarters be normalized?
Store fiscal year, fiscal quarter, period end, report date, and provider labels separately. Never derive the fiscal quarter from calendar month alone.
Should an agent trust consensus estimates as facts?
No. Consensus is a time-dependent aggregate. Store value, analyst count when available, provider, methodology notes, and as-of timestamp.
Where does QVeris fit?
QVeris helps an agent discover, inspect, and call provider tools. The data provider, earnings release, transcript, or SEC filing remains the source of record.
Official sources and next steps
API schemas, limits, plan entitlements, and update cycles can change. Verify the current official documentation and test representative symbols before production use.
Freeze expectations before explaining the result
Use QVeris to discover and inspect agent-ready earnings tools, then preserve provider identity, estimate snapshots, fiscal semantics, and primary evidence throughout the workflow.
Read the REST API Guide
