{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities & RFPs (Official API)",
    "description": "Search US federal contract opportunities, RFPs, sources sought and award notices from the official SAM.gov API. Filter by keyword, NAICS, PSC, set-aside, notice type, state, agency and dates. Incremental new-only mode. No contracting-officer contacts. Bring your own free SAM.gov key.",
    "version": "1.0",
    "x-build-id": "DGruVnuisekux4ZRg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/immemorial_damask~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-immemorial_damask-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/immemorial_damask~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-immemorial_damask-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/immemorial_damask~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-immemorial_damask-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": [
          "samGovApiKey"
        ],
        "properties": {
          "samGovApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Required. Your free 'Public API Key' from SAM.gov: sign in at https://sam.gov, open Account Details (https://sam.gov/workspace/profile/account-details), click the eye icon next to Public API Key and enter the one-time code. Keys from api.data.gov do NOT work. The key is stored encrypted and never logged."
          },
          "keywords": {
            "title": "Keywords (title search)",
            "type": "string",
            "description": "Words that must appear in the notice title, e.g. 'cybersecurity' or 'janitorial'."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. Default: open solicitations, combined synopsis/solicitations, presolicitations and sources sought.",
            "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 (DoD)",
                "Sale of Surplus Property"
              ]
            },
            "default": [
              "o",
              "k",
              "p",
              "r"
            ]
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "One 6-digit code is filtered by SAM.gov. Several codes or 2-5 digit prefixes (e.g. 5415) are matched on our side, which may need more API calls.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes",
            "type": "array",
            "description": "Product Service Codes, e.g. D399 or R425. Several codes or prefixes (e.g. D3) are matched on our side.",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Small-business set-asides. One value is filtered by SAM.gov; several are matched on our side.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "VSA",
                "VSS"
              ],
              "enumTitles": [
                "Total Small Business (SBA)",
                "Partial Small Business (SBP)",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "SDVOSB Set-Aside",
                "SDVOSB Sole Source",
                "WOSB Set-Aside",
                "WOSB Sole Source",
                "EDWOSB Set-Aside",
                "EDWOSB Sole Source",
                "Local Area Set-Aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian (IHS)",
                "Veteran-Owned Small Business (VA)",
                "Veteran-Owned Sole Source (VA)"
              ]
            }
          },
          "states": {
            "title": "Place of performance (state codes)",
            "type": "array",
            "description": "Two-letter US state codes, e.g. VA, TX. One state is filtered by SAM.gov; several are matched on our side.",
            "items": {
              "type": "string"
            }
          },
          "organizationName": {
            "title": "Agency / organization name",
            "type": "string",
            "description": "Department or sub-tier name, e.g. 'DEPT OF THE NAVY' or 'VETERANS AFFAIRS'."
          },
          "organizationCode": {
            "title": "Agency / organization code",
            "type": "string",
            "description": "Federal Hierarchy organization code (as in agencyPathCodes)."
          },
          "solicitationNumber": {
            "title": "Solicitation number",
            "type": "string",
            "description": "Find notices for one solicitation number."
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used when 'Posted from' is empty. 1-365.",
            "default": 7
          },
          "postedFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional exact start date. Max 1 year between from and to (SAM.gov rule)."
          },
          "postedTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional end date. Defaults to today (US Eastern)."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to (YYYY-MM-DD)",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Skip archived notices.",
            "default": true
          },
          "includeResourceLinks": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "Add direct SAM.gov download links for notice attachments.",
            "default": true
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of notices to save (and charge).",
            "default": 100
          },
          "maxApiCalls": {
            "title": "Max SAM.gov API calls",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Protects your SAM.gov daily quota (personal keys without a role: 10 requests/day). Each call returns up to 1,000 notices.",
            "default": 3
          },
          "incrementalStateStoreName": {
            "title": "Incremental mode: state store name",
            "type": "string",
            "description": "Set a name (e.g. 'sam-cyber-va') to only get notices you have not received before. Seen notice IDs are kept in a named key-value store in your account. Leave empty to get everything every run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}