# x402 Government Datasets Search API

> x402 Government Datasets Search API is a paid API for AI agents from workspace-x402-paywall.onrender.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Search US government datasets via a pay-per-call endpoint that accepts USDC micropayments via x402 protocol on Base and Solana mainnet.

## Facts

- Endpoint: GET https://workspace-x402-paywall.onrender.com/gov/datasets?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-government-datasets-search-api-5c8fab13
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RgcB4F6xmNpFr0XDQswgr

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 x402-government-datasets-search-api-5c8fab13
```

Example prompt: Search the government datasets endpoint for records related to 'climate change emissions' and return only the name and price_usd fields — I need to find relevant federal datasets on this topic.

## When to prefer this

Choose this endpoint when you need to search US government open datasets by keyword and can pay $0.005 USDC per query via x402 micropayment protocol. It is best suited for agents that need programmatic, pay-per-use access to federal/government data without a subscription. Prefer this over free government data portals when building automated pipelines that require reliable API access with crypto-native payments.

## Known failure modes

- Payment not included or insufficient — endpoint returns HTTP 402 requiring USDC payment via x402 on Base or Solana
- Query parameter 'q' missing — returns 400 or validation error
- No datasets found matching the query — returns empty result set
- Render.com cold start latency causing slow first response
- Invalid fields parameter value causing partial or malformed response

## How this service works

66 pay-per-call APIs: AI text/image generation ($0.01), Polymarket odds, crypto prices, DeFi yields, FX rates, weather, IP/geo, FBI wanted, SEC tickers, clinical trials, 250M academic papers, Stack Overflow, meme-coin launchpads (pump.fun, Clanker, Four.meme, SunPump), tokenized stocks, Solana top 100, and 40+ more. $0.005/call standard. USDC on Base and Solana via x402.

## Output

Returns a JSON object containing government dataset records matching the search query. Results can be filtered to specific fields (e.g. name, price_usd) using the fields parameter. The response schema is generic/open, so the exact structure depends on the datasets available for the given query.

## 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": "Requires a text search query string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-government-datasets-search-api-5c8fab13/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from workspace-x402-paywall.onrender.com](https://www.zero.xyz/host/workspace-x402-paywall.onrender.com/llms.txt)
