{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper",
    "description": "Scrape SAM.gov federal contract opportunities: RFPs, solicitations, sources sought and awards. Filter by keyword, NAICS, set-aside, state and date. Get contacts, deadlines, NAICS/PSC and attachments. No API key.",
    "version": "1.0",
    "x-build-id": "nMawhbH69cabWt6yQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/waags~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-waags-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/waags~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-waags-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/waags~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-waags-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": {
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Full-text search across titles, descriptions and solicitation numbers, e.g. \"cybersecurity\", \"janitorial\", \"drone\". Leave empty to get all opportunities that match the other filters."
          },
          "exactPhrase": {
            "title": "Match exact phrase",
            "type": "boolean",
            "description": "If enabled, the keywords must appear as an exact phrase. Otherwise all words must appear in any order.",
            "default": false
          },
          "titleOnly": {
            "title": "Keywords must appear in the title",
            "type": "boolean",
            "description": "SAM.gov's full-text search also matches boilerplate clauses inside descriptions (e.g. every DoD notice mentions \"cybersecurity\"). Keep this on to return only notices whose title contains your keywords. Turn it off for the broadest search.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Only return these notice types. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "s",
                "a",
                "u",
                "i",
                "g"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Intent to Bundle Requirements",
                "Sale of Surplus Property"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Filter by NAICS codes, e.g. 541512 (Computer Systems Design) or 236220 (Commercial Building Construction).",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Only return opportunities reserved for these small-business programs.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "IEE",
                "ISBEE",
                "BICiv"
              ],
              "enumTitles": [
                "Total Small Business",
                "Partial Small Business",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "Service-Disabled Veteran-Owned (SDVOSB) Set-Aside",
                "SDVOSB Sole Source",
                "Women-Owned Small Business (WOSB)",
                "WOSB Sole Source",
                "Economically Disadvantaged WOSB",
                "EDWOSB Sole Source",
                "Veteran-Owned (VA only)",
                "Veteran-Owned Sole Source (VA only)",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian"
              ]
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter US state codes for the place of performance, e.g. TX, VA, CA.",
            "items": {
              "type": "string"
            }
          },
          "postedFrom": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only notices published on or after this date. Use an absolute date (YYYY-MM-DD) or a relative one such as \"30 days\" (30 days ago). Relative values are recomputed on every run, which is ideal for daily schedules."
          },
          "postedTo": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Only notices published on or before this date (YYYY-MM-DD or relative such as \"1 day\")."
          },
          "responseDueFrom": {
            "title": "Response deadline on or after",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date. Use \"+0 days\" for today, or a fixed date, to skip opportunities that already closed."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Exclude archived and inactive notices.",
            "default": true
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "relevance"
            ],
            "type": "string",
            "description": "Order in which notices are collected.",
            "default": "newest"
          },
          "includeDetails": {
            "title": "Include full details and contacts",
            "type": "boolean",
            "description": "Fetch each notice's detail page for contracting officer contacts, NAICS, PSC, set-aside, place of performance, award data and description. Disable for a faster, lighter listing.",
            "default": true
          },
          "includeAttachments": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "List public attachment download links (SOW, specifications, amendments) for each notice. The files themselves are not downloaded.",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "Max description length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate the plain-text description to this many characters. Use 0 for the full text.",
            "default": 5000
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of opportunities to return (SAM.gov allows up to 10,000 per search). You are charged per result, so this also caps your cost.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}