{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper (RFPs & Bids)",
    "description": "Search US federal contract opportunities on SAM.gov by keyword, NAICS, PSC, set-aside, agency and notice type. Schedule for daily new-RFP alerts.",
    "version": "0.1",
    "x-build-id": "bbdv3KzwMi2yaHNlg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lindenbyte~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lindenbyte-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/lindenbyte~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-lindenbyte-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/lindenbyte~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-lindenbyte-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": "array",
            "description": "Search terms (each run separately, results de-duplicated). Leave empty to list the newest opportunities.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "SAM.gov full-text search also matches attachments/clauses, so 'relevance' gives tighter keyword matches; 'newest' is best with a daily schedule.",
            "default": "newest"
          },
          "strictKeywordMatch": {
            "title": "Only keep results that mention the keyword",
            "type": "boolean",
            "description": "SAM.gov full-text search also matches attachments and boilerplate clauses, so many hits never mention your keyword. When on, a result is kept only if every word of the keyword (or \"quoted phrase\") appears in its title or description. Turn off to get the raw SAM.gov results.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Filter by notice type. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "presolicitation",
                "combined",
                "sources-sought",
                "special-notice",
                "award",
                "sale-of-surplus",
                "intent-to-bundle",
                "justification"
              ],
              "enumTitles": [
                "Solicitation",
                "Presolicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Sale of Surplus Property",
                "Intent to Bundle",
                "Justification"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "e.g. 541511. Matches any.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Exact 4-character Product/Service codes, e.g. DA01, 1440, R425. Matches any.",
            "items": {
              "type": "string"
            }
          },
          "setAside": {
            "title": "Set-aside",
            "enum": [
              "any",
              "SBA",
              "8A",
              "HZC",
              "SDVOSBC",
              "WOSB",
              "EDWOSB"
            ],
            "type": "string",
            "description": "Restrict to a small-business set-aside type.",
            "default": "any"
          },
          "agency": {
            "title": "Agency contains",
            "type": "string",
            "description": "Case-insensitive text matched against the agency/office hierarchy, e.g. 'DEPT OF DEFENSE'."
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "Two-letter US state, e.g. VA."
          },
          "activeOnly": {
            "title": "Active only",
            "type": "boolean",
            "description": "Only opportunities still open for response.",
            "default": true
          },
          "postedWithinDays": {
            "title": "Posted within last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "0 = no limit. Use 1 with a daily schedule for fresh RFP alerts.",
            "default": 0
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total cap across all keywords.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include NAICS / PSC / set-aside / place of performance",
            "type": "boolean",
            "description": "Fetches each notice's detail record (slower, about 2x requests). Turn off for fastest title-level lists.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}