# Grants.gov · Search

Search public records with Grants.gov · Search from Alexandria through one Spiral API key. Search Grants.gov funding opportunities by keyword, agency, status, eligibility, funding category, assistance listing and posted-date window; one page of summary records (or full records with expand). It runs in the background and returns structured JSON. Pay as you go, with no subscription.

- Provider: Alexandria
- Category: Public Records
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `grants-gov/opportunities/search`
- Page: https://spiral.ai/tools/alexandria/grants-gov/opportunities/search

## Pricing

$0.00873 per call.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 5 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `sort` | one of | relevance, posted_desc, posted_asc, close_asc, close_desc | posted_desc | Ordering. A publication-date window requires posted_desc. |
| `query` | text |  |  | Keyword(s) matched by Grants.gov full-text search over title, number, description and agency. Separate words are matched with OR (`community solar` returns every notice mentioning either word); wrap a multi-word concept in double quotes (`"community solar"`) for an exact-phrase match. A multi-term query adds a warning saying so. Empty = browse. |
| `cursor` | text |  | — | next_cursor from a previous response with the same filters. Cursors from a different filter set, malformed cursors, or cursors beyond depth 10000 are rejected with invalid_input. |
| `expand` | true or false |  | — | Fetch the full detail record for every hit (one extra upstream request each; requires page_size <= 20). |
| `statuses` | list |  | — | Normalized status. posted = open for applications (source `posted`); forecast = planned, not yet open (source `forecasted`); closed = deadline passed, still listed (source `closed`); archived = removed from the public search after its archive date (source `archived`). Default posted+forecast; add closed/archived explicitly. |
| `page_size` | number | 1 to 100 | 20 | page_size |
| `agency_ids` | list |  | — | Grants.gov agency codes (e.g. HHS-NIH11, NSF, USDA-RUS). Department-level codes without a hyphen (e.g. HHS, DOD) are expanded to all sub-agencies using one extra facet request. Use `facets` to list codes. |
| `published_to` | text |  | — | Latest posted date (inclusive), YYYY-MM-DD. Must not be earlier than published_from. Pattern: ^\d{4}-\d{2}-\d{2}$. |
| `eligibilities` | list |  | — | Two-digit Grants.gov applicant eligibility codes, e.g. 00 State governments, 01 County governments, 02 City or township governments, 04 Special district governments, 05 Independent school districts, 06 Public and State controlled institutions of higher education, 07 Native American tribal governments (Federally recognized), 08 Public housing authorities/Indian housing authorities, 11 Native American tribal organizations (other than Federally recognized), 12 Nonprofits having a 501(c)(3) status, 13 Nonprofits without 501(c)(3), 20 Private institutions of higher education, 21 Individuals, 22 For profit organizations other than small businesses, 23 Small businesses, 25 Others, 99 Unrestricted. Any code matches (OR). |
| `published_from` | text |  | — | Earliest posted date (inclusive), YYYY-MM-DD. The source has no date filter, so a window forces posted_desc sort and scans up to 5 upstream pages (500 records) per call, resuming via next_cursor. Pattern: ^\d{4}-\d{2}-\d{2}$. |
| `funding_categories` | list |  | — | Grants.gov funding activity category codes, e.g. AG Agriculture, AR Arts, BC Business and Commerce, CD Community Development, CP Consumer Protection, DPR Disaster Prevention and Relief, ED Education, ELT Employment/Labor/Training, EN Energy, ENV Environment, FN Food and Nutrition, HL Health, HO Housing, HU Humanities, ISS Income Security and Social Services, IS Information and Statistics, LJL Law/Justice/Legal Services, NR Natural Resources, RA Recovery Act, RD Regional Development, ST Science and Technology, T Transportation, O Other. Any code matches (OR). Use `facets` for the live list. |
| `opportunity_number` | text |  | — | Exact-ish funding opportunity number filter (source oppNum). |
| `funding_instruments` | list |  | — | G Grant, CA Cooperative Agreement, PC Procurement Contract, O Other. |
| `assistance_listing_number` | text |  | — | Assistance Listing (CFDA) number, e.g. 10.757. Pattern: ^[0-9]{2}\.[0-9]{3}$. |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "grants-gov/opportunities/search",
    "input": {
      "sort": "posted_desc"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=grants-gov%2Fopportunities%2Fsearch

## Common questions

### Grants.gov · Search

**How much does Grants.gov · Search cost?**

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use Grants.gov · Search through an API?**

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "grants-gov/opportunities/search"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with Alexandria to use Grants.gov · Search?**

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

**Can my AI agent use Grants.gov · Search?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

