{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities (No API Key Needed)",
    "description": "Search open US federal contract opportunities from the official public SAM.gov extract. No SAM.gov account or API key. Filter by keyword, NAICS, set-aside, notice type, agency, state and dates. Clean flat rows with contacts and deadlines. $0.002 per opportunity.",
    "version": "1.0",
    "x-build-id": "xgyS4ZlPZaXh5kiM9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gigsmith~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gigsmith-sam-gov-contract-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/gigsmith~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-gigsmith-sam-gov-contract-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/gigsmith~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-gigsmith-sam-gov-contract-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",
        "required": [
          "samApiKey"
        ],
        "properties": {
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your own public API key: sign in at sam.gov, open Account Details and request an API key. Stored encrypted by Apify; never written to the dataset or log. SAM.gov limits how many requests a key can make per day."
          },
          "keywords": {
            "title": "Title keywords",
            "type": "array",
            "description": "Each keyword runs one SAM.gov title search (e.g. cybersecurity, janitorial). Results are merged and de-duplicated. Leave empty for all titles.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Each code runs one search (e.g. 541511, 541512). Combined with keywords, every keyword x NAICS pair is one API call.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. Each selected type is a separate API call.",
            "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 Requirements (DoD-Funded)"
              ]
            }
          },
          "setAside": {
            "title": "Set-aside",
            "enum": [
              "SBA",
              "SBP",
              "8A",
              "8AN",
              "HZC",
              "HZS",
              "SDVOSBC",
              "SDVOSBS",
              "WOSB",
              "WOSBSS",
              "EDWOSB",
              "EDWOSBSS",
              "LAS",
              "IEE",
              "ISBEE",
              "BICiv",
              "VSA",
              "VSS"
            ],
            "type": "string",
            "description": "Only one set-aside per run (an API limit)."
          },
          "agency": {
            "title": "Agency or office name",
            "type": "string",
            "description": "Department, sub-tier or office name, e.g. \"Department of Veterans Affairs\" or \"GENERAL SERVICES ADMINISTRATION\"."
          },
          "organizationCode": {
            "title": "Organization code",
            "type": "string",
            "description": "Agency code, as in the agencyPathCode output field."
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "Two-letter state code, e.g. VA."
          },
          "zip": {
            "title": "Place of performance ZIP",
            "type": "string",
            "description": "Five-digit ZIP code of the place of performance."
          },
          "classificationCode": {
            "title": "Product/service code (PSC)",
            "type": "string",
            "description": "e.g. D302 or R."
          },
          "solicitationNumber": {
            "title": "Solicitation number",
            "type": "string",
            "description": "Exact solicitation number, e.g. W15QKN-26-R-0001."
          },
          "noticeId": {
            "title": "Notice ID",
            "type": "string",
            "description": "Exact SAM.gov notice ID."
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used when \"Posted from\" is empty. Ideal for daily or weekly scheduled runs.",
            "default": 7
          },
          "postedFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. The window from \"Posted from\" to \"Posted to\" can be at most 1 year."
          },
          "postedTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional, defaults to today (UTC)."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Optional: only opportunities whose response deadline is in this window."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Optional end of the response deadline window (at most 1 year after the start)."
          },
          "activeOnly": {
            "title": "Active opportunities only",
            "type": "boolean",
            "description": "Drop archived notices.",
            "default": false
          },
          "mustContain": {
            "title": "Title must also contain (optional)",
            "type": "array",
            "description": "Extra local filter: keep a row only if its title contains one of these words. Free (no API calls).",
            "items": {
              "type": "string"
            }
          },
          "fetchDescriptions": {
            "title": "Fetch full descriptions",
            "type": "boolean",
            "description": "Downloads each notice's description text. Uses one extra API call per opportunity from your key's daily quota.",
            "default": false
          },
          "includeRaw": {
            "title": "Include the raw SAM.gov record",
            "type": "boolean",
            "description": "Adds the original API record under `raw` (links without your key).",
            "default": false
          },
          "maxItems": {
            "title": "Max opportunities",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows.",
            "default": 500
          },
          "maxApiCalls": {
            "title": "Max API calls",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Protects your key's daily quota. Each search page (up to 1,000 rows) and each description is one call. Personal keys without a SAM.gov role get about 10 calls a day; keys with a role get about 1,000.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}