# US Government Grants Search (x402)

> US Government Grants Search (x402) is a paid API for AI agents from test5-x402-gov.stackstats.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Pay-per-call keyword search of US federal grant opportunities via the Grants.gov API, returning paginated results with agency, status, and deadline details.

## Facts

- Endpoint: GET https://test5-x402-gov.stackstats.workers.dev/grants/search?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-government-grants-search-x402-b261d10d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YpCzg4PjF_YCuyynuIi3G

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability us-government-grants-search-x402-b261d10d
```

Example prompt: Search the US federal grants database for broadband connectivity opportunities — show me the first page of results with up to 10 grants, including their agencies, open and close dates, and current status.

## When to prefer this

Use this endpoint when an agent needs to programmatically search US federal grant opportunities by keyword and receive structured JSON results with agency, deadline, and status metadata. Prefer it over scraping Grants.gov directly when you need a pay-per-call API interface with a predictable schema. Note that it is unofficial and results should be verified at source; it is not suitable when authoritative, legally binding data is required.

## Known failure modes

- Missing required 'q' query parameter returns a 400 error
- Search keyword exceeds 200 characters causes rejection
- Page number outside 1–5 range causes validation error
- Limit value outside 1–25 range causes validation error
- Upstream Grants.gov API unavailable causes failure or stale cache
- Payment not attached or insufficient USDC causes 402 rejection
- Results may be incomplete or delayed relative to official Grants.gov listings

## How this service works

Pay-per-call search of public US government data. Unofficial; verify at source. Provided AS IS with no warranty of any kind, express or implied, including accuracy, completeness, timeliness, merchantability or fitness for a particular purpose. Not affiliated with or endorsed by any U.S. government agency.

## Output

Returns a JSON object containing an array of grant opportunity records (each with ID, title, agency, ALN codes, opportunity number, document type, open/close dates, and status), a total hit count, a cache hit/miss indicator, the source URL, and disclaimer/notice text confirming the unofficial nature of the data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Search keywords (max 200 chars)"
      },
      "page": {
       "type": "integer",
       "default": 1,
       "maximum": 5,
       "minimum": 1,
       "description": "Page number 1-5"
      },
      "limit": {
       "type": "integer",
       "default": 10,
       "maximum": 25,
       "minimum": 1,
       "description": "Rows per page (max 25)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "label",
      "disclaimer",
      "source_url",
      "notice",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [],
       "properties": {
        "oppHits": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [],
          "properties": {
           "id": {
            "type": "string"
           },
           "title": {
            "type": "string"
           },
           "agency": {
            "type": "string"
           },
           "alnist": {
            "type": "array",
            "items": {
             "type": "string"
            }
           },
           "number": {
            "type": "string"
           },
           "docType": {
            "type": "string"
           },
           "openDate": {
            "type": "string"
           },
           "closeDate": {
            "type": "string"
           },
           "oppStatus": {
            "type": "string"
           },
           "agencyCode": {
            "type": "string"
           }
          }
         }
        },
        "hitCount": {
         "type": "integer"
        }
       }
      },
      "cache": {
       "enum": [
        "hit",
        "miss"
       ],
       "type": "string"
      },
      "label": {
       "type": "string",
       "const": "
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "oppHits": [
    {
     "id": "123456",
     "title": "Tribal Broadband Connectivity Program",
     "agency": "National Telecommunications and Information Administration",
     "alnist": [
      "11.029"
     ],
     "number": "NTIA-TBCP-2026",
     "openDate": "09/01/2026",
     "closeDate": "12/01/2026",
     "oppStatus": "posted"
    }
   ],
   "hitCount": 17
  },
  "cache": "miss",
  "label": "Unofficial; verify at source",
  "notice": "This product uses the Grants.gov API but is not endorsed or certified by the U.S. Department of Health and Human Services.",
  "disclaimer": "Unofficial; verify at source. Provided AS IS with no warranty of any kind, express or implied, including accuracy, completeness, timeliness, merchantability or fitness for a particular purpose. Not affiliated with or endorsed by any U.S. government agency.",
  "source_url": "https://api.grants.gov/v1/api/search2",
  "source_terms": "https://grants.gov/api/terms-conditions"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-government-grants-search-x402-b261d10d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from test5-x402-gov.stackstats.workers.dev](https://www.zero.xyz/host/test5-x402-gov.stackstats.workers.dev/llms.txt)
