{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contract Opportunities, USD 1/1,000",
    "description": "Federal contract opportunities from SAM.gov's own public daily file: solicitations, sources sought, awards. Filter by NAICS, PSC, set-aside, agency, state, deadline, award; get only new notices since your last run. No API key, no site scraping, contacts off by default. USD 1.00 per 1,000.",
    "version": "1.0",
    "x-build-id": "SL01KLBSS3AXehViI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/usefulapi~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-usefulapi-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/usefulapi~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-usefulapi-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/usefulapi~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-usefulapi-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One search per line; a notice matches if any line matches. Words on one line must all appear (cyber security = both words); \"exact phrase\" in quotes. Words match from their start: cyber matches cybersecurity. Searched in the title and the description (see below). Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2 to 6 digits; a shorter code matches every code that starts with it (5415 = all computer systems design codes). Leave empty for all industries.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Keep notices with any of these set-aside types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "ANY_SMALL_BUSINESS",
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BICiv",
                "LAS",
                "ESB",
                "NONE"
              ],
              "enumTitles": [
                "Any small business set-aside (all codes below except NONE)",
                "Total Small Business (SBA)",
                "Partial Small Business (SBP)",
                "8(a) set-aside (8A)",
                "8(a) sole source (8AN)",
                "HUBZone set-aside (HZC)",
                "HUBZone sole source (HZS)",
                "Service-disabled veteran-owned (SDVOSBC)",
                "SDVOSB sole source (SDVOSBS)",
                "Women-owned small business (WOSB)",
                "WOSB sole source (WOSBSS)",
                "Economically disadvantaged WOSB (EDWOSB)",
                "EDWOSB sole source (EDWOSBSS)",
                "Veteran-owned, VA only (VSA)",
                "Veteran-owned sole source, VA only (VSS)",
                "Indian small business economic enterprise (ISBEE)",
                "Indian economic enterprise (IEE)",
                "Buy Indian, IHS (BICiv)",
                "Local area set-aside (LAS)",
                "Emerging small business (ESB)",
                "No set-aside (NONE or blank)"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. Award notices carry the awardee, award amount and date.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined",
                "presolicitation",
                "sources_sought",
                "special_notice",
                "award",
                "justification",
                "modification",
                "surplus",
                "bundle"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined synopsis/solicitation",
                "Presolicitation",
                "Sources sought",
                "Special notice",
                "Award notice",
                "Justification (J&A)",
                "Modification/amendment/cancel",
                "Sale of surplus property",
                "Consolidate/bundle"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted (or last updated) in the last N days; 1 = yesterday and today (SAM.gov's file is a day behind, so today alone would be empty). Fast: the file is newest first, so the run stops reading once it reaches older notices. Empty = any date."
          },
          "openOnly": {
            "title": "Open notices only",
            "type": "boolean",
            "description": "Drop notices whose response deadline has passed. Notices without a deadline (most awards, many special notices) are kept.",
            "default": true
          },
          "deadlineWithinDays": {
            "title": "Deadline within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices with a response deadline from today to N days ahead (notices without a deadline are dropped)."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many notices (newest first). Each saved notice is one billed result.",
            "default": 1000
          },
          "pscCodes": {
            "title": "PSC codes (product and service codes)",
            "type": "array",
            "description": "1 to 4 letters or digits; a shorter code matches every code that starts with it (D3 = all IT and telecom services, R4 = professional support).",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "One per line: a word or words from the department, agency or office name, matched at word starts (army, veterans affairs, NASA, naval sea), or an exact CGAC, FPDS or AAC code (097, 2100, W912QR). Short abbreviations only match where SAM.gov writes them (it writes VETERANS AFFAIRS, not VA).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter codes (VA, TX, DC). Note: about three quarters of notices give no place of performance; those are dropped by this filter. Use the office state below to widen.",
            "items": {
              "type": "string"
            }
          },
          "officeStates": {
            "title": "Contracting office states",
            "type": "array",
            "description": "2-letter codes of the buying office's address.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices that match any of these lines (same rules as Keywords).",
            "items": {
              "type": "string"
            }
          },
          "searchDescription": {
            "title": "Search keywords in the description too",
            "type": "boolean",
            "description": "Off = keywords are matched in the title only (fewer, more precise matches).",
            "default": true
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "YYYY-MM-DD. Combined with Posted in the last N days, the later date wins."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "YYYY-MM-DD (the deadline's own date as SAM.gov states it)."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices with an award amount at least this large (award notices). Notices without a numeric amount are dropped."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices with an award amount up to this."
          },
          "awardees": {
            "title": "Awardee names",
            "type": "array",
            "description": "Part of the winning company's name (award notices), one per line.",
            "items": {
              "type": "string"
            }
          },
          "noticeIds": {
            "title": "Notice IDs",
            "type": "array",
            "description": "Look up exact notices: the 32-character ID in a sam.gov/opp/<ID>/view link.",
            "items": {
              "type": "string"
            }
          },
          "solicitationNumbers": {
            "title": "Solicitation numbers",
            "type": "array",
            "description": "Exact solicitation numbers (every notice of a solicitation: presolicitation, solicitation, amendments, award).",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new or changed since the last run",
            "type": "boolean",
            "description": "Monitor mode for schedules: each notice is delivered once, and again only when it changes (deadline moved, award added, type changed). Unchanged notices are skipped and not billed. The memory sits in your own Apify account (key-value store sam-gov-opportunities-monitor).",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A name per saved search (for example it-small-business-va). Runs with the same name share one memory. Empty = a name made from your filters (changing a filter then starts a new memory)."
          },
          "includeChanged": {
            "title": "Include changed notices",
            "type": "boolean",
            "description": "Also deliver notices seen before whose deadline, type, set-aside, award or text changed (changeType = changed). Off = new notices only.",
            "default": true
          },
          "firstRun": {
            "title": "First run",
            "enum": [
              "deliver",
              "baseline"
            ],
            "type": "string",
            "description": "What a monitor's first run does.",
            "default": "deliver"
          },
          "descriptionMaxChars": {
            "title": "Description length",
            "minimum": 0,
            "maximum": 32003,
            "type": "integer",
            "description": "Characters of each notice's description to keep (cut at a word, with ...). 0 = no description; 32003 = the full text as SAM.gov stores it (SAM.gov itself cuts at 32,003 characters). Same price.",
            "default": 1000
          },
          "includeContacts": {
            "title": "Include contracting officer contacts",
            "type": "boolean",
            "description": "Off (default): the contracting officer contact columns are left out, and email addresses and phone numbers are masked in descriptions, titles, street lines and awardee names. Names written inside a description's text (for example \"POC: Jane Doe\") are not removed. On: adds the primary and secondary contact's title, name, email, phone and fax as SAM.gov publishes them, and nothing is masked. Use contacts only to respond to the notice.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}