{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contracts Intelligence: SAM.gov, NAICS, FPDS",
    "description": "Query every federal contract from SAM.gov + USASpending ($800B/yr). Returns vendor, agency, NAICS, contract type, set-aside (SDVOSB/8a/HUBZone), period of performance. Filter by agency, NAICS, amount, state. MCP-native. FY2000-present.",
    "version": "0.0",
    "x-build-id": "9BgudqC2i9a7WNNc0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_avina~federal-contracts-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_avina-federal-contracts-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/andrew_avina~federal-contracts-mcp/runs": {
      "post": {
        "operationId": "runs-sync-andrew_avina-federal-contracts-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/andrew_avina~federal-contracts-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_avina-federal-contracts-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "title": "Keyword Search",
            "type": "string",
            "description": "Search keyword matched against recipient name, award description, agency, NAICS, and PSC fields. Examples: 'cybersecurity', 'artificial intelligence', 'logistics support', 'cloud computing'.",
            "default": ""
          },
          "agency": {
            "title": "Awarding Agency",
            "type": "string",
            "description": "Filter by awarding agency name. Examples: 'Department of Defense', 'NASA', 'Department of Homeland Security', 'Health and Human Services', 'General Services Administration'.",
            "default": ""
          },
          "naicsCode": {
            "title": "NAICS Code",
            "type": "string",
            "description": "6-digit North American Industry Classification System code. Examples: '541512' (Computer Systems Design), '541715' (R&D in Physical Sciences), '336411' (Aircraft Manufacturing), '611420' (Computer Training).",
            "default": ""
          },
          "pscCode": {
            "title": "PSC Code",
            "type": "string",
            "description": "Product/Service Code classifying the type of product or service procured. Examples: 'D307' (IT/Telecom - Systems Analysis), 'R425' (Professional: Engineering/Technical), 'AC13' (R&D - Physical Sciences).",
            "default": ""
          },
          "minAmount": {
            "title": "Minimum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return contracts with award amount >= this value in USD. Use 1000000 to filter for million-dollar+ contracts.",
            "default": 0
          },
          "maxAmount": {
            "title": "Maximum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return contracts with award amount <= this value in USD. Set to 0 for no upper limit.",
            "default": 0
          },
          "fiscalYear": {
            "title": "Fiscal Year",
            "minimum": 2000,
            "maximum": 2030,
            "type": "integer",
            "description": "US federal fiscal year to query (Oct 1 – Sep 30). Defaults to FY2024. Range: 2000–present.",
            "default": 2024
          },
          "limit": {
            "title": "Result Limit",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of contract awards to return (max 500). In MCP server mode, up to 1000 records are loaded into memory for real-time queries.",
            "default": 100
          },
          "serveMcp": {
            "title": "MCP Server Mode",
            "type": "boolean",
            "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this mode to connect Claude Desktop, Cursor, or any MCP client directly to live federal contracting data. The actor will run continuously until stopped.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}