{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper - Federal Contract Opportunities & Contacts",
    "description": "Scrape SAM.gov federal contract opportunities: RFPs, solicitations, sources sought, awards. Filter by keyword, NAICS, PSC, set-aside, notice type, dates. Returns contracting officer names, emails, phones, full descriptions, and attachment download links. No API key needed.",
    "version": "1.0",
    "x-build-id": "HPs3bzwDTIgZwP04j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~sam-gov-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-sam-gov-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/scrapesage~sam-gov-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-sam-gov-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/scrapesage~sam-gov-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-sam-gov-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": "string",
            "description": "Search keywords, e.g. 'janitorial services' or 'cybersecurity'. Leave empty to match all opportunities (combine with filters below)."
          },
          "keywordMode": {
            "title": "Keyword matching",
            "enum": [
              "ALL",
              "ANY",
              "EXACT"
            ],
            "type": "string",
            "description": "How multiple keywords are combined: require all words, any word, or the exact phrase.",
            "default": "ALL"
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to specific notice types. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "p",
                "k",
                "r",
                "s",
                "a",
                "u",
                "g",
                "i"
              ],
              "enumTitles": [
                "Solicitation",
                "Presolicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Sale of Surplus Property",
                "Intent to Bundle"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Filter by NAICS industry codes, e.g. 541511 (custom software), 561720 (janitorial). One code per line.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Filter by Product Service Codes (classification codes), e.g. D302 (IT systems development), 7510 (office supplies). One code per line.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Limit to small-business set-aside categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "LAS",
                "IEE",
                "ISBEE",
                "VSA",
                "VSS"
              ],
              "enumTitles": [
                "Total Small Business",
                "Partial Small Business",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "SDVOSB Set-Aside",
                "SDVOSB Sole Source",
                "Women-Owned Small Business",
                "WOSB Sole Source",
                "Economically Disadvantaged WOSB",
                "EDWOSB Sole Source",
                "Local Area Set-Aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Veteran-Owned Small Business",
                "VOSB Sole Source"
              ]
            }
          },
          "status": {
            "title": "Opportunity status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Active opportunities (open for response), inactive (archived), or everything.",
            "default": "active"
          },
          "postedFrom": {
            "title": "Posted after",
            "type": "string",
            "description": "Only opportunities first published on/after this date. ISO date (2026-06-01) or relative ('7 days', '2 weeks', '3 months'). TIP: schedule this actor daily with '2 days' for a monitoring feed of new opportunities."
          },
          "postedTo": {
            "title": "Posted before",
            "type": "string",
            "description": "Only opportunities first published on/before this date. ISO date or relative value."
          },
          "modifiedFrom": {
            "title": "Modified after",
            "type": "string",
            "description": "Only opportunities updated on/after this date. ISO date or relative value like '1 day'."
          },
          "modifiedTo": {
            "title": "Modified before",
            "type": "string",
            "description": "Only opportunities updated on/before this date. ISO date or relative value."
          },
          "responseDueFrom": {
            "title": "Response deadline after",
            "type": "string",
            "description": "Only opportunities whose response/offer deadline is on/after this date. ISO date or relative value. Useful to exclude nearly-closed solicitations."
          },
          "responseDueTo": {
            "title": "Response deadline before",
            "type": "string",
            "description": "Only opportunities whose response/offer deadline is on/before this date. ISO date or relative value."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of opportunities to scrape in this run. SAM.gov caps any single query at 10,000 records - narrow with date ranges or filters to cover more.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "-modifiedDate",
              "-relevance"
            ],
            "type": "string",
            "description": "Order of results. 'Recently modified' is best for monitoring; 'Relevance' is best with keywords.",
            "default": "-modifiedDate"
          },
          "fetchFullDetails": {
            "title": "Fetch full details",
            "type": "boolean",
            "description": "Fetch each opportunity's detail page: full description, contracting officer contacts (name, email, phone), NAICS/PSC codes, set-aside, place of performance, and exact response deadline. Adds one extra request per opportunity. Disable for a faster, cheaper feed of basic fields only.",
            "default": true
          },
          "includeAttachments": {
            "title": "List attachments",
            "type": "boolean",
            "description": "Fetch the list of attachments (SOWs, specs, amendments) for each opportunity, with direct download URLs. Adds one extra request per opportunity.",
            "default": true
          },
          "downloadAttachments": {
            "title": "Download attachment files",
            "type": "boolean",
            "description": "Download attachment files into the run's key-value store (download URLs are always included in the dataset regardless). Only public files up to the size limit below.",
            "default": false
          },
          "maxAttachmentSizeMb": {
            "title": "Max attachment size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Skip downloading files larger than this. Only used when 'Download attachment files' is enabled.",
            "default": 25
          },
          "noticeIds": {
            "title": "Specific notice IDs or URLs",
            "type": "array",
            "description": "Scrape specific opportunities directly: paste SAM.gov opportunity URLs (https://sam.gov/opp/<id>/view) or 32-character notice IDs, one per line. When set, the search filters above are ignored.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. SAM.gov is a public API and lenient; Apify datacenter proxy (default) is recommended for reliability at scale.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}