{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities API (No API Key)",
    "description": "US federal contract opportunities from SAM.gov's official daily public extract, with no API key and no 10-requests/day cap. Filter by keyword, NAICS, PSC, set-aside, state, agency and notice type. Optional live API mode with your own key. $1.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "uhIL0dO1NwHZqJl6R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlwren~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlwren-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/crawlwren~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-crawlwren-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/crawlwren~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-crawlwren-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": "Keep opportunities whose title, description or solicitation number contains ANY of these (case-insensitive). Empty = all. (Descriptions are only available in keyless mode; API mode matches the title.)",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which notice types to include.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "s",
                "a",
                "u",
                "i",
                "g"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Intent to Bundle",
                "Sale of Surplus Property"
              ]
            },
            "default": [
              "o",
              "k",
              "p",
              "r"
            ]
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Use 1 with a daily schedule for a 'new opportunities' feed.",
            "default": 7
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Prefix match, e.g. 5415 (computer systems design) or 541512.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC (product/service) codes",
            "type": "array",
            "description": "Prefix match, e.g. D3 or DA01.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "e.g. SBA (small business), 8A, HZC (HUBZone), SDVOSBC, WOSB, EDWOSB, VSA. Empty = any, including none.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance (US state codes)",
            "type": "array",
            "description": "Two-letter codes, e.g. VA, MD, DC, CA.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Text match against department / sub-tier / office, e.g. 'VETERANS AFFAIRS', 'NAVY', 'GSA'.",
            "items": {
              "type": "string"
            }
          },
          "onlyOpenDeadlines": {
            "title": "Only opportunities whose response deadline has not passed",
            "type": "boolean",
            "description": "Drops notices whose response deadline is already in the past. Notices without a deadline are kept.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Newest first. 0 = no limit. You are only charged per opportunity delivered.",
            "default": 500
          },
          "apiKey": {
            "title": "SAM.gov API key (optional)",
            "type": "string",
            "description": "Optional. Your own free public API key from sam.gov > Profile > Account Details. Without a key the actor uses SAM.gov's official daily public extract (refreshed once a day). With a key it queries the live API (note SAM.gov limits keys of accounts without a role to 10 requests/day)."
          },
          "mode": {
            "title": "Data source mode",
            "enum": [
              "auto",
              "bulk",
              "api"
            ],
            "type": "string",
            "description": "auto = live API if a key is given, otherwise the daily extract.",
            "default": "auto"
          },
          "maxApiRequests": {
            "title": "Max API requests per run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "API mode only. Each request returns up to 1,000 notices and uses 1 of your daily SAM.gov quota.",
            "default": 5
          },
          "fallbackToBulk": {
            "title": "Fall back to the daily extract if the API fails",
            "type": "boolean",
            "description": "E.g. when your daily API quota is used up.",
            "default": true
          },
          "includeDescription": {
            "title": "Include full description text",
            "type": "boolean",
            "description": "Daily-extract mode only.",
            "default": true
          },
          "onlyActive": {
            "title": "Only active notices",
            "type": "boolean",
            "description": "SAM.gov marks archived notices as inactive.",
            "default": true
          },
          "includeContacts": {
            "title": "Include point-of-contact details",
            "type": "boolean",
            "description": "Off by default. When on, adds the contracting contacts published in each notice (names, emails, phones). Only enable if you have a lawful basis to process this personal data, and do not use it for bulk unsolicited marketing.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}