{
  "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": "QUuLuPU51JxxpPBlW"
  },
  "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 computer programming), 561720 (janitorial). One code per line. A shorter prefix matches every code under it: 5415 covers 541511, 541512 and the rest of 5415.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Filter by Product Service Codes (classification codes), e.g. DA01 (IT application development support), R425 (engineering and technical support), 7510 (office supplies). One code per line; a prefix such as 7A matches every 7A code. The old D3xx IT codes were retired in October 2020, so active notices no longer carry them.",
            "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",
                "BICiv"
              ],
              "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",
                "Buy Indian Set-Aside (Indian Health Service)"
              ]
            }
          },
          "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 deliver in this run. Left empty, a search delivers up to 100, and a call with no search and no filter at all returns a 25-row sample. SAM.gov serves at most 10,000 results per search: split bigger pulls with posted date windows."
          },
          "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. Repeated IDs are read once, and an ID SAM.gov does not know is named on the run card and never billed.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Notice IDs or links from a file or a pasted list",
            "type": "string",
            "description": "Paste many notice IDs or sam.gov/opp/<id>/view links at once (one per line, or a CSV with them in any column), or paste ONE link to a .txt / .csv file, a Google Sheet or a Drive file shared as 'Anyone with the link'. Works like the field above and can be combined with it."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. With the default (Apify proxy, nothing else chosen) the actor reads SAM.gov directly first, which is several times faster, and switches to the Apify proxy whenever SAM.gov refuses a direct request. Choose a proxy group, a country or your own proxies to use them for every request.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}