{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper - Federal Contract Opportunities & Bids",
    "description": "Scrape SAM.gov Contract Opportunities without an API key: solicitations, sources sought and awards by keyword, NAICS, PSC, set-aside, agency, state and dates, with deadlines, contacts, attachments and awardee. US$ 2 per 1,000.",
    "version": "0.1",
    "x-build-id": "gcRtfitwfdovqJjpz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~sam-gov-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-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/scrapewise~sam-gov-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-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/scrapewise~sam-gov-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-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": {
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords, one per line (for example: software, cybersecurity, janitorial services, drone). Each keyword is a separate SAM.gov search over titles, descriptions and solicitation numbers. Leave empty and use only the filters below to get every opportunity that matches them.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "all",
              "any",
              "exact"
            ],
            "type": "string",
            "description": "How SAM.gov matches the words of each keyword: all words (default), any word, or the exact phrase."
          },
          "startUrls": {
            "title": "SAM.gov links or notice ids",
            "type": "array",
            "description": "SAM.gov opportunity links (https://sam.gov/opp/<id>/view), 32-character notice ids, or SAM.gov search links (https://sam.gov/search/?index=opp...). Keywords, NAICS, PSC, notice type, set-aside and status in a search link are kept.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "uniqueItems": true,
            "type": "array",
            "description": "Only these notice types. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combinedSynopsisSolicitation",
                "presolicitation",
                "sourcesSought",
                "specialNotice",
                "awardNotice",
                "justification",
                "justificationAndApproval",
                "intentToBundle",
                "saleOfSurplusProperty",
                "modification"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Intent to Bundle Requirements",
                "Sale of Surplus Property",
                "Modification/Amendment/Cancel"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS codes, one per line or comma separated (for example 541511, 541512, 236220). Empty = any.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product/service)",
            "type": "array",
            "description": "Product Service Codes, one per line (for example 7030, R425, J059). Empty = any.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "uniqueItems": true,
            "type": "array",
            "description": "Only opportunities with these small-business set-asides. Empty = any (including full and open competition).",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "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",
                "WOSB Set-Aside",
                "WOSB Sole Source",
                "EDWOSB Set-Aside",
                "EDWOSB Sole Source",
                "Local Area Set-Aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian",
                "Veteran-Owned Small Business (VA)",
                "Veteran-Owned Sole Source (VA)"
              ]
            }
          },
          "agencies": {
            "title": "Agencies or offices",
            "type": "array",
            "description": "Federal departments, agencies or offices by name as SAM.gov writes them (for example: Dept of the Navy, Veterans Affairs, NASA) or by SAM.gov organization id. Sub-offices are included. Empty = all agencies.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance: states",
            "type": "array",
            "description": "Two-letter US state codes, one per line (VA, TX, CA...). Empty = anywhere.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceZip": {
            "title": "Place of performance: ZIP codes",
            "type": "array",
            "description": "5-digit ZIP codes of the place of performance. Empty = any.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Active opportunities only (default), inactive/archived only, or both."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Only notices posted (or updated) on or after this date (YYYY-MM-DD)."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Only notices posted (or updated) on or before this date (YYYY-MM-DD)."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date (YYYY-MM-DD)."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date (YYYY-MM-DD)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "relevance"
            ],
            "type": "string",
            "description": "Order of the results (SAM.gov's own sort). Default: newest first."
          },
          "includeDetails": {
            "title": "Include detail page",
            "type": "boolean",
            "description": "Read each notice's detail page: NAICS, PSC, set-aside, place of performance, full description, official contracting contacts, attachment links and award data. On by default, same price. Turn off for faster runs with the search fields only."
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many opportunities to take from each keyword, search link or filter-only search. Empty = 100. SAM.gov returns at most 10,000 per search; split by date or NAICS to get more."
          },
          "maxItems": {
            "title": "Max opportunities in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on charged opportunities for the whole run. Empty or 0 = no cap besides the per-search limit."
          },
          "openDeadlineOnly": {
            "title": "Only with a response deadline still open",
            "type": "boolean",
            "description": "Skip notices without a response deadline or whose deadline has passed. Skipped notices are not charged."
          },
          "excludeKeywords": {
            "title": "Exclude notices whose title contains",
            "type": "array",
            "description": "Words, one per line. Notices with any of them in the title are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is the default and works for SAM.gov.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}