{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Bid Finder",
    "description": "Find new U.S. federal contract opportunities from SAM.gov by keyword, NAICS, set-aside, agency, state and deadline. Official public daily data, no API key, no 10-requests/day limit. Monitor mode returns only bids you haven't seen.",
    "version": "0.1",
    "x-build-id": "fKVtZpiuv9pNujvxs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/publicrecords-lab~sam-gov-bid-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-publicrecords-lab-sam-gov-bid-finder",
        "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/publicrecords-lab~sam-gov-bid-finder/runs": {
      "post": {
        "operationId": "runs-sync-publicrecords-lab-sam-gov-bid-finder",
        "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/publicrecords-lab~sam-gov-bid-finder/run-sync": {
      "post": {
        "operationId": "run-sync-publicrecords-lab-sam-gov-bid-finder",
        "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": "Words or phrases to look for in the title (and description, if enabled). Case-insensitive substring match. Leave empty to match everything that passes the other filters.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "'any' = at least one keyword must match; 'all' = every keyword must match.",
            "default": "any"
          },
          "searchInDescription": {
            "title": "Search keywords in description too",
            "type": "boolean",
            "description": "If off, keywords are matched against the title only (fewer, more precise results).",
            "default": true
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop opportunities whose title/description contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (prefixes)",
            "type": "array",
            "description": "Full or partial NAICS codes. '5415' matches 541511, 541512, 541519 ... Notices without a NAICS code are excluded when this is set.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes (prefixes)",
            "type": "array",
            "description": "Product Service Codes, full or prefix (e.g. 'D3' for IT services, 'R4' for professional services).",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Only return opportunities with one of these set-aside codes. Leave empty for any (including unrestricted).",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "NONE"
              ],
              "enumTitles": [
                "Small Business (total)",
                "Small Business (partial)",
                "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",
                "VOSB (VA) set-aside",
                "VOSB (VA) sole source",
                "Local area set-aside",
                "Indian Economic Enterprise",
                "Indian Small Business Economic Enterprise",
                "Buy Indian (IHS)",
                "No set-aside used"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Case-insensitive text matched against department, sub-tier and office, e.g. 'VETERANS AFFAIRS', 'AIR FORCE', 'NASA'.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state codes, e.g. 'VA', 'TX'. Notices without a place-of-performance state are excluded when this is set.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to these notice types. Leave empty for all (award notices are controlled separately below).",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Modification/Amendment/Cancel",
                "Justification",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle",
                "Award Notice"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 0,
            "maximum": 400,
            "type": "integer",
            "description": "Only notices posted in this window. 1-30 days reads only the newest part of the file (cheapest). Set 0 or more than 30 to scan the whole active file (adds the full-file-scan charge).",
            "default": 7
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Earliest response deadline, YYYY-MM-DD or relative like '3 days' (from today). Notices without a deadline are excluded when any deadline filter is set."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Latest response deadline, YYYY-MM-DD or relative like '45 days'."
          },
          "onlyOpenForResponses": {
            "title": "Only bids still open for responses",
            "type": "boolean",
            "description": "Drop notices whose response deadline has passed or that have no deadline.",
            "default": false
          },
          "includeAwardNotices": {
            "title": "Include award notices",
            "type": "boolean",
            "description": "Award notices tell you who won, not what you can bid on. Off by default.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since last run (monitor mode)",
            "type": "boolean",
            "description": "Remember which notices this search already returned (in a named key-value store in your account) and output only new ones. Ideal with a daily schedule.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Optional name for this saved search's memory. Defaults to an ID derived from your filters, so changing filters starts a fresh memory. Use the same ID across runs/tasks to share memory."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used for monitor memory.",
            "default": "sam-gov-bid-finder-state"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many bids. Caps your cost per run.",
            "default": 500
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Plain-text notice description from SAM.gov.",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Description max characters",
            "minimum": 0,
            "type": "integer",
            "description": "Trim long descriptions. 0 = full text.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}