{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contracts, RFPs & USAspending Awards",
    "description": "SAM.gov scraper for open US federal contract opportunities (RFPs, solicitations, Sources Sought) from SAM.gov's official public data extract, plus past contract awards from the USAspending API. Filter by keyword, NAICS, PSC, agency, set-aside and dates. No login, no API key.",
    "version": "0.1",
    "x-build-id": "dWsk2OGLG4TTqP9du"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actorfactory~us-federal-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actorfactory-us-federal-contracts",
        "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/actorfactory~us-federal-contracts/runs": {
      "post": {
        "operationId": "runs-sync-actorfactory-us-federal-contracts",
        "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/actorfactory~us-federal-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-actorfactory-us-federal-contracts",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "opportunities",
              "awards"
            ],
            "type": "string",
            "description": "\"opportunities\" = open federal solicitations from SAM.gov's official public data extract (bids, RFPs, sources sought). \"awards\" = past contract awards from USAspending.gov (who won what, for how much).",
            "default": "opportunities"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words or phrases, matched in the title and description (extract) or title (API key mode). Each keyword is OR-matched; results have no duplicates. Example: [\"cybersecurity\", \"cloud migration\"]. Leave empty to use only the other filters.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes (2-6 digits). Example: [\"541512\", \"541519\"].",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product/service codes (PSC)",
            "type": "array",
            "description": "Federal product/service codes. Example: [\"D302\", \"R499\"].",
            "items": {
              "type": "string"
            }
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Opportunities: part of the department, sub-tier or office name, e.g. \"NAVY\" or \"VETERANS\". Awards: the exact top-tier agency name, e.g. \"Department of Defense\"."
          },
          "noticeTypes": {
            "title": "Notice types (opportunities)",
            "type": "array",
            "description": "Only these notice types. Empty = all active notices.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined_synopsis_solicitation",
                "presolicitation",
                "sources_sought",
                "special_notice",
                "award_notice",
                "justification",
                "sale_of_surplus",
                "intent_to_bundle"
              ]
            }
          },
          "setAsides": {
            "title": "Set-asides (opportunities)",
            "type": "array",
            "description": "Small-business set-aside codes. SBA = Small Business, 8A = 8(a), HZC = HUBZone, SDVOSBC = Service-Disabled Veteran-Owned, WOSB = Women-Owned, EDWOSB = Economically Disadvantaged WOSB, VSA = Veteran-Owned.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "EDWOSB",
                "VSA",
                "VSS"
              ]
            }
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from (opportunities)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest response deadline, YYYY-MM-DD. Use today's date to skip expired notices."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to (opportunities)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest response deadline, YYYY-MM-DD."
          },
          "postedWithinDays": {
            "title": "Posted within days (opportunities)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted in the last N days. Example: 7. Makes the run much faster because the extract is sorted newest first and the scan stops early."
          },
          "includeArchived": {
            "title": "Include archived notices (opportunities)",
            "type": "boolean",
            "description": "By default only active notices are returned. Turn on to include archived (closed) notices too.",
            "default": false
          },
          "samApiKey": {
            "title": "SAM.gov API key (optional)",
            "type": "string",
            "description": "Optional. Your own SAM.gov API key. Without it the actor reads SAM.gov's official public data extract (no key needed). With a key it uses the official Get Opportunities Public API instead (no description text; non-federal keys have low daily request limits). Never shared or logged."
          },
          "recipient": {
            "title": "Recipient (awards)",
            "type": "string",
            "description": "Company name to search among award recipients. Example: \"Booz Allen Hamilton\"."
          },
          "awardTypes": {
            "title": "Award types (awards)",
            "type": "array",
            "description": "Contract award types. Empty = all four.",
            "items": {
              "type": "string",
              "enum": [
                "definitive_contract",
                "purchase_order",
                "delivery_order",
                "bpa_call"
              ]
            }
          },
          "awardStartDate": {
            "title": "Award period start (awards)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Default: one year ago. Earliest possible: 2007-10-01."
          },
          "awardEndDate": {
            "title": "Award period end (awards)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "minAmount": {
            "title": "Minimum amount USD (awards)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards of at least this many US dollars."
          },
          "maxAmount": {
            "title": "Maximum amount USD (awards)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards of at most this many US dollars."
          },
          "sortBy": {
            "title": "Sort awards by",
            "enum": [
              "amount",
              "start_date"
            ],
            "type": "string",
            "description": "Order of awards: largest amount first, or newest start date first.",
            "default": "amount"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many results. You are charged per result saved.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}