{
  "openapi": "3.1.0",
  "info": {
    "title": "AwardTape agent data feed",
    "version": "1.0.0",
    "description": "Machine-payable REST API and MCP server for U.S. DoD & DHS contract intelligence, enriched with commercial_trigger playbooks, Sell Now subcontract windows, Sell Next expiring recompetes, Demand for XYZ capability velocity, and 1-click FOIA SOW triggers.",
    "contact": {
      "name": "AwardTape",
      "email": "hello@awardtape.com",
      "url": "https://awardtape.com/agents/"
    },
    "termsOfService": "https://awardtape.com/terms/"
  },
  "servers": [
    {
      "url": "https://awardtape.com"
    }
  ],
  "x-service-info": {
    "categories": [
      "data",
      "government",
      "defense",
      "contracts"
    ],
    "docs": {
      "homepage": "https://awardtape.com/agents/",
      "apiReference": "https://awardtape.com/openapi.json",
      "llms": "https://awardtape.com/llms.txt"
    }
  },
  "components": {
    "securitySchemes": {
      "mpp": {
        "type": "http",
        "scheme": "Payment",
        "description": "Machine Payments Protocol credential returned after paying the 402 challenge"
      },
      "bundleKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "atk_... key from POST /api/agent/v1/credits (250 calls)"
      },
      "planKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "atp_... key from a Terminal (10,000 calls/mo) or Team (50,000 calls/mo) plan"
      }
    }
  },
  "paths": {
    "/api/agent/v1/sample": {
      "get": {
        "operationId": "sample",
        "summary": "Free sample: 5 latest awards and 1 company",
        "responses": {
          "200": {
            "description": "Sample JSON"
          }
        }
      }
    },
    "/api/agent/v1/awards": {
      "get": {
        "operationId": "searchAwards",
        "summary": "Award search, up to 100 rows, $0.02 per call",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Company name or PIID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agency",
            "in": "query",
            "required": false,
            "description": "Agency slug",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Category slug",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "psc",
            "in": "query",
            "required": false,
            "description": "4-character PSC",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min",
            "in": "query",
            "required": false,
            "description": "Minimum obligated USD",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bundleKey": []
          },
          {
            "planKey": []
          },
          {
            "mpp": []
          }
        ],
        "x-payment-info": {
          "amount": "20000",
          "currency": "0x20c000000000000000000000b9537d11c60e8b50",
          "description": "Award search, up to 100 rows ($0.02)",
          "intent": "charge",
          "method": "tempo"
        },
        "responses": {
          "200": {
            "description": "Awards, largest obligated first"
          },
          "402": {
            "description": "Payment Required. WWW-Authenticate: Payment challenge (MPP); JSON body lists price_usd, card bundle and free sample."
          }
        }
      }
    },
    "/api/agent/v1/companies/{id}": {
      "get": {
        "operationId": "getCompany",
        "summary": "Company profile and top 25 awards, $0.02 per call",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Company slug, e.g. anduril-industries"
          }
        ],
        "security": [
          {
            "bundleKey": []
          },
          {
            "planKey": []
          },
          {
            "mpp": []
          }
        ],
        "x-payment-info": {
          "amount": "20000",
          "currency": "0x20c000000000000000000000b9537d11c60e8b50",
          "description": "Company profile ($0.02)",
          "intent": "charge",
          "method": "tempo"
        },
        "responses": {
          "200": {
            "description": "Company profile"
          },
          "402": {
            "description": "Payment Required. WWW-Authenticate: Payment challenge (MPP); JSON body lists price_usd, card bundle and free sample."
          },
          "404": {
            "description": "Unknown company, not charged"
          }
        }
      }
    },
    "/api/agent/v1/daily": {
      "get": {
        "operationId": "dailyList",
        "summary": "Latest 200 awards by action date, $0.05 per call",
        "security": [
          {
            "bundleKey": []
          },
          {
            "planKey": []
          },
          {
            "mpp": []
          }
        ],
        "x-payment-info": {
          "amount": "50000",
          "currency": "0x20c000000000000000000000b9537d11c60e8b50",
          "description": "Daily list, 200 rows ($0.05)",
          "intent": "charge",
          "method": "tempo"
        },
        "responses": {
          "200": {
            "description": "Latest awards"
          },
          "402": {
            "description": "Payment Required. WWW-Authenticate: Payment challenge (MPP); JSON body lists price_usd, card bundle and free sample."
          }
        }
      }
    },
    "/api/agent/v1/credits": {
      "post": {
        "operationId": "buyCredits",
        "summary": "Buy 1,000 calls for $49.00; returns a bearer key",
        "security": [
          {
            "mpp": []
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "amount": "500",
              "currency": "usd",
              "description": "250 calls by card (Stripe shared payment token)",
              "intent": "charge",
              "method": "stripe"
            },
            {
              "amount": "5000000",
              "currency": "0x20c000000000000000000000b9537d11c60e8b50",
              "description": "250 calls in USDC on Tempo",
              "intent": "charge",
              "method": "tempo"
            }
          ]
        },
        "responses": {
          "201": {
            "description": "{ key: atk_..., calls: 250 }"
          },
          "402": {
            "description": "Payment Required. WWW-Authenticate: Payment challenge (MPP); JSON body lists price_usd, card bundle and free sample."
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Empty body"
              }
            }
          }
        }
      }
    },
    "/api/agent/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP JSON-RPC 2.0 over HTTP. Tools: sample (free), search_awards ($0.02), get_company ($0.02), latest_awards ($0.05), request_owner_payment (free), check_owner_payment (free)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or error payment_required"
          }
        }
      }
    },
    "/api/agent/v1/checkout": {
      "post": {
        "operationId": "ownerCheckout",
        "summary": "Free. Stripe Checkout link for the agent's owner to pay by card; returns pay_url, claim_token, claim_url, expires_at",
        "parameters": [
          {
            "name": "plan",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "bundle",
                "terminal",
                "team",
                "full_tape"
              ],
              "default": "bundle"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "pay_url, claim_token, claim_url, expires_at, instructions"
          },
          "400": {
            "description": "Unknown plan"
          },
          "429": {
            "description": "3 open checkouts per IP"
          }
        }
      }
    },
    "/api/agent/v1/checkout/{claim_token}": {
      "get": {
        "operationId": "ownerCheckoutStatus",
        "summary": "Free. pending | paid (key returned once) | claimed | expired",
        "parameters": [
          {
            "name": "claim_token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status, and the key once when paid"
          },
          "404": {
            "description": "Unknown token"
          }
        }
      }
    },
    "/api/agent/v1/foia": {
      "get": {
        "summary": "Contract Documents & SOW feed",
        "parameters": [
          {
            "name": "piid",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "company",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ok,count,items,credits_policy}"
          },
          "402": {
            "description": "Payment required"
          }
        }
      },
      "post": {
        "summary": "Queue an anonymous contract file request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "piid"
                ],
                "properties": {
                  "piid": {
                    "type": "string"
                  },
                  "contractor": {
                    "type": "string"
                  },
                  "agency": {
                    "type": "string"
                  },
                  "doc_type": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "callback_url": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ok,request_id,piid,status,foia_office,estimated_turnaround_days,message}"
          },
          "402": {
            "description": "Payment required"
          },
          "422": {
            "description": "Not available for this contract type"
          }
        }
      }
    },
    "/api/agent/v1/opportunities": {
      "get": {
        "operationId": "getCommercialOpportunities",
        "summary": "Sell Now (subcontract windows, open bids, IDIQ vehicles) and Sell Next (expiring incumbent recompetes)",
        "description": "Returns CRM-ready immediate capture targets (recent $15M+ prime subcontracting windows, open SAM.gov/DIU solicitations, IDIQ vehicle headroom) and 6-18 month expiring recompetes with incumbent vulnerability and FOIA SOW links. Supports ?format=csv.",
        "x-payment-info": {
          "price": "$0.05",
          "currency": "USD",
          "network": "tempo",
          "amount": "50000",
          "decimals": 6,
          "scheme": "Payment"
        },
        "parameters": [
          {
            "name": "pillar",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "sell_now",
                "sell_next"
              ],
              "default": "all"
            },
            "description": "Commercial pillar filter"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Keyword, capability, PSC, standard, or company filter"
          },
          {
            "name": "agency",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Buying agency or branch filter"
          },
          {
            "name": "min",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Minimum award or ceiling USD"
          },
          {
            "name": "max_days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 540
            },
            "description": "Max days until contract expiration for recompetes"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            },
            "description": "Set format=csv for CRM-ready CSV download"
          }
        ],
        "responses": {
          "200": {
            "description": "Structured Sell Now and Sell Next commercial opportunities"
          },
          "402": {
            "description": "Payment Required (MPP challenge or Bearer key link)"
          }
        }
      }
    },
    "/api/agent/v1/demand": {
      "get": {
        "operationId": "getDemandForXyz",
        "summary": "Demand for XYZ capability & commodity velocity, top buying commands, and market structure",
        "description": "For any query, commodity, PSC/FSC code, MIL-STD, or weapon system, returns 7d/30d spend velocity, velocity multiplier vs baseline, top buying commands, market concentration (Consolidated -> Subcontract Play vs Open -> Direct Bid Play), and matching Sell Now / Sell Next opportunities. Supports ?format=csv.",
        "x-payment-info": {
          "price": "$0.05",
          "currency": "USD",
          "network": "tempo",
          "amount": "50000",
          "decimals": 6,
          "scheme": "Payment"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Capability, commodity, PSC/FSC code, MIL-STD, or weapon system (e.g. radar, counter-uas, fuel, 4470, MIL-STD-810H)"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            },
            "description": "Set format=csv for CSV export"
          }
        ],
        "responses": {
          "200": {
            "description": "Demand velocity analysis, buying commands, market structure, and capability clusters"
          },
          "402": {
            "description": "Payment Required (MPP challenge or Bearer key link)"
          }
        }
      }
    }
  }
}
