Fail fast when a government API your workflow depends on is down.
The govwatch health checker, packaged as a GitHub Action.
Government APIs go down. A lot. If your app ingests data from Congress.gov, FEC, CISA, or any of the 17 public sources govwatch monitors, this action tells your CI whether an upstream outage is about to break your build — or your users.
- uses: CapitolTrace/govwatch-action@v1
with:
services: congress fec cisa-kevEach run prints per-service results to the log, writes a table to the job summary, and fails the step when any checked API is unhealthy (HTTP errors, bad payloads, stale feeds — see health check anatomy). To see what these checks report right now, visit status.capitoltrace.com — the same checks running every 30 minutes.
jobs:
preflight:
runs-on: ubuntu-latest
steps:
- uses: CapitolTrace/govwatch-action@v1
with:
services: congress fec # only the APIs you depend on
env:
DATA_GOV_API_KEY: ${{ secrets.DATA_GOV_API_KEY }}on:
schedule:
- cron: '*/30 * * * *'
jobs:
monitor:
runs-on: ubuntu-latest
steps:
- uses: CapitolTrace/govwatch-action@v1
with:
strict: true # degraded/rate-limited also fail- uses: CapitolTrace/govwatch-action@v1
id: gw
continue-on-error: true
- name: Alert on outage
if: steps.gw.outputs.outcome == 'unhealthy'
env:
RESULTS: ${{ steps.gw.outputs.results }}
run: ./notify-slack.sh "$RESULTS"| Input | Default | Description |
|---|---|---|
services |
(all 17) | Slugs to check, space- or comma-separated. npx @capitoltrace/govwatch list shows all slugs. |
strict |
false |
Also fail on degraded / rate-limited. |
timeout |
(per-service) | Per-request timeout in ms. |
version |
latest |
@capitoltrace/govwatch version to run. |
summary |
true |
Write the results table to the job summary. |
| Output | Description |
|---|---|
results |
Full JSON array of check results (service, status, statusCode, responseTime, failures). |
outcome |
healthy, degraded, or unhealthy. |
Most services need no configuration. Pass keys for keyed services as env vars on the action step — keyed services without a key are skipped, never failed. See the govwatch key table for the full list (DATA_GOV_API_KEY, OPENSTATES_API_KEY, CENSUS_API_KEY, …).
A runner with Node.js 18.17+ and npm (all GitHub-hosted runners qualify, including Windows and macOS). The underlying package has zero runtime dependencies — the install adds ~14 kB.
Pin @v1 to track the latest v1.x, or an exact tag like @v1.0.0.
MIT
Part of the Capitol Trace ecosystem.
Because democracy runs on uptime.