{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contracts API: Federal Bids, RFPs & Awards",
    "description": "US government contracts from the official SAM.gov public extract, not a web scraper: federal bids, RFPs, opportunities and award notices. No API key, no daily limit. NAICS, PSC, set-aside, state, keywords. Only-new alerts. Awardee mode ranks who wins. Contact names, emails and phones removed.",
    "version": "0.1",
    "x-build-id": "4vmfB7qqCNvaCwRUW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/responsible_front_evw~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-responsible_front_evw-sam-gov-contract-opportunities",
        "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/responsible_front_evw~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-responsible_front_evw-sam-gov-contract-opportunities",
        "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/responsible_front_evw~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-responsible_front_evw-sam-gov-contract-opportunities",
        "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": {
          "mode": {
            "title": "What to return",
            "enum": [
              "notices",
              "awardees"
            ],
            "type": "string",
            "description": "'notices': one row per opportunity (solicitations, sources sought, awards...). 'awardees': one row per company that won contracts, with number of awards and total amount, built from award notices.",
            "default": "notices"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional: keep notices whose title or description contains any of these words or phrases (whole words, any case), for example janitorial, cybersecurity, \"body armor\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional: drop notices that contain any of these words, for example brand name, sole source.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Optional: full or partial NAICS codes, for example 541512 (computer systems design), 5415 (all IT services), 236 (building construction), 54 (all professional services).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product and service codes)",
            "type": "array",
            "description": "Optional: full or partial PSC codes, for example DA01, D (IT services), R4 (professional support), 70 (IT equipment), S2 (housekeeping).",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside",
            "type": "array",
            "description": "Optional: keep only these small business set-asides.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BICiv",
                "LAS",
                "NONE"
              ],
              "enumTitles": [
                "Total Small Business",
                "Partial Small Business",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "SDVOSB Set-Aside",
                "SDVOSB Sole Source",
                "WOSB Set-Aside",
                "WOSB Sole Source",
                "EDWOSB Set-Aside",
                "EDWOSB Sole Source",
                "Veteran-Owned Set-Aside (VA)",
                "Veteran-Owned Sole Source (VA)",
                "Indian Small Business Economic Enterprise",
                "Indian Economic Enterprise",
                "Buy Indian (IHS)",
                "Local Area Set-Aside",
                "No set-aside used"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Optional: keep only these notice types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Intent to Bundle Requirements (DoD-Funded)",
                "Sale of Surplus Property"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought (RFI)",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Intent to Bundle (DoD)",
                "Sale of Surplus Property"
              ]
            }
          },
          "states": {
            "title": "States (place of performance)",
            "type": "array",
            "description": "Optional: two-letter state codes, for example VA, TX, CA. Uses the place of performance; when a notice has none, the contracting office state.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Optional: text in the department, sub-tier or office name, for example veterans affairs, army, NASA, GSA.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted in the last N days. Short windows are fastest: the file is read newest first and reading stops at this date.",
            "default": 7
          },
          "postedFrom": {
            "title": "Posted since (date)",
            "type": "string",
            "description": "Optional: only notices posted on or after this date, YYYY-MM-DD. Overrides 'Posted in the last N days'."
          },
          "onlyOpen": {
            "title": "Only open opportunities",
            "type": "boolean",
            "description": "Skip notices whose response deadline has already passed. Notices without a deadline (for example awards) are kept. Not used in awardee mode.",
            "default": true
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional: only award notices of at least this amount. Useful with mode 'awardees'."
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Add the notice text (emails, phone numbers and contact names removed).",
            "default": true
          },
          "maxDescriptionChars": {
            "title": "Maximum description length",
            "minimum": 0,
            "type": "integer",
            "description": "Cut longer descriptions at this many characters (0 = no limit).",
            "default": 5000
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Alerts mode: return only notices not returned by a previous run with the same filters. Schedule it daily, with 'Posted in the last N days' set to 2, and pay only for new notices. Not used in awardee mode.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. You pay per row.",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}