{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Opportunities Feed (Unofficial)",
    "description": "Federal contract opportunities from SAM.gov: keyless daily public extract, or the SAM.gov API with your own key. Filter by date, keyword, NAICS, set-aside, notice type, state and agency. Validated output with change tracking. Not affiliated with GSA or SAM.gov.",
    "version": "0.3",
    "x-build-id": "jvjW8jrthFfEySfDU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/graylabs~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-graylabs-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/graylabs~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-graylabs-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/graylabs~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-graylabs-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": {
          "mode": {
            "title": "Data source",
            "enum": [
              "csv",
              "api"
            ],
            "type": "string",
            "description": "\"csv\" (default) reads SAM.gov's public Contract Opportunities extract, which GSA refreshes once a day and which lists active notices posted up to the previous day. No key needed. \"api\" searches the live SAM.gov Get Opportunities API with your own API key: use it for same-day notices or inactive notices. Personal keys of non-federal users without an entity role may be limited to about 10 requests a day.",
            "default": "csv"
          },
          "apiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Only needed for the \"api\" data source. Your own SAM.gov \"Public API Key\" (SAM.gov > sign in > Account Details). This is a secret field: Apify stores it encrypted and masks it. The Actor sends it only to api.sam.gov and never writes it to logs, results, the key-value store or error messages."
          },
          "lastNDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Get notices posted in the last N days (including today, UTC). Default: 3 for the CSV source, 7 for the API. Ignored when you set a start or end date below."
          },
          "postedFrom": {
            "title": "Posted from (date)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start of the posted-date range (YYYY-MM-DD). Ranges longer than one year are split automatically, because SAM.gov allows at most one year per request."
          },
          "postedTo": {
            "title": "Posted to (date)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "End of the posted-date range (YYYY-MM-DD). Defaults to today."
          },
          "keywords": {
            "title": "Title keywords",
            "maxItems": 20,
            "type": "array",
            "description": "Words to look for in the notice title; a notice matches if its title contains any of them. (API source: with exactly one keyword SAM.gov searches it itself.)",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "maxItems": 10,
            "type": "array",
            "description": "2-6 digit NAICS codes (exact match). API source: SAM.gov takes one code per request, so each extra code uses one more request from your daily quota. CSV source: no extra cost.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "s",
                "a",
                "u",
                "g",
                "i"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "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 (SAM.gov API limit; the CSV source uses the same rule)."
          },
          "state": {
            "title": "Place of performance state",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter state code, e.g. VA."
          },
          "agency": {
            "title": "Agency (department or sub-tier name)",
            "type": "string",
            "description": "Department or sub-tier name, e.g. GENERAL SERVICES ADMINISTRATION. API source: sent to SAM.gov as organizationName. CSV source: matches if the department, sub-tier or office name contains this text."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many opportunities. You pay per opportunity saved.",
            "default": 100
          },
          "maxRequests": {
            "title": "Max SAM.gov requests per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "API source only. Safety cap on calls to SAM.gov in this run, retries and description fetches included. GSA's documentation for SAM.gov public APIs lists 10 requests per 24 hours for personal keys of non-federal users not associated with an entity (1,000 with a role on an entity registration); this isn't confirmed for this API. The default of 8 leaves headroom.",
            "default": 8
          },
          "trackChanges": {
            "title": "Mark new and updated notices",
            "type": "boolean",
            "description": "Remember notices between runs of the same search and label each row new, updated or unchanged.",
            "default": false
          },
          "onlyNewOrUpdated": {
            "title": "Only save new or updated notices",
            "type": "boolean",
            "description": "With scheduled runs, save (and pay for) only notices that are new or changed since the last run of the same search.",
            "default": false
          },
          "skipPastDeadlines": {
            "title": "Skip notices whose response deadline has passed",
            "type": "boolean",
            "description": "On by default: notices whose response deadline is already over at run time are not saved or charged (SAM.gov sometimes posts or updates notices with an old deadline). Notices with no deadline are always kept, and so are award notices, justifications and bundling notices, which record past actions. A deadline without a time zone counts as passed only once it has passed everywhere (UTC-12). Turn off to get every notice.",
            "default": true
          },
          "includeDescriptions": {
            "title": "Include full descriptions",
            "type": "boolean",
            "description": "Off by default. CSV source: the description text comes from the file, at no extra cost. API source: each description is a separate SAM.gov request that counts against your daily quota. Email addresses and phone numbers are removed from the text.",
            "default": false
          },
          "maxDescriptions": {
            "title": "Max descriptions per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "API source only, used with 'Include full descriptions'. Each one costs one SAM.gov request.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}