# US Government Contracts Search (x402)

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

Pay-per-call keyword search of US federal awarded contract records sourced from USASpending.gov

## Facts

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

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-contracts-search-x402-1b5f356a
```

Example prompt: Search US government awarded contracts for 'Microsoft Azure cloud' and show me the first 10 results — I want to see who the recipients are, which agencies awarded them, and the amounts.

## When to prefer this

Choose this endpoint when you need programmatic, pay-per-call access to US federal awarded contract records and want to search by keyword across recipient names, descriptions, and agencies. Ideal for competitive intelligence, government spending research, vendor lookup, or any use case requiring quick keyword-based contract discovery without needing a full USASpending.gov API integration. Best when you need results immediately and can tolerate the unofficial/unwarranted nature of the data wrapper.

## Known failure modes

- Missing required 'q' query parameter returns validation error
- Search query exceeding 200 characters may be rejected
- Page number outside 1-5 range returns validation error
- Limit value outside 1-25 range returns validation error
- Payment failure (402) if USDC balance is insufficient
- Upstream USASpending.gov API downtime may cause failures
- No results found for obscure or misspelled keywords returns empty results array

## 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 paginated list of awarded US federal contracts matching the search query. Each result includes Award ID, Recipient Name, Awarding Agency, Award Amount (in USD), Start Date, and a brief Description. Also includes a hasNext flag for pagination, cache status (hit/miss), source URL pointing to USASpending.gov, and a mandatory disclaimer that data is unofficial and should be verified at source.

## 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",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [],
       "properties": {
        "hasNext": {
         "type": "boolean"
        },
        "results": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [],
          "properties": {
           "Award ID": {
            "type": "string"
           },
           "Start Date": {
            "type": [
             "string",
             "null"
            ]
           },
           "Description": {
            "type": [
             "string",
             "null"
            ]
           },
           "Award Amount": {
            "type": "number"
           },
           "Recipient Name": {
            "type": "string"
           },
           "Awarding Agency": {
            "type": "string"
           }
          }
         }
        }
       }
      },
      "note": {
       "type": "string"
      },
      "cache": {
       "enum": [
        "hit",
        "miss"
       ],
       "type": "string"
      },
      "label": {
       "type": "string",
       "const": "Unofficial; verify at source"
      },
      "disclaimer": {
       "type": "string"
      },
      "source_url": {
       "type": "string",
       "format": "uri"
      },

… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "hasNext": true,
   "results": [
    {
     "Award ID": "W91ZLK24F0181",
     "Start Date": "2024-09-25",
     "Description": "MICROSOFT AZURE CLOUD",
     "Award Amount": 55000,
     "Recipient Name": "DELL MARKETING L.P.",
     "Awarding Agency": "Department of Defense"
    }
   ]
  },
  "note": "Awarded contracts, not open solicitations",
  "cache": "miss",
  "label": "Unofficial; verify at source",
  "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.usaspending.gov/api/v2/search/spending_by_award/",
  "source_terms": "https://www.usaspending.gov/about",
  "dnb_attribution": "Recipient names may be supplied by Dun & Bradstreet, Inc. (D&B); see https://www.usaspending.gov/db_info"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-government-contracts-search-x402-1b5f356a/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)
