{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper",
    "description": "Search US federal contract opportunities on SAM.gov by keyword, NAICS, PSC, set-aside, agency, state and dates. Each notice comes with the full description, contacts, deadlines, award details and attachment download links. No API key needed.",
    "version": "0.1",
    "x-build-id": "RLtzN5sp7GC8LbCFv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeworks~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeworks-sam-gov-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/scrapeworks~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-scrapeworks-sam-gov-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/scrapeworks~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeworks-sam-gov-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": {
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to look for in the title, description and solicitation number, for example 'cybersecurity' or 'janitorial services'. Each entry is its own search. Leave empty to list every notice that matches the filters below.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops after this many notices in total, across all keywords. You pay per notice returned.",
            "default": 100
          },
          "matchAllWords": {
            "title": "Match all words",
            "type": "boolean",
            "description": "On: a notice must contain every word of a keyword entry. Off: any of the words is enough.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "s",
                "a",
                "u",
                "i",
                "g"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Intent to Bundle Requirements",
                "Sale of Surplus Property"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted in the last N days. Handy for a daily or weekly schedule. Overrides 'Posted from'."
          },
          "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."
          },
          "responseFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date. Use today's date to skip notices that already closed."
          },
          "responseTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date."
          },
          "modifiedFrom": {
            "title": "Updated from",
            "type": "string",
            "description": "Only notices posted or changed on or after this date."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Six-digit NAICS codes, for example 541511 (custom programming) or 561720 (janitorial services).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product and service codes (PSC)",
            "type": "array",
            "description": "Full codes such as 7A21 or R425, or a leading letter such as D for all IT services.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Only notices reserved for these business types.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "NONE"
              ],
              "enumTitles": [
                "Total Small Business",
                "Partial Small Business",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "Service-Disabled Veteran-Owned (SDVOSB) Set-Aside",
                "SDVOSB Sole Source",
                "Women-Owned Small Business (WOSB) Set-Aside",
                "WOSB Sole Source",
                "Economically Disadvantaged WOSB Set-Aside",
                "EDWOSB Sole Source",
                "Veteran-Owned Small Business Set-Aside (VA)",
                "Veteran-Owned Small Business Sole Source (VA)",
                "Local Area Set-Aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian",
                "No set-aside"
              ]
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Only notices from these departments or independent agencies.",
            "items": {
              "type": "string",
              "enum": [
                "100148640",
                "100002228",
                "300000039",
                "100006809",
                "100035122",
                "100000000",
                "100011980",
                "100004222",
                "100011942",
                "100000391",
                "100011955",
                "100012049",
                "100012062",
                "100000136",
                "100006568",
                "100010393",
                "100013311",
                "100081847",
                "100076366",
                "300000034",
                "300000069",
                "100006688",
                "300000005",
                "300000545",
                "300000025",
                "100094131",
                "100076293",
                "100000266",
                "100076449",
                "100011765",
                "300000051",
                "100137672",
                "100007189",
                "100090284",
                "300000018",
                "100039806",
                "300000002",
                "100076256",
                "100012403",
                "100012189"
              ],
              "enumTitles": [
                "Agency for International Development (USAID)",
                "Commodity Futures Trading Commission",
                "Consumer Product Safety Commission",
                "Department of Agriculture",
                "Department of Commerce",
                "Department of Defense",
                "Department of Energy",
                "Department of Health and Human Services",
                "Department of Homeland Security",
                "Department of Housing and Urban Development",
                "Department of Justice",
                "Department of Labor",
                "Department of State",
                "Department of Transportation",
                "Department of Veterans Affairs",
                "Department of the Interior",
                "Department of the Treasury",
                "Environmental Protection Agency",
                "Federal Communications Commission",
                "Federal Deposit Insurance Corporation",
                "Federal Housing Finance Agency",
                "General Services Administration",
                "Government Publishing Office",
                "International Boundary and Water Commission",
                "International Trade Commission",
                "Library of Congress",
                "Millennium Challenge Corporation",
                "NASA",
                "National Archives and Records Administration",
                "National Science Foundation",
                "National Transportation Safety Board",
                "Nuclear Regulatory Commission",
                "Peace Corps",
                "Pension Benefit Guaranty Corporation",
                "Postal Service",
                "Securities and Exchange Commission",
                "Senate",
                "Smithsonian Institution",
                "Social Security Administration",
                "US Agency for Global Media"
              ]
            }
          },
          "agencyIds": {
            "title": "Agency or office IDs",
            "type": "array",
            "description": "SAM.gov organization IDs for a narrower agency or office, for example 300000201 for the Department of the Army. You find the ID in each row's organizationIds field.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance (states)",
            "type": "array",
            "description": "Two-letter state codes, for example VA, TX, DC.",
            "items": {
              "type": "string"
            }
          },
          "includeInactive": {
            "title": "Include inactive and archived notices",
            "type": "boolean",
            "description": "Off: only active notices, the way sam.gov shows them by default. On: also notices that closed or were archived, back to the start of the archive.",
            "default": false
          },
          "fetchDetails": {
            "title": "Get full details",
            "type": "boolean",
            "description": "Full description, contacts, NAICS, PSC, set-aside, place of performance and award details for each notice. Turn off for a faster list with title, agency, dates and a short description.",
            "default": true
          },
          "fetchAttachments": {
            "title": "Get attachment links",
            "type": "boolean",
            "description": "Names and download links of the files and links attached to each notice. Needs 'Get full details'.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most runs. Turn on a proxy only if your runs get blocked.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}