Set up a clean environment
You need Python 3.9 or later,requests, and an SEC API key. This example uses NVIDIA.
1. Request and save the preview bundle
Createearnings_preview.py:
python earnings_preview.py. It writes earnings-preview.json and prints the returned object identity and request metadata. A successful response is the bounded outcome for this step; bundle content can vary by issuer and selected filing context.
2. Make a review stub, not a synthetic forecast
Append this code after the request above:earnings-preview.md without assuming a stable internal shape for a
driver, risk, estimate, or citation. The expected result is the saved JSON plus
the review stub. Keep the JSON beside the note. When the bundle includes
supporting context, retain it unchanged; the source filing remains authoritative.
Limits and failure modes
- The route requires
tickerorcik. A failed retrieval is not evidence that an issuer has no earnings context. - This filing-derived route does not provide consensus estimates. Keep any external estimate separately sourced and labeled.
- A driver or risk is not a forecast or materiality determination. Read the returned supporting context and the source before quoting it.
- Save each run with its request metadata. A later request can return a different bundle.

