{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper — Federal RFPs & Awards",
    "description": "Search US federal contract opportunities on SAM.gov by keyword, NAICS, PSC, set-aside, agency or response deadline. Get notice details, agency hierarchy, contacts, deadlines and public attachment links, or full details for notices you name. Daily new-only feed. JSON, CSV or Excel export.",
    "version": "0.1",
    "x-build-id": "A4dHQYoHRTrE1g07j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~sam-gov-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-sam-gov-opportunities-scraper",
        "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/automatic~sam-gov-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-sam-gov-opportunities-scraper",
        "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/automatic~sam-gov-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-sam-gov-opportunities-scraper",
        "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": "Mode",
            "enum": [
              "search",
              "details"
            ],
            "type": "string",
            "description": "Search opportunities or retrieve complete notices by ID. Search rows exclude attachment lists. Example: \"search\". If empty, uses \"search\".",
            "default": "search"
          },
          "noticeIds": {
            "title": "Notice ids",
            "type": "array",
            "description": "Details mode only: 32-character notice IDs or https://sam.gov/opp/ID/view URLs; at most 100. Example: [\"ed4059185bd343f288621194377f72c0\"]. A cleared value is treated as omitted and uses the Actor's built-in default.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Search terms. Website mode searches notice text; the optional API key route searches titles. Example: \"maintenance\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "naicsCodes": {
            "title": "Naics codes",
            "type": "array",
            "description": "Six-digit NAICS codes, OR within this field. At most one value with apiKey. Example: [\"541512\"]. A cleared value is treated as omitted and uses the Actor's built-in default.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Psc codes",
            "type": "array",
            "description": "Two to four character uppercase PSC codes, OR within this field. At most one value with apiKey. Example: [\"D302\"]. A cleared value is treated as omitted and uses the Actor's built-in default.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Notice stages, OR within this field: solicitation, presolicitation, sourcesSought, award, specialNotice, combinedSynopsisSolicitation, justification, saleOfSurplusProperty, intentToBundle. At most one value with apiKey. Example: [\"solicitation\"]. A cleared value is treated as omitted and uses the Actor's built-in default.",
            "items": {
              "type": "string"
            }
          },
          "setAside": {
            "title": "Set aside",
            "type": "string",
            "description": "SAM set-aside code, for example SBA. Search only. Example: \"SBA\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Numeric SAM organization ID, for example 100000000 for Department of Defense. Website search only; incompatible with apiKey. Example: \"100000000\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Publication date: inclusive earliest date as YYYY-MM-DD. Search only; website date boundaries use UTC. Example: \"2026-11-01\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Publication date: inclusive latest date as YYYY-MM-DD. Search only; website date boundaries use UTC. Example: \"2026-11-01\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Response deadline date: inclusive earliest date as YYYY-MM-DD. Search only; website date boundaries use UTC. Example: \"2026-11-01\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Response deadline date: inclusive latest date as YYYY-MM-DD. Search only; website date boundaries use UTC. Example: \"2026-11-01\". A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "activeOnly": {
            "title": "Active only",
            "type": "boolean",
            "description": "Search active notices only. False includes active and inactive notices. Status, when set, overrides this switch. Details mode returns requested notices regardless of status. Example: true. Omit this field to use true. A cleared form value is treated as omitted.",
            "default": true
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Which notices to search: active (open notices, the default), inactive (the public archive: closed, awarded, cancelled and expired notices) or all. Leave empty to follow Active only. Example: \"inactive\". A cleared value is treated as omitted."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum rows to save, 1–100000. Search mode saves 10 when this is left empty. In details mode it defaults to the number of notice IDs you supplied. A plain search cannot page beyond 10000 source matches; turn on Bulk download to read a larger archive in slices. Example: 10. Omitting this field uses 10 search results, or the number of supplied notice IDs in details mode. A cleared form value is treated as omitted."
          },
          "apiKey": {
            "title": "Api key",
            "type": "string",
            "description": "Optional personal SAM.gov public API key for official API search. Leave blank for keyless website search. Requires a posted window of at most 365 days, default last 30 days; supports one code per code filter and no agency ID filter. Details mode uses public website data and does not accept this field. A cleared value is treated as omitted and uses the Actor's built-in default."
          },
          "bulkDownload": {
            "title": "Bulk download of the posted-date window",
            "type": "boolean",
            "description": "Read every notice of the window Posted from..Posted to (empty means the whole archive, back to 1999) in publish-time slices with no 10,000-result limit, several pages at a time, oldest first. Each run saves up to Max results rows and writes OUTPUT.bulk.nextInput; run that input next to continue with no gap and no duplicates. Uses Status, Keywords, NAICS, PSC, Notice types, Set aside, Agency and the deadline filters; not the API key, details mode or the daily feed. Example: false.",
            "default": false
          },
          "bulkCursor": {
            "title": "Bulk download continuation (from OUTPUT)",
            "type": "object",
            "description": "Filled in for you in OUTPUT.bulk.nextInput: the publish time where the previous bulk run stopped. Leave empty to start a new window."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or changed since the last run",
            "type": "boolean",
            "description": "Return only opportunities this search has not delivered before, or whose title, deadline, status, value or documents changed since the last run. Keep the same input and schedule to get a clean daily feed. Example: false. Omit this field to use false.",
            "default": false
          },
          "feedName": {
            "title": "Feed name",
            "type": "string",
            "description": "Optional name for the saved feed state. Leave empty to derive it from the input, so different searches keep separate histories. Set a new name to start the feed over. Example: \"daily-watch\". Leave empty to derive the saved history name from this search.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}