{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities API & Bid Alerts",
    "description": "Search US federal contract opportunities (RFPs, solicitations, sources sought, awards) from SAM.gov's official public data extract. Filter by NAICS, PSC, set-aside, agency, state and keyword. Daily alerts with only new notices. No SAM.gov account or API key. JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "8zuAduNaAPkLK6gab"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stego-bot~samgov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stego-bot-samgov-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/stego-bot~samgov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-stego-bot-samgov-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/stego-bot~samgov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-stego-bot-samgov-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": "Words or phrases to look for (case-insensitive). Each entry is matched as a phrase. Leave empty to match everything.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword matching",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match notices containing ANY of the keywords, or only notices containing ALL of them.",
            "default": "any"
          },
          "searchIn": {
            "title": "Search keywords in",
            "enum": [
              "titleAndDescription",
              "title"
            ],
            "type": "string",
            "description": "Where to look for keywords.",
            "default": "titleAndDescription"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these phrases.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS codes or prefixes, e.g. 541512 or 5415 (matches every code starting with 5415).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC (product/service) codes",
            "type": "array",
            "description": "Product Service Codes or prefixes, e.g. DA01 or D (all IT services).",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Only notices with one of these set-asides. Leave empty for all, including unrestricted.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BICiv",
                "LAS",
                "ESB",
                "NONE"
              ],
              "enumTitles": [
                "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)",
                "SDVOSB Set-Aside (SDVOSBC)",
                "SDVOSB Sole Source (SDVOSBS)",
                "WOSB Set-Aside (WOSB)",
                "WOSB Sole Source (WOSBSS)",
                "EDWOSB Set-Aside (EDWOSB)",
                "EDWOSB Sole Source (EDWOSBSS)",
                "VA Veteran-Owned Set-Aside (VSA)",
                "VA Veteran-Owned Sole Source (VSS)",
                "Indian Small Business Economic Enterprise (ISBEE)",
                "Indian Economic Enterprise (IEE)",
                "Buy Indian (BICiv)",
                "Local Area Set-Aside (LAS)",
                "Emerging Small Business (ESB)",
                "No set-aside used (NONE)"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Department, sub-tier agency or office names (partial match, e.g. 'Coast Guard', 'Veterans Affairs', 'NAVSEA'), or exact CGAC / FPDS / AAC codes (e.g. 070, 3600, N32253).",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Only these notice types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Intent to Bundle",
                "Sale of Surplus Property",
                "Modification/Amendment/Cancel"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Intent to Bundle Requirements",
                "Sale of Surplus Property",
                "Modification/Amendment/Cancel"
              ]
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state or territory codes for the place of performance, e.g. VA, MD, DC.",
            "items": {
              "type": "string"
            }
          },
          "stateFallbackToOffice": {
            "title": "Use office state when no place of performance",
            "type": "boolean",
            "description": "Many notices leave the place of performance empty. When on, such notices are matched on the contracting office's state instead.",
            "default": true
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 0,
            "maximum": 6000,
            "type": "integer",
            "description": "Only notices posted in the last N days. Used when 'Posted from' is empty. Set 0 to search the whole extract (all currently active notices).",
            "default": 30
          },
          "postedFrom": {
            "title": "Posted from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Earliest posted date (YYYY-MM-DD). Overrides 'Posted within the last N days'."
          },
          "postedTo": {
            "title": "Posted to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Latest posted date (YYYY-MM-DD), inclusive."
          },
          "onlyOpen": {
            "title": "Only notices still open for responses",
            "type": "boolean",
            "description": "Skip notices whose response deadline has passed. A date-only deadline counts as open through the end of that day (US Eastern). Notices without a deadline are kept.",
            "default": false
          },
          "excludeArchived": {
            "title": "Skip notices past their archive date",
            "type": "boolean",
            "description": "The daily extract can still contain notices whose archive date has passed. SAM.gov no longer shows these as active, so they are skipped by default.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Return only notices not returned by a previous run with the same state key. Ideal for daily scheduled alerts. By default the first run only builds a baseline and returns nothing.",
            "default": false
          },
          "includeUpdates": {
            "title": "Include new versions (amendments) of notices already seen",
            "type": "boolean",
            "description": "With 'Only new since last run', also return a solicitation again when a newer version (amendment) is posted. Such records get changeType = 'updated'.",
            "default": true
          },
          "baselineOnFirstRun": {
            "title": "First run: remember current notices without returning them",
            "type": "boolean",
            "description": "With 'Only new since last run', the first run for a state key (or the first run after you change the filters) records every currently matching notice as seen and returns nothing, so you pay only the $0.00005 run-start fee. Later runs return only new notices. Turn off to receive (and pay for) the current backlog on the first run.",
            "default": true
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for the remembered state (letters, digits and - _ . ! ' ( ) ; other characters become '-'). Leave empty to derive it automatically from your filters. Use a different key for each saved search. If you change the filters on an existing key, the next run starts over for the new filters (a fresh baseline when enabled); notices already returned are still skipped."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that keeps seen notice IDs between runs.",
            "default": "samgov-opportunities-state"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of notices to return per run (1-100000; you pay per returned notice). In monitoring mode, matches that do not fit are returned by the next run.",
            "default": 100
          },
          "latestVersionOnly": {
            "title": "Latest version only",
            "type": "boolean",
            "description": "The extract lists every amendment as a separate notice. Keep only the newest version of each solicitation (recommended).",
            "default": true
          },
          "includeContacts": {
            "title": "Include official points of contact",
            "type": "boolean",
            "description": "Include the government points of contact (name, email, phone) exactly as published on the notice. This is personal data of government employees: use it only to respond to the opportunity, not for marketing or bulk outreach.",
            "default": false
          },
          "descriptionMaxLength": {
            "title": "Description length",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum characters of the notice description to include. 0 = omit the description.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}