# US Government Data

> Query SAM.gov contracts, USAspending awards, Grants.gov funding and Congress trades through one API

US Government Data is a free AI agent skill on Agensi by Paper & Beyond, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Paper & Beyond](https://www.agensi.io/creators/paper-beyond)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-09
- Security: scan passed (2026-10-09); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/us-government-data
- Tags: api, project-management, research, edgrapi, government-data, sam-gov, usaspending, grants-gov

## About this skill

Five US federal data sources behind one key and one JSON schema, so your agent makes one integration instead of four.

**What it does**

- `get_opportunities` — open federal contract opportunities from SAM.gov, filtered by NAICS, set-aside, state or procurement type
- `get_awards` — federal awards from USAspending: contracts, grants, loans and direct payments, by agency, recipient or keyword
- `get_grants` — Grants.gov funding opportunities, by agency, category or Assistance Listing (CFDA) number
- `get_congress` / `get_congress_ticker` — US House STOCK Act stock trades, overall or for one ticker

**Why it exists**

All of this data is free and public. Each source also ships its own friction. SAM.gov takes `ncode` where you would expect `naics` and silently ignores unknown filters, so a filtered query returns a clean-looking unfiltered result; its dates are MM/dd/yyyy rather than ISO, and the posted window caps at a year. USAspending reports no further pages at record 10,000 while real rows continue to 50,000, so a client trusting that flag truncates without an error. This skill absorbs all of it and returns one shape.

**Limits, stated plainly**

- Federal only. No state or local (SLED) procurement.
- Congressional trades are US House only, lag up to 45 days by law, and report dollar ranges rather than exact amounts.
- USAspending search does not reach before 2007-10-01.
- Freshness follows each government source's own cadence; nothing is held or restated.

Pure Python standard library, no dependencies. The API key is read from an environment variable and the base URL is hardcoded, so the key never reaches any other host.

## Known limitations

US Federal data only. No state/local coverage. US House trades only (no Senate). Trade disclosures lag by up to 45 days. Amounts are reported in ranges.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the US Government Data skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill simplify federal data research compared to searching government sites directly?

This skill solves the 'fragmentation problem' by unifying data from SAM, USAspending, Grants.gov, and House disclosures into a single, normalized JSON format, saving you from handling multiple API schemas and inconsistent date formats.

### Do I need an external API key or subscription to use this skill?

Yes, the skill requires an `EDGRAPI_KEY` for authentication. You will need to obtain this from the Edgrapi provider to enable the AI agent to pull live records from federal databases.

### How does this prevent the LLM from hallucinating contract details or award amounts?

Unlike standard LLM prompts that rely on outdated training data, this skill queries live databases in real-time, bypassing common 'pagination traps' and silent filter failures found on public government portals.

### Does this skill include data for state-level contracts or US Senate stock trades?

The skill provides full coverage for US Federal contracts, grants, and awards. However, it currently excludes state/local (SLED) data and Senate stock disclosures, focusing exclusively on House member trades.

### What specific filters can I use to find open contract opportunities?

You can filter by NAICS codes, specific set-aside statuses (like 8(a), WOSB, or SDVOSB), agency, location, and specific keywords to find highly targeted procurement or grant opportunities.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
