# Agent Data API – Federal Contract Opportunities Search

> Agent Data API – Federal Contract Opportunities Search is a paid API for AI agents from agent-data-api.agentdata.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-14).

Search current U.S. federal contract opportunities (solicitations, presolicitations, sources sought) synced from SAM.gov, filterable by keyword, NAICS code, set-aside type, and state.

## Facts

- Endpoint: GET https://agent-data-api.agentdata.workers.dev/v1/contracts/opportunities?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-api-federal-contract-opportunities-search-bc42e10c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A2IwqBTMR82X7PotZ4dtv

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 agent-data-api-federal-contract-opportunities-search-bc42e10c
```

Example prompt: Find me open federal contract opportunities related to cybersecurity posted in the last 7 days in Virginia, focusing on service-disabled veteran-owned small business set-asides — give me up to 25 results.

## When to prefer this

Use this endpoint when you need fast, filtered access to current U.S. federal contract opportunities without building a direct SAM.gov integration. It is ideal when you need to filter by NAICS code, set-aside type, or state simultaneously, and when freshness within the day is sufficient (synced several times daily). Prefer this over direct SAM.gov API access when you want deduplicated results in a clean JSON format with predictable schema. Best suited for agents automating government business development workflows, bid monitoring, or small-business opportunity discovery.

## Known failure modes

- Invalid NAICS code format (must be exactly 6 digits) returns a validation error
- Invalid state code (must be 2-letter uppercase) returns a validation error
- Unrecognized set-aside code returns a validation error
- postedDays exceeding 14 returns an error since the synced copy only covers 14 days
- No results found returns count: 0 with empty results array
- Sync lag may cause very recently posted notices to be absent if not yet ingested
- Payment failure (x402 protocol) blocks the request if USDC payment is not processed

## How this service works

Search open U.S. federal contract opportunities (solicitations, presolicitations, sources sought) from a copy synced from SAM.gov several times a day. Use when you need current government RFPs or bids matching a title keyword, 6-digit NAICS code, small-business set-aside or place-of-performance state. Returns deduplicated JSON: notice ID, title, agency, NAICS, set-aside, posted date, response deadline, state, SAM.gov link and lastSynced. Defaults: last 7 days, 25 results (max 100).

## Output

A JSON object containing a count of matched results, the effective query parameters used (including date range), a lastSynced timestamp, and an array of deduplicated opportunity records each with: noticeId, title, agency, NAICS code, set-aside type, posted date, response deadline, place-of-performance state, and a direct SAM.gov URL for the notice.

## 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": [],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "description": "Keyword matched against the opportunity title, e.g. cybersecurity"
      },
      "limit": {
       "type": "integer",
       "default": 25,
       "maximum": 100,
       "minimum": 1,
       "description": "Maximum number of results"
      },
      "naics": {
       "type": "string",
       "pattern": "^(?:\\d{6})$",
       "description": "6-digit NAICS code, e.g. 541512"
      },
      "state": {
       "type": "string",
       "pattern": "^(?:[A-Z]{2})$",
       "description": "Two-letter place-of-performance state code, e.g. VA"
      },
      "setaside": {
       "enum": [
        "SBA",
        "SBP",
        "8A",
        "8AN",
        "HZC",
        "HZS",
        "SDVOSBC",
        "SDVOSBS",
        "WOSB",
        "WOSBSS",
        "EDWOSB",
        "EDWOSBSS",
        "LAS",
        "IEE",
        "ISBEE",
        "BICiv",
        "VSA",
        "VSS"
       ],
       "type": "string",
       "description": "Set-aside code: SBA (total small business), SBP (partial small business), 8A, 8AN, HZC/HZS (HUBZone), SDVOSBC/SDVOSBS (service-disabled veteran), WOSB/WOSBSS, EDWOSB/EDWOSBSS, LAS, IEE, ISBEE, BICiv, VSA/VSS"
      },
      "postedDays": {
       "type": "integer",
       "default": 7,
       "maximum": 14,
       "minimum": 1,
       "description": "Only opportunities posted in the last N days (the synced copy covers 14 days)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "lastSynced",
      "count",
      "results"
     ],
     "properties": {
      "count": {
       "type": "integer",
       "description": "Number of results returned"
      },
      "query": {
       "type": "object",
       "description": "The effective query, including the postedFrom/pos
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-api-federal-contract-opportunities-search-bc42e10c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-api.agentdata.workers.dev](https://www.zero.xyz/host/agent-data-api.agentdata.workers.dev/llms.txt)
