{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contract Opportunities",
    "description": "Scrape SAM.gov federal contract opportunities: solicitations, sources sought, RFIs and awards with NAICS, PSC, set-aside, deadline, agency, place of performance and contracting officer contacts. Filter by keyword, NAICS, state, date. No API key. $3 per 1,000.",
    "version": "1.0",
    "x-build-id": "o8JJzd5w7OgPKHaeh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_factory_nerd~sam-gov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_factory_nerd-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/data_factory_nerd~sam-gov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-data_factory_nerd-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/data_factory_nerd~sam-gov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-data_factory_nerd-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",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, e.g. 'cybersecurity', 'janitorial', 'drone'. Each entry is a separate search (results are de-duplicated). Leave empty to list all notices matching the other filters.",
            "items": {
              "type": "string"
            }
          },
          "exactPhrase": {
            "title": "Exact phrase",
            "type": "boolean",
            "description": "Match each keyword entry as an exact phrase instead of all words.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "'Newest' is best for monitoring; 'relevance' is best for one-off research on a topic.",
            "default": "newest"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Filter by NAICS code, e.g. 541512 (computer systems design), 236220 (commercial construction), 561720 (janitorial). Each code is searched separately.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product/service codes)",
            "type": "array",
            "description": "Filter by Product Service Code, e.g. S201 (custodial/janitorial), D399 (IT services), R425 (engineering/technical). Matches any listed code.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Filter by agency: official name as in SAM.gov's federal hierarchy (e.g. 'FOREST SERVICE', 'VETERANS AFFAIRS, DEPARTMENT OF', 'DEPT OF THE NAVY') or a numeric org ID. Unrecognised names are reported in the log and skipped.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. Bidders usually want Solicitation, Combined Synopsis/Solicitation, Presolicitation and Sources Sought.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "p",
                "k",
                "r",
                "s",
                "a",
                "u",
                "i",
                "g"
              ],
              "enumTitles": [
                "Solicitation",
                "Presolicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Intent to Bundle",
                "Sale of Surplus Property"
              ]
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Small-business set-aside programs. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "IEE",
                "ISBEE",
                "BICiv",
                "LAS"
              ],
              "enumTitles": [
                "Total Small Business",
                "Partial Small Business",
                "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",
                "Veteran-Owned (VA)",
                "Veteran-Owned Sole Source (VA)",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian",
                "Local Area"
              ]
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes, e.g. TX, VA. Requires notice details (fetched automatically).",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted in the last N days. Great for daily or weekly monitoring runs."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Skip archived/inactive notices.",
            "default": true
          },
          "openForResponseOnly": {
            "title": "Still open for responses",
            "type": "boolean",
            "description": "Drop notices whose response deadline has already passed.",
            "default": false
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Adds NAICS, PSC, set-aside, place of performance, full description and official government points of contact (one extra request per notice).",
            "default": true
          },
          "includeAttachments": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "Adds the notice's public attachments (solicitation PDFs, amendments, Q&A) with direct download links. One extra request per notice.",
            "default": false
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many notices (controls cost).",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max notices per keyword/NAICS search",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap per keyword (and per NAICS code) so one broad term doesn't use the whole budget."
          },
          "onlyNew": {
            "title": "Only new notices since last run (monitor mode)",
            "type": "boolean",
            "description": "Return only notices not returned by a previous run of this same search. Seen notice IDs are stored in a named key-value store in your account. The first run returns everything and remembers it. Combine with Apify Schedules for a daily new-bids alert.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Optional name for this monitor's memory. By default it is derived from your search filters, so changing the search starts a fresh history."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}