{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities, No API Key Needed",
    "description": "Search US federal contract opportunities by keyword, NAICS, set-aside, notice type, state, agency and date. Works with no key (daily public SAM.gov file) or add your own free SAM.gov API key for the live API. Flat rows with deadlines, contacts, links. Not affiliated with GSA or SAM.gov.",
    "version": "0.1",
    "x-build-id": "f3gj4r9jDqhqTBWkz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datawharf-tools~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datawharf-tools-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/datawharf-tools~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-datawharf-tools-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/datawharf-tools~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-datawharf-tools-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": {
          "source": {
            "title": "Data source",
            "enum": [
              "auto",
              "api",
              "bulk"
            ],
            "type": "string",
            "description": "auto (default): live API if you enter an API key, otherwise the keyless daily file. api: always the live API (key required, freshest, includes UEI and resource links). bulk: always the keyless daily file, even if a key is entered.",
            "default": "auto"
          },
          "apiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Optional. Leave empty to use the keyless daily file. For the live API: sign in at SAM.gov, open Account Details, request a Public API Key (shown only while you stay on that page). Your OWN key only; do not share it. Stored as a secret and never written to the dataset or logs."
          },
          "keywords": {
            "title": "Title keywords",
            "type": "array",
            "description": "Words searched in the notice title. Several keywords match any of them. In API mode each keyword is a separate request. Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Start of the posted-date range, YYYY-MM-DD. Default: 30 days before 'Posted to'. API mode splits ranges over 1 year automatically; the daily file holds active notices only, so old posted dates may return nothing."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "End of the posted-date range, YYYY-MM-DD. Default: today (UTC)."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2 to 6 digit NAICS codes (a shorter code matches all codes starting with it). Several codes match any of them.",
            "items": {
              "type": "string"
            }
          },
          "setAside": {
            "title": "Set-aside type",
            "enum": [
              "SBA",
              "SBP",
              "8A",
              "8AN",
              "HZC",
              "HZS",
              "SDVOSBC",
              "SDVOSBS",
              "WOSB",
              "WOSBSS",
              "EDWOSB",
              "EDWOSBSS",
              "LAS",
              "IEE",
              "ISBEE",
              "BICiv",
              "VSA",
              "VSS"
            ],
            "type": "string",
            "description": "Only one value per run. SBA = Total Small Business, SBP = Partial Small Business, 8A / 8AN = 8(a), HZC / HZS = HUBZone, SDVOSBC / SDVOSBS = Service-Disabled Veteran-Owned, WOSB / WOSBSS = Women-Owned, EDWOSB / EDWOSBSS = Economically Disadvantaged WOSB, VSA / VSS = Veteran-Owned."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Notice type codes: o = Solicitation, k = Combined Synopsis/Solicitation, p = Presolicitation, r = Sources Sought, s = Special Notice, a = Award Notice, u = Justification, g = Sale of Surplus Property, i = Intent to Bundle. Empty = all types.",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "2-letter US state code, e.g. VA. Only notices whose place-of-performance state equals it are returned (checked by this Actor in both sources)."
          },
          "agency": {
            "title": "Agency name contains",
            "type": "string",
            "description": "Text to find in the agency, sub-agency or office name, e.g. ARMY, NAVY, VETERANS. Daily-file mode: case-insensitive substring match (tested). API mode: passed to SAM.gov's organizationName search, whose exact matching is not documented, so a short word may return nothing; if so use the keyless daily file."
          },
          "includeDescription": {
            "title": "Fetch full description text",
            "type": "boolean",
            "description": "Daily-file mode: adds the notice text at no extra cost. API mode: costs one extra API request per notice against your SAM.gov daily quota, so raise 'Max API calls' first.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of notices to return. You are charged per item returned.",
            "default": 100
          },
          "maxApiCalls": {
            "title": "Max API calls",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "API mode only. Safety limit on requests to SAM.gov in this run (each returns up to 1000 notices). Default 10 matches the small daily quota SAM.gov documents for keys without a role.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}