# agent402.tools US Government Dataset Search

> agent402.tools US Government Dataset Search is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Searches 300,000+ US government datasets on catalog.data.gov (CKAN) by keyword, returning dataset titles, publishing organizations, formats, and direct resource URLs.

## Facts

- Endpoint: GET https://agent402.tools/api/gov-data
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-us-government-dataset-search-14e41c35
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vWLHfD0aYA6MKxKTkgP1s

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 agent402-tools-us-government-dataset-search-14e41c35
```

Example prompt: Search catalog.data.gov for up to 10 government datasets about electric vehicles — I want to see the titles, publishing agencies, available formats, and download URLs.

## When to prefer this

Use this endpoint when you need to discover and index US federal government datasets before fetching them — especially when you don't know the exact dataset URL and need to search by topic, agency, or keyword across all 300,000+ entries on catalog.data.gov. Prefer this over direct data.gov API calls when operating in an x402 payment context or when you need a lightweight, agent-optimized search interface.

## Known failure modes

- Empty results if query is too specific or uses uncommon terminology — try broader synonyms
- Rate limit or payment failure if x402 USDC payment is not properly handled
- rows parameter out of range (must be 1-20) returns error
- Stale index if data.gov catalog has been updated more recently than the index
- Network timeout if catalog.data.gov upstream is slow

## How this service works

Search 300,000+ US government datasets on catalog.data.gov (Catalog API): titles, publishing org, formats, and direct resource URLs - the index agents need before fetching public data. ?q=electric+vehicles&rows=5.

## Output

A list of matching government dataset records including dataset title, publishing organization, available file formats (CSV, JSON, shapefile, etc.), and direct resource URLs for downloading or accessing the data — essentially an index for agents to know what's available before fetching.

## 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 query"
      },
      "rows": {
       "type": "number",
       "description": "Results to return, 1-20 (default 5)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "query",
      "totalFound",
      "results"
     ],
     "properties": {
      "query": {
       "type": "string"
      },
      "results": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "formats": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "resources": {
          "type": "array",
          "items": {
           "type": "object"
          }
         },
         "datasetUrl": {
          "type": "string"
         },
         "organization": {
          "type": "string"
         }
        }
       }
      },
      "totalFound": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "electric vehicle charging stations",
  "results": [
   {
    "title": "Electric Vehicle Charging Stations",
    "formats": [
     "json",
     "csv"
    ],
    "resources": [
     {
      "url": "https://…",
      "format": "csv"
     }
    ],
    "datasetUrl": "https://catalog.data.gov/dataset/…",
    "organization": "Town of Cary, North Carolina"
   }
  ],
  "totalFound": 5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-us-government-dataset-search-14e41c35/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
