Airflow DAG recipe
SEC API Airflow DAG
A copy-ready Apache Airflow DAG starter for data teams that want SEC filing watchlist polling inside an existing orchestrator without maintaining a custom EDGAR ingest pipeline.
GET /v1/sec/watchlist/changes?tickers=AAPL,MSFT,NVDA&since=2026-07-01&limit=25
from airflow.sdk import DAG, Variable
from airflow.providers.standard.operators.python import PythonOperator
def fetch_sec_watchlist(**context):
rapidapi_key = Variable.get("sec_event_intelligence_rapidapi_key")
tickers = Variable.get("sec_event_intelligence_tickers", default="AAPL,MSFT,NVDA")
# Call GET /v1/sec/watchlist/changes and push rows to XCom or downstream storage.
with DAG(
dag_id="sec_event_intelligence_watchlist",
schedule="@hourly",
catchup=False,
tags=["sec", "rapidapi", "data-apis"],
) as dag:
fetch_watchlist = PythonOperator(
task_id="fetch_sec_watchlist",
python_callable=fetch_sec_watchlist,
)
Workflow Setup
This recipe shows how to move SEC filing data into automation tools using live HTTPS endpoints and standard API credentials.
- Subscribe on RapidAPI and copy the generated RapidAPI key.
- Store the key as an Airflow Variable named sec_event_intelligence_rapidapi_key or as AIRFLOW_VAR_SEC_EVENT_INTELLIGENCE_RAPIDAPI_KEY.
- Copy the DAG file into your Airflow dags folder and set sec_event_intelligence_tickers if you want a different watchlist.
- Route returned rows from XCom into your warehouse, alert task, object storage, or downstream data quality checks.
Endpoints Used
The integration uses live SEC Event Intelligence endpoints available through RapidAPI subscriptions.
GET /v1/sec/watchlist/changesGET /v1/sec/changesGET /v1/sec/forms/{accessionNo}/summary
Integration FAQ
Is this an official Airflow provider package?
No. It is a standard Python DAG starter that calls the live RapidAPI endpoint from an Airflow task.
Where should the RapidAPI key be stored?
Use an Airflow Variable or environment-backed AIRFLOW_VAR_ value. Do not commit the key in the DAG source.
/downloads/sec-filings-airflow-dag.py.