{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentGov \u2014 US Federal Intelligence API",
    "version": "1.0.0",
    "description": "x402-powered API for searching US federal contracts and grants. Pay per query in USDC on Base mainnet.",
    "contact": {
      "url": "https://contracts.memoryapi.org"
    }
  },
  "servers": [
    {
      "url": "https://contracts.memoryapi.org"
    }
  ],
  "paths": {
    "/x402/contracts/search": {
      "get": {
        "summary": "Search active US federal contract opportunities",
        "description": "Search 35,000+ active RFPs and solicitations from SAM.gov. Requires x402 payment of $0.01 USDC on Base.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search keyword or phrase"
          },
          {
            "name": "naics",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "6-digit NAICS code"
          },
          {
            "name": "set_aside",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Set-aside type: SBA, 8A, SDVOSBC, WOSB, HZC"
          },
          {
            "name": "agency",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by agency name"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            },
            "description": "Number of results"
          }
        ],
        "responses": {
          "200": {
            "description": "List of matching contract opportunities"
          },
          "402": {
            "description": "Payment required \u2014 send x402 USDC payment on Base"
          }
        },
        "x-price": "$0.001 USDC"
      }
    },
    "/x402/contracts/awards": {
      "get": {
        "summary": "Historical federal contract award data and price intelligence",
        "description": "Search past contract awards from SAM.gov. Returns award amounts, awardees, and price intelligence. Requires x402 payment of $0.05 USDC on Base.",
        "parameters": [
          {
            "name": "naics",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "6-digit NAICS code"
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search keyword"
          },
          {
            "name": "agency",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by agency name"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Award history with price intelligence"
          },
          "402": {
            "description": "Payment required \u2014 send x402 USDC payment on Base"
          }
        },
        "x-price": "$0.001 USDC"
      }
    },
    "/x402/grants/search": {
      "get": {
        "summary": "Search active US federal grant opportunities",
        "description": "Search 1,000+ active grants from Grants.gov. Filter by eligibility, category, and award size. Requires x402 payment of $0.01 USDC on Base.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search keyword"
          },
          {
            "name": "eligibility",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "small_business",
                "nonprofit",
                "state",
                "tribal",
                "individual",
                "university",
                "all"
              ]
            },
            "description": "Eligible applicant type"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Funding category: ST=Science, HL=Health, ED=Education, AG=Agriculture"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "posted",
                "forecasted",
                "all"
              ],
              "default": "posted"
            }
          },
          {
            "name": "min_award",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Minimum award amount in USD"
          },
          {
            "name": "max_award",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum award amount in USD"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of matching grant opportunities"
          },
          "402": {
            "description": "Payment required \u2014 send x402 USDC payment on Base"
          }
        },
        "x-price": "$0.001 USDC"
      }
    }
  }
}