{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contract Opportunities, RFPs & Awards",
    "description": "Every active US federal contract opportunity from the official SAM.gov daily data file: RFPs, solicitations, sources sought and award notices with winner and amount. Filter by NAICS, PSC, set-aside, agency, state and dates. No API key. Scheduled runs can return only new notices.",
    "version": "0.1",
    "x-build-id": "yinznRhrl5UkpcsGi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jdepablos~sam-gov-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jdepablos-sam-gov-opportunities-scraper",
        "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/jdepablos~sam-gov-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jdepablos-sam-gov-opportunities-scraper",
        "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/jdepablos~sam-gov-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jdepablos-sam-gov-opportunities-scraper",
        "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": "Words or phrases to find in the notice. A notice matches if it contains ANY of them, as a whole word or phrase and ignoring case, so \"cloud\" does not match \"Cloudflare\". Example: \"cybersecurity\", \"janitorial\", \"body armor\".",
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Search keywords in",
            "enum": [
              "title",
              "titleAndDescription"
            ],
            "type": "string",
            "description": "Title only is precise. Title and description finds far more (for \"software\" on 27 September 2026: 266 notices by title, 2,030 with the description), but many of the extra ones only mention the word in standard clauses.",
            "default": "title"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, matched as a prefix: \"5415\" covers 541511, 541512, 541519 and the rest of that family. Example: \"541512\" (computer systems design), \"236220\" (commercial building construction).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product and service codes)",
            "type": "array",
            "description": "Federal product and service codes, matched as a prefix: \"D3\" covers every IT and telecom service code that starts with D3.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for every type. Award notices carry the winning company, the amount and the award date.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Modification/Amendment/Cancel",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle"
              ]
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Small business programs. Leave empty for all, including notices without a set-aside.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BICIV",
                "LAS",
                "ESB",
                "NONE"
              ],
              "enumTitles": [
                "Total small business set-aside",
                "Partial small business set-aside",
                "8(a) set-aside",
                "8(a) sole source",
                "HUBZone set-aside",
                "HUBZone sole source",
                "Service-disabled veteran-owned small business (SDVOSB) set-aside",
                "SDVOSB sole source",
                "Women-owned small business (WOSB) program set-aside",
                "WOSB program sole source",
                "Economically disadvantaged WOSB (EDWOSB) set-aside",
                "EDWOSB sole source",
                "Veteran-owned small business set-aside (VA)",
                "Veteran-owned small business sole source (VA)",
                "Indian small business economic enterprise",
                "Indian economic enterprise",
                "Buy Indian set-aside (Indian Health Service)",
                "Local area set-aside",
                "Emerging small business set-aside",
                "No set-aside used"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Part of the department, sub-tier or office name, ignoring case. Example: \"VETERANS AFFAIRS\", \"NAVY\", \"US COAST GUARD\".",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance (US states)",
            "type": "array",
            "description": "Two-letter state codes where the work is done: VA, TX, CA. Most notices do not state a place of performance, so this filter drops them.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted in the last N days. Handy for scheduled runs because it moves with the calendar. Empty means any date."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Only notices posted on or after this date."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Only notices posted on or before this date."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date. Notices without a deadline are left out."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date. Notices without a deadline are left out."
          },
          "openForBidsOnly": {
            "title": "Open for responses only",
            "type": "boolean",
            "description": "Only notices whose response deadline has not passed yet. Notices without a deadline, such as most award notices, are left out.",
            "default": false
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Skip notices whose archive date has already passed. The daily file keeps some of them for a few days.",
            "default": true
          },
          "latestVersionOnly": {
            "title": "Latest version only",
            "type": "boolean",
            "description": "SAM.gov publishes every amendment as a separate notice: about a third of the daily file are older versions. On, you get one row per notice (the newest version) with versionCount and firstPostedDate. Off, you get every version. Award notices are never merged.",
            "default": true
          },
          "includeDescription": {
            "title": "Include the description",
            "type": "boolean",
            "description": "Adds the full notice text. Email addresses and phone numbers in it are removed.",
            "default": false
          },
          "onlyNew": {
            "title": "Only notices new since the last run",
            "type": "boolean",
            "description": "For scheduled runs. The first run returns what matches today and remembers it; later runs with the same filters return only notices that were not there before, so you only pay for new ones. Changing any filter starts a new search.",
            "default": false
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of notices returned in one run, newest first.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}