{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Opportunities Scraper",
    "description": "Use this when you need US federal contract opportunities from SAM.gov: solicitations, sources sought and awards by keyword, NAICS, set-aside, agency, state and date, with deadline, award value and link. Public daily extract, no API key. Pay per result.",
    "version": "0.1",
    "x-build-id": "h7hwdWdi464SUdtjM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hexadatalabs~sam-gov-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hexadatalabs-sam-gov-opportunities-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/hexadatalabs~sam-gov-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hexadatalabs-sam-gov-opportunities-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/hexadatalabs~sam-gov-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hexadatalabs-sam-gov-opportunities-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Case-insensitive phrases matched in the title, solicitation number and description, one per line, e.g. \"cybersecurity\", \"janitorial services\", \"drone\". Leave empty to filter only by NAICS / set-aside / agency / state / date.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice type",
            "enum": [
              "all",
              "solicitation",
              "presolicitation",
              "sources-sought",
              "award",
              "special-notice",
              "justification",
              "intent-to-bundle"
            ],
            "type": "string",
            "description": "Use \"solicitation\" for notices you can bid on now (Solicitation + Combined Synopsis/Solicitation), \"sources-sought\" and \"presolicitation\" for early market research, \"award\" for award notices with awardee and amount.",
            "default": "all"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "North American Industry Classification codes, 2 to 6 digits, prefix match: \"541512\" = computer systems design, \"5415\" = all computer services, \"23\" = construction. Find codes at https://www.census.gov/naics/",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Only notices with these small-business set-asides: SBA (total small business), SBP (partial), 8A, 8AN, HZC, HZS (HUBZone), SDVOSBC, SDVOSBS (service-disabled veteran), WOSB, WOSBSS, EDWOSB, EDWOSBSS (women-owned), VSA, VSS (veteran), LAS, IEE, ISBEE, BICIV, NONE. Empty = any.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Substrings matched in the department, sub-tier or office name, e.g. \"DEPT OF DEFENSE\", \"VETERANS AFFAIRS\", \"NASA\", \"HOMELAND SECURITY\".",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States (place of performance)",
            "type": "array",
            "description": "Two-letter US state or territory codes of the place of performance (the contracting office state is used when the notice has none), e.g. TX, VA, CA, DC.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Posted from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices posted on or after this date (YYYY-MM-DD). With no other filter, the last 7 days are used. A date also makes runs faster: the download stops once older notices are reached."
          },
          "dateTo": {
            "title": "Posted until",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices posted on or before this date (YYYY-MM-DD)."
          },
          "onlyActive": {
            "title": "Only active notices",
            "type": "boolean",
            "description": "Keep only notices SAM.gov marks as active (not archived). Turn off to include inactive and archived notices present in the extract.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Use this on a schedule: the Actor remembers when it last ran (shared store \"hexadata-sam-gov-opportunities\" in your account) and returns only notices posted since then that it has not delivered before. The first run saves everything that matches.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop after this many opportunities. Newest notices come first.",
            "default": 100
          },
          "includeContacts": {
            "title": "Include contracting-officer contacts",
            "type": "boolean",
            "description": "Add the primary and secondary point of contact published in the notice (name, title, e-mail, phone). Off by default because these are named individuals; turn on only if you have a lawful basis to use them (they are published by SAM.gov for vendors to ask questions about the notice).",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw extract row",
            "type": "boolean",
            "description": "Attach the original 47-column row of the SAM.gov extract under \"raw\" (includes contact columns). For debugging or custom parsing.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The SAM.gov public extract does not need a proxy; leave it off.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}