{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper: Federal RFPs & Bids",
    "description": "Scrape SAM.gov federal contract opportunities: RFPs, solicitations, sources sought & awards from GSA's official data, no API key. Filter by keyword, NAICS, PSC, set-aside, state & agency, with daily new-bid alerts. $2.40 per 1,000 notices.",
    "version": "0.1",
    "x-build-id": "uuuIZcfcUk2xZQucR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/infocomp~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-infocomp-sam-gov-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/infocomp~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-infocomp-sam-gov-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/infocomp~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-infocomp-sam-gov-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 (any of)",
            "type": "array",
            "description": "Whole-word, case-insensitive. A notice matches if its title (or, if you choose, title and description) contains any of these, e.g. cybersecurity, janitorial, \"software development\". Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "keywordsIn": {
            "title": "Search keywords in",
            "enum": [
              "title",
              "title_description"
            ],
            "type": "string",
            "description": "Where to look for keywords.",
            "default": "title"
          },
          "excludeKeywords": {
            "title": "Exclude titles containing",
            "type": "array",
            "description": "Drop notices whose title contains any of these words, e.g. construction, repair.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined",
                "presolicitation",
                "sources_sought",
                "special_notice",
                "award",
                "justification",
                "surplus_sale",
                "intent_to_bundle",
                "modification"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Sale of Surplus Property",
                "Intent to Bundle",
                "Modification/Amendment/Cancel"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (prefix match)",
            "type": "array",
            "description": "e.g. 541511 (custom programming) or 5415 to match every code that starts with 5415.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes (prefix match)",
            "type": "array",
            "description": "Product Service Codes, e.g. D3 (IT services) or R4 (professional support).",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "SAM.gov set-aside codes, e.g. SBA (total small business), 8A, SDVOSBC, WOSB, HZC. Use NONE for notices without a set-aside.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter codes, e.g. TX, VA, DC.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agency contains any of",
            "type": "array",
            "description": "Case-insensitive match on department, sub-tier and office, e.g. \"veterans affairs\", \"department of the army\", NASA.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Recommended for alerts (e.g. 1 or 2 on a daily schedule): the extract is sorted newest first, so the download stops early and runs are fast and cheap. Leave empty for every active notice. In API mode the default is 30 and the maximum 364."
          },
          "onlyOpen": {
            "title": "Only notices still accepting responses",
            "type": "boolean",
            "description": "Drop notices whose response deadline has passed. Notices with no deadline (e.g. awards, special notices) are kept unless you filter them out by type.",
            "default": false
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only award notices with at least this amount."
          },
          "onlyNewNotices": {
            "title": "Only notices not seen in previous runs",
            "type": "boolean",
            "description": "Remembers notices between runs (in a named key-value store in your account) and returns only new ones. Schedule daily for a federal bid alert.",
            "default": false
          },
          "treatAmendmentsAsNew": {
            "title": "Count amendments as new",
            "type": "boolean",
            "description": "SAM.gov gives every amendment its own notice ID. On: alert on each new version. Off: alert once per solicitation number.",
            "default": true
          },
          "stateKey": {
            "title": "Alert name (state key)",
            "type": "string",
            "description": "Separate memory for each saved search, e.g. \"cyber-va\". Only used with \"Only notices not seen\".",
            "default": "default"
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Full notice description (the extract includes it; GSA truncates very long ones at about 32,000 characters).",
            "default": true
          },
          "includeContacts": {
            "title": "Include contracting-office contacts",
            "type": "boolean",
            "description": "Primary and secondary points of contact (government contracting officers' work name, email and phone) as published on the notice.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many notices. Leave empty for no limit (your max cost per run still applies)."
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "auto",
              "extract",
              "api"
            ],
            "type": "string",
            "description": "Extract: GSA's official daily file of all active notices, no API key needed. API: SAM.gov Get Opportunities API with your own key, adds archived notices and attachment links. Auto uses the API when a key is given.",
            "default": "auto"
          },
          "samApiKey": {
            "title": "Your SAM.gov API key (optional)",
            "type": "string",
            "description": "Free personal key from sam.gov > Profile > Account Details > Public API Key. Stored encrypted; never logged. Personal keys without an entity role allow 10 requests per day (1,000 per page)."
          },
          "maxApiRequests": {
            "title": "Max API requests per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Protects your daily SAM.gov quota. Each request returns up to 1,000 notices.",
            "default": 10
          },
          "fetchApiDescriptions": {
            "title": "Fetch descriptions in API mode",
            "type": "boolean",
            "description": "The API returns descriptions as a separate link; fetching each costs one request from your quota.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}