# 2s Government Contract Opportunities Search

> 2s Government Contract Opportunities Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.0018/call, status unknown (last checked 2026-10-10).

Search and retrieve U.S. federal government contract opportunities from SAM.gov by date range, NAICS code, state, set-aside type, and keyword

## Facts

- Endpoint: GET https://2s.io/api/gov/contract-opportunities?utm_source=zero.xyz
- Price: $0.0018/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-government-contract-opportunities-search-7604cd22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PcW7oXG5nsdQOi6LVb2oz

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 2s-government-contract-opportunities-search-7604cd22
```

Example prompt: Find me federal government contract opportunities posted between 01/01/2025 and 01/31/2025 in the IT sector — NAICS code 541512 — in Texas, limited to small business set-asides, and show me the first 20 results.

## When to prefer this

Use this endpoint when you need structured, machine-readable federal government contract opportunity data with flexible filtering by date, industry (NAICS), geography, and set-aside type. Prefer this over manual SAM.gov browsing or scraping when an AI agent needs to programmatically discover contracting opportunities, especially with pay-per-call access requiring no API key or signup. Best when the agent needs to monitor new solicitations, qualify opportunities by set-aside, or feed procurement intelligence into a workflow.

## Known failure modes

- Missing required postedFrom or postedTo parameters returns a validation error
- Invalid date format (not MM/DD/YYYY) causes a schema validation failure
- NAICS code not matching \d{2,6} pattern rejected
- State code not exactly 2 characters rejected
- Offset exceeding 10000 returns an error
- No matching opportunities returns empty items array with total of 0
- Upstream SAM.gov API unavailability may cause timeouts or errors

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

Returns a paginated list of federal contract opportunity notices matching the query, each including notice ID, title, solicitation number, type, issuing department, posted date, response deadline, NAICS code, classification code, set-aside designation, active status, organization type, office location details, and a direct link to the SAM.gov listing. Also returns the total count of matching records and the echoed query parameters.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "postedFrom",
      "postedTo"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "default": 10,
       "maximum": 100,
       "minimum": 1
      },
      "naics": {
       "type": "string"
      },
      "ptype": {
       "type": "string",
       "maxLength": 2,
       "minLength": 1
      },
      "state": {
       "type": "string",
       "maxLength": 2,
       "minLength": 2
      },
      "title": {
       "type": "string",
       "maxLength": 200,
       "minLength": 2
      },
      "offset": {
       "type": "integer",
       "default": 0,
       "maximum": 10000,
       "minimum": 0
      },
      "postedTo": {
       "type": "string"
      },
      "setAside": {
       "type": "string",
       "maxLength": 12,
       "minLength": 2
      },
      "postedFrom": {
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-government-contract-opportunities-search-7604cd22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
