{"id":47793249,"url":"https://github.com/zcaceres/govdata","last_synced_at":"2026-04-03T15:56:21.607Z","repository":{"id":342894708,"uuid":"1175540092","full_name":"zcaceres/govdata","owner":"zcaceres","description":"Human and Agent-Friendly Toolsuite for US Government Data Sets 🇺🇸","archived":false,"fork":false,"pushed_at":"2026-03-18T16:28:34.000Z","size":11301,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-19T06:12:27.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcaceres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T21:08:39.000Z","updated_at":"2026-03-10T16:56:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zcaceres/govdata","commit_stats":null,"previous_names":["zcaceres/govdata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zcaceres/govdata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fgovdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fgovdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fgovdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fgovdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcaceres","download_url":"https://codeload.github.com/zcaceres/govdata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fgovdata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31362041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T15:56:21.009Z","updated_at":"2026-04-03T15:56:21.593Z","avatar_url":"https://github.com/zcaceres.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# govdata\n\nA monorepo of typed TypeScript clients for U.S. government data APIs. Each data source is a plugin that shares a common core — one interface, multiple surfaces (library, CLI, MCP server).\n\n## Data Sources\n\n| Source | Status | Endpoints | Description |\n|--------|--------|-----------|-------------|\n| [doge-api](packages/doge-api) | Stable | 5 | DOGE API — grants, contracts, leases, payments, statistics |\n| [federal-register](packages/federal-register) | Stable | 9 | Federal Register — documents, agencies, public inspection, facets |\n| [dol-open-data-api](packages/dol-open-data-api) | Stable | 42 | Dept. of Labor — MSHA, OSHA, WHD, and 6 other agencies |\n| [naics-api](packages/naics-api) | Stable | 3 | NAICS code lookup (local SQLite, no HTTP) |\n| [usaspending-api](packages/usaspending-api) | Stable | 137 | USAspending.gov — awards, agencies, spending, recipients, contracts, disaster relief, financial accounts, IDVs, subawards, downloads |\n| [bls-api](packages/bls-api) | Stable | 3 | Bureau of Labor Statistics — time series, surveys, popular series |\n\n**Not yet started:** SEC EDGAR, Census Bureau, EPA, USDA, HHS, FEC, USPTO, data.gov\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| [govdata-core](packages/govdata-core) | Shared primitives: HTTP client, response envelope, pagination, plugin interface |\n| [doge-api](packages/doge-api) | DOGE API plugin |\n| [federal-register](packages/federal-register) | Federal Register API plugin |\n| [dol-open-data-api](packages/dol-open-data-api) | Dept. of Labor open data API plugin |\n| [naics-api](packages/naics-api) | NAICS code lookup plugin |\n| [usaspending-api](packages/usaspending-api) | USAspending.gov API plugin |\n| [bls-api](packages/bls-api) | Bureau of Labor Statistics API plugin |\n| [govdata-cli](packages/govdata-cli) | Unified CLI binary for all plugins |\n| [govdata-mcp](packages/govdata-mcp) | Unified MCP server for all plugins |\n\n## Quick start\n\n```bash\nbun install\n```\n\n### Library\n\n```ts\nimport { doge } from \"doge-api\";\nimport { fr } from \"federal-register\";\n\nconst grants = await doge.grants({ sort_by: \"savings\" });\nconsole.log(grants.summary());\n\nconst docs = await fr.documents.search({ term: \"climate\" });\nconsole.log(docs.toMarkdown());\n```\n\nSee each package's README for full API docs.\n\n### CLI\n\n```bash\n# Unified CLI routes by plugin prefix\nbun packages/govdata-cli/src/cli.ts doge grants --sort-by savings --per-page 5\nbun packages/govdata-cli/src/cli.ts federal-register documents --term climate\nbun packages/govdata-cli/src/cli.ts dol get MSHA accident --limit 10\n\n# Standalone CLIs also work\nbun packages/doge-api/src/cli.ts grants --sort-by savings\n```\n\n### MCP server\n\n```json\n{\n  \"mcpServers\": {\n    \"govdata\": {\n      \"command\": \"bun\",\n      \"args\": [\"packages/govdata-mcp/src/mcp.ts\"]\n    }\n  }\n}\n```\n\nRegisters tools for every plugin across all data sources.\n\n## Adding a new data source\n\n1. Create `packages/\u003cname\u003e-api/` implementing `GovDataPlugin` from `govdata-core`\n2. Add it to the `plugins` array in `govdata-cli` and `govdata-mcp`\n3. Add it to the `plugins` array in `tests/plugin-contract.test.ts` (and other integration tests)\n4. Run `bun test` to verify\n\n## Scripts\n\n```bash\nbun test                  # all tests (unit + integration)\nbun run test:integration  # root integration tests\nbun run test:core         # govdata-core unit tests\nbun run test:doge         # doge-api unit tests\nbun run test:naics        # naics-api unit tests\nbun run test:dol          # dol-open-data-api unit tests\nbun run test:fr           # federal-register unit tests\nbun run test:usaspending  # usaspending-api unit tests\nbun run test:bls          # bls-api unit tests\nbun run typecheck         # type-check all packages\n```\n\n## Architecture\n\nSee [COMPOSITION.md](COMPOSITION.md) for the full design rationale.\n\nEvery data source implements `GovDataPlugin`:\n\n```ts\ninterface GovDataPlugin {\n  prefix: string;\n  describe(): { endpoints: EndpointDescription[] };\n  endpoints: Record\u003cstring, (params?: any) =\u003e Promise\u003cGovResult\u003e\u003e;\n}\n```\n\nThe `describe()` method provides structured metadata that drives CLI flag parsing, MCP schema generation, and documentation. Adding a source means implementing this interface once — the CLI and MCP server surface it automatically.\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fgovdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcaceres%2Fgovdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fgovdata/lists"}