{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper (No API Key)",
    "description": "Search SAM.gov federal contract opportunities by keyword, NAICS, set-aside, notice type, agency, state and dates. Clean flat records with POC email/phone and full description text, built on SAM.gov's official public daily extract. No API key.",
    "version": "1.0",
    "x-build-id": "zwfjvBJhJjzrML1uD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gov-data-tools~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gov-data-tools-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/gov-data-tools~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-gov-data-tools-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/gov-data-tools~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-gov-data-tools-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": {
          "dataSource": {
            "title": "Data source",
            "enum": [
              "officialExtract",
              "officialApi"
            ],
            "type": "string",
            "description": "officialExtract (default, no key): SAM.gov's official public daily extract of all active opportunities, refreshed nightly. officialApi: the official SAM.gov Opportunities API with your own key (includes archived notices and attachment links; personal keys allow ~10 requests/day).",
            "default": "officialExtract"
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Free-text search over title, description and solicitation number, e.g. \"cybersecurity\" or \"janitorial services\". Leave empty to match everything."
          },
          "keywordMode": {
            "title": "Keyword match mode",
            "enum": [
              "ALL",
              "ANY",
              "EXACT"
            ],
            "type": "string",
            "description": "ALL = every word must appear, ANY = at least one word, EXACT = exact phrase.",
            "default": "ALL"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest"
            ],
            "type": "string",
            "description": "Relevance (best keyword matches first) or newest (most recently updated first). Relevance only applies when keywords are given.",
            "default": "relevance"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "One or more NAICS codes or prefixes, e.g. 541512 or 5415 (matches all 5415xx).",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Filter by set-aside.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "LAS",
                "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 SB Set-Aside",
                "SDVOSB Sole Source",
                "Women-Owned SB (WOSB) Set-Aside",
                "WOSB Sole Source",
                "Economically Disadvantaged WOSB Set-Aside",
                "EDWOSB Sole Source",
                "Veteran-Owned SB Set-Aside",
                "Veteran-Owned SB Sole Source",
                "Local Area Set-Aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Filter by notice type. Leave empty for all.",
            "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 (DoD)",
                "Sale of Surplus Property"
              ]
            }
          },
          "agency": {
            "title": "Agency / office name",
            "type": "string",
            "description": "Department, agency or office name (case-insensitive word match), e.g. \"Veterans Affairs\", \"Dept of the Navy\", \"Army Corps of Engineers\"."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Earliest posted date (YYYY-MM-DD) or relative like \"7 days\"."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Latest posted date (YYYY-MM-DD)."
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes, e.g. VA, TX.",
            "items": {
              "type": "string"
            }
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices whose response deadline is on/after this date (YYYY-MM-DD or relative)."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices whose response deadline is on/before this date (YYYY-MM-DD or relative, e.g. \"30 days\" = due within 30 days)."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "The official daily extract contains active notices only. For archived notices and past awards, use the officialApi source.",
            "default": true
          },
          "latestVersionOnly": {
            "title": "Latest version per solicitation only",
            "type": "boolean",
            "description": "SAM.gov posts a new notice for each amendment. When on, only the most recent notice per solicitation number is returned (you pay once per opportunity, not per amendment).",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of opportunities to return. 0 = no limit.",
            "default": 100
          },
          "includeDescription": {
            "title": "Include full description text",
            "type": "boolean",
            "description": "Full notice description as plain text.",
            "default": true
          },
          "includeAttachments": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "Include available links. The daily extract provides the notice's additional-info link; the officialApi source provides full attachment link lists.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new notices since last run (monitor mode)",
            "type": "boolean",
            "description": "Remembers notice IDs per monitor name and only returns (and charges for) notices you haven't received before. Great for scheduled daily alerts.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory for each saved search when monitor mode is on.",
            "default": "default"
          },
          "samApiKey": {
            "title": "SAM.gov API key (optional fallback)",
            "type": "string",
            "description": "Only needed for the officialApi source. Get a free key on SAM.gov > Account Details. Personal keys allow ~10 requests/day."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}