{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper - Federal Bids",
    "description": "SAM.gov API alternative: federal contract opportunities by NAICS, PSC, set-aside, agency, state and deadline, with contacts and bid documents. No API key, no 10 requests/day limit, ~$3 per 1,000. Monitor mode returns only new or changed notices.",
    "version": "0.2",
    "x-build-id": "QBAjJJdCis5R07lCZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleandatalabs~samgov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleandatalabs-samgov-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/cleandatalabs~samgov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-cleandatalabs-samgov-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/cleandatalabs~samgov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-cleandatalabs-samgov-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": "string",
            "description": "Free-text search, same as the SAM.gov search box (e.g. cybersecurity, janitorial, \"fire alarm\"). Leave empty to list everything that matches the other filters."
          },
          "keywordMatch": {
            "title": "Keyword matching",
            "enum": [
              "sam",
              "all"
            ],
            "type": "string",
            "description": "SAM.gov's own keyword search is broad: a multi-word query matches notices containing any of the words. Strict keeps only notices whose title, description or solicitation number contains every word (words also match as prefixes, so cyber matches cybersecurity) and every \"quoted phrase\". Recommended for monitors.",
            "default": "sam"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS codes, exact or prefix: 541512 matches only that code, 5415 (or 5415*) matches every 5415xx code, 23 matches all construction.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product/service)",
            "type": "array",
            "description": "Product Service Codes, exact or prefix: DA01 (IT application development), R4 (all R4xx professional services), Z2 (construction of structures).",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Department or agency names, acronyms or SAM.gov organization IDs, e.g. Department of Veterans Affairs, DHS, Air Force, GSA, 100006568. Names that are not a department or agency (e.g. NAVFAC, Army Corps of Engineers) are matched against the full office hierarchy.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types.",
            "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",
                "Intent to Bundle",
                "Sale of Surplus Property"
              ]
            }
          },
          "setAsides": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Keep only these set-asides: SBA (Total Small Business), SBP (Partial SB), 8A, 8AN (8(a) sole source), HZC (HUBZone), SDVOSBC (SDVOSB), WOSB, EDWOSB, VSA (VA veteran-owned), ISBEE, IEE, LAS, or NONE. Friendly names such as SDVOSB, HUBZone or 8(a) also work.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter place-of-performance state codes, e.g. CO, TX.",
            "items": {
              "type": "string"
            }
          },
          "updatedWithinDays": {
            "title": "Lookback: updated within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices posted or modified in the last N days. 0 = no limit. In monitor mode this is the first run's lookback; later runs check everything changed since the previous run.",
            "default": 7
          },
          "deadlineWithinDays": {
            "title": "Response due within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices whose response deadline is between now and N days from now, e.g. 14. Notices without a deadline are skipped."
          },
          "deadlineFrom": {
            "title": "Response due on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest response deadline, as YYYY-MM-DD (UTC)."
          },
          "deadlineTo": {
            "title": "Response due on or before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest response deadline, as YYYY-MM-DD (UTC, end of day)."
          },
          "openForResponseOnly": {
            "title": "Open for response only",
            "type": "boolean",
            "description": "Skip notices whose response deadline has already passed (and awards without a deadline).",
            "default": false
          },
          "activeOnly": {
            "title": "Active only",
            "type": "boolean",
            "description": "Skip archived/inactive notices.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode: only new or changed notices",
            "type": "boolean",
            "description": "Save only notices that are new or changed since the previous run with the same monitor ID. Adds change_type, changed_fields, previous_response_deadline, previous_notice_type_code, previous_notice_id and first_seen_at.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name for this monitor's memory, e.g. cyber-va-daily. Leave empty to derive it from your filters (changing a filter then starts a fresh monitor). Letters, digits, - and _ work best."
          },
          "monitorFirstRun": {
            "title": "First monitor run",
            "enum": [
              "emit",
              "baseline"
            ],
            "type": "string",
            "description": "What the very first run of a monitor does. Baseline is free and makes the next run return only real changes.",
            "default": "emit"
          },
          "resetMonitor": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget everything this monitor has seen and start again.",
            "default": false
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Fetch each notice's full record (NAICS, PSC, set-aside, place of performance, contacts, full description). One extra request per notice.",
            "default": true
          },
          "includeContacts": {
            "title": "Include contracting contacts",
            "type": "boolean",
            "description": "Include the official government points of contact, as a contacts list plus flat primary_contact_* and secondary_contact_* columns.",
            "default": true
          },
          "includeAttachments": {
            "title": "Include attachment links",
            "type": "boolean",
            "description": "List each notice's bid documents and links (name, direct download URL, size, posted date) in attachments and attachment_links. Needs details on.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many notices. You pay only for complete notices saved; failed rows are free.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}