{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper (No API Key)",
    "description": "Search US federal contract opportunities (RFPs, RFQs, solicitations, sources sought) from SAM.gov without an API key. Input keywords, NAICS, PSC, set-aside, agency, state, dates. Returns one JSON record per notice with deadline, contacts, links. $0.004/result.",
    "version": "1.0",
    "x-build-id": "8q4wDEAcUaJSFP1IS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kempt_horizon_yzk~samgov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kempt_horizon_yzk-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/kempt_horizon_yzk~samgov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-kempt_horizon_yzk-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/kempt_horizon_yzk~samgov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-kempt_horizon_yzk-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": "array",
            "description": "Optional. Words/phrases matched (case-insensitive) in notice title, solicitation number or description, e.g. [\"cybersecurity\",\"zero trust\"]. Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Require any or all keywords.",
            "default": "any"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Optional. NAICS codes or prefixes; a prefix matches all codes under it, e.g. \"5415\" = all IT services (541511, 541512...). Empty = all industries.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes",
            "type": "array",
            "description": "Product Service Codes or prefixes, e.g. D3 or R425.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "SAM.gov set-aside codes: SBA (Total Small Business), SBP, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, VSA, VSS, ISBEE, IEE. Use NONE for notices without a set-aside.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Text matched against department, sub-tier and office, e.g. \"DEPT OF DEFENSE\", \"army\", \"NASA\", \"VETERANS AFFAIRS\".",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter state codes, e.g. VA, MD, TX.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "e.g. Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Award Notice, Justification. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "postedLastDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Optional. Only notices posted in the last N days (e.g. 7). Ignored if 'Posted from' is set. Empty = any date."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive, UTC)."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive, UTC)."
          },
          "deadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "YYYY-MM-DD. Notices without a deadline are excluded when set."
          },
          "deadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Skip archived/inactive notices.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum notices to return, newest first. Each result costs $0.004 ($0.01 if enriched), so set low (e.g. 10-50) for quick lookups.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Remember notice IDs between runs (per filter set) and output only notices not seen before. Ideal for scheduled daily runs.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the 'only new' memory. Defaults to a hash of your filters. Use a fixed name to keep history when you tweak filters."
          },
          "includeDescription": {
            "title": "Include full description",
            "type": "boolean",
            "description": "Include the notice description text.",
            "default": true
          },
          "includeContacts": {
            "title": "Include contracting-office contacts",
            "type": "boolean",
            "description": "Official government points of contact listed on the notice.",
            "default": true
          },
          "includeAttachments": {
            "title": "Attachments (enriched)",
            "type": "boolean",
            "description": "List public attachments/links per notice. Charged at the enriched rate.",
            "default": false
          },
          "includeAttachmentText": {
            "title": "Extract attachment text",
            "type": "boolean",
            "description": "When attachments are on, download public PDF/DOCX/TXT files and extract text (max 50k chars per file).",
            "default": true
          },
          "maxAttachmentsPerNotice": {
            "title": "Max attachments to extract per notice",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Limits download time per notice.",
            "default": 5
          },
          "includeAwardHistory": {
            "title": "Award history from USAspending (enriched)",
            "type": "boolean",
            "description": "Prior awards for the same solicitation number (incumbent) and recent awards in the same NAICS at the same agency. Charged at the enriched rate.",
            "default": false
          },
          "awardHistoryLimit": {
            "title": "Awards per list",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many awards to return in each history list.",
            "default": 5
          },
          "enrichmentConcurrency": {
            "title": "Enrichment concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel enrichment requests. Keep low to be polite to government servers.",
            "default": 3
          },
          "extractUrl": {
            "title": "Extract URL override (advanced)",
            "type": "string",
            "description": "Leave empty. Alternative URL of the SAM.gov Contract Opportunities CSV extract (for testing/mirrors)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}