{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper: US Federal Bids",
    "description": "US federal contract opportunities from the official SAM.gov daily extract: solicitations, awards and notices with agency, NAICS, set-aside, deadlines, place of performance and full descriptions. No API key, no contact names, e-mails or phones.",
    "version": "1.0",
    "x-build-id": "Ya8ogJisbEKuwfz0J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowcraft~sam-gov-contract-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowcraft-sam-gov-contract-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/rowcraft~sam-gov-contract-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rowcraft-sam-gov-contract-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/rowcraft~sam-gov-contract-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rowcraft-sam-gov-contract-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": {
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Words or phrases searched in the title and the description, one per line. A notice matches when it contains at least one. Whole words, any case; end a word with * for a prefix (cyber* finds cybersecurity).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip notices whose title or description contains any of these words or phrases, one per line.",
            "items": {
              "type": "string"
            }
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "North American Industry Classification codes, one per line, as a full code or a prefix: 5415 (IT services), 236 (building construction), 541330 (engineering services). A prefix matches everything below it.",
            "items": {
              "type": "string"
            }
          },
          "psc": {
            "title": "Product and service codes (PSC)",
            "type": "array",
            "description": "Federal product and service codes, one per line, as a full code or a prefix: D3 (IT and telecom services), R4 (professional services), 6515 (medical supplies).",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Keep only notices reserved for a business category, for example small business, 8(a), HUBZone, service-disabled veteran-owned or women-owned. Empty = all notices, reserved or not.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "IEE",
                "ISBEE",
                "BICiv",
                "NONE"
              ],
              "enumTitles": [
                "Small business set-aside (total)",
                "Small business set-aside (partial)",
                "8(a) set-aside",
                "8(a) sole source",
                "HUBZone set-aside",
                "HUBZone sole source",
                "Service-disabled veteran-owned (SDVOSB) set-aside",
                "Service-disabled veteran-owned (SDVOSB) sole source",
                "Women-owned small business (WOSB) set-aside",
                "Women-owned small business (WOSB) sole source",
                "Economically disadvantaged WOSB set-aside",
                "Economically disadvantaged WOSB sole source",
                "Veteran-owned small business set-aside (VA)",
                "Veteran-owned small business sole source (VA)",
                "Indian economic enterprise",
                "Indian small business economic enterprise",
                "Buy Indian (Indian Health Service)",
                "No set-aside used"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which kind of notice: open solicitations, planning notices (presolicitations, sources sought), award notices and others. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined-synopsis-solicitation",
                "presolicitation",
                "sources-sought",
                "special-notice",
                "award-notice",
                "justification",
                "sale-of-surplus-property",
                "bundle"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined synopsis/solicitation",
                "Presolicitation",
                "Sources sought",
                "Special notice",
                "Award notice",
                "Justification (sole source)",
                "Sale of surplus property",
                "Consolidation or bundling"
              ]
            }
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only notices posted on or after this day (US Eastern time). A date (2026-10-01), today, yesterday, a relative value such as 7 days, 2 weeks, 3 months, or all for the whole extract. Empty = 7 days. Reading stops at this day, so short periods are fast."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only notices posted on or before this day (2026-10-07)."
          },
          "openOnly": {
            "title": "Only notices still open for responses",
            "type": "boolean",
            "description": "Keep only active notices with a response deadline of today or later. Notices without a deadline (awards, many special notices) are dropped.",
            "default": false
          },
          "awardedAfter": {
            "title": "Awarded after",
            "type": "string",
            "description": "Only notices that carry an award dated on or after this day: a date, a relative value such as 30 days, or today. Combine with the Award notice type to list recent awards."
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose award amount is at least this many dollars. Only notices with an award amount can match."
          },
          "agencies": {
            "title": "Agency contains",
            "type": "array",
            "description": "Words from the name of the department, sub-tier agency or contracting office, one per line: Veterans Affairs, Army, Corps of Engineers, GSA. A notice matches when any of them appears.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter codes or names of US states and territories, one per line. Matches the place of performance; when a notice gives none (most do not), the state of the contracting office.",
            "items": {
              "type": "string"
            }
          },
          "solicitationNumbers": {
            "title": "Solicitation numbers",
            "type": "array",
            "description": "Look up notices by solicitation number (for example W912DY26R0001), one per line. Set Published after to all to search the whole extract.",
            "items": {
              "type": "string"
            }
          },
          "noticeIds": {
            "title": "Notice IDs",
            "type": "array",
            "description": "Look up notices by their 32-character SAM.gov notice ID (the id column of an earlier run), one per line. Set Published after to all to search the whole extract.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Newest first reads the extract from the top and stops early. Oldest first needs the whole period before the first notice is delivered (and, without a date limit, the whole 210 MB file).",
            "default": "newest"
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many notices. 0 = all matching notices (set a charge cap for a first try).",
            "default": 500
          },
          "includeDescription": {
            "title": "Include descriptions",
            "type": "boolean",
            "description": "The full text of the notice, with e-mail addresses and phone numbers removed. Switch off for smaller rows.",
            "default": true
          },
          "countOnly": {
            "title": "Count only (free check)",
            "type": "boolean",
            "description": "Only count how many rows match your filters and estimate the cost at your price tier. Nothing is delivered and nothing is charged apart from the start event. Turn it off to get the data.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows since the last run",
            "type": "boolean",
            "description": "Remember the rows already delivered to you (in a key-value store in your Apify account) and deliver only rows that appeared since the last run with the same state key. The first run delivers everything that matches; later runs cost only the new rows. Ideal for schedules.",
            "default": false
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "Name of the memory used by \"Only new rows\". Use a different name for each schedule or search (for example `stockholm-python`) so they do not share one memory.",
            "default": "default"
          },
          "notifyUrl": {
            "title": "Notify this URL when the run ends",
            "type": "string",
            "description": "A webhook address that receives one JSON POST with the number of new rows and links to the dataset: a Slack or Discord incoming webhook, a Make, n8n or Zapier catch hook, or your own endpoint. The message is also in the `text` (Slack) and `content` (Discord) fields."
          },
          "notifyWhenEmpty": {
            "title": "Notify also when there are no new rows",
            "type": "boolean",
            "description": "By default the notification is sent only when at least one row was delivered.",
            "default": false
          },
          "requestIntervalMs": {
            "title": "Delay between requests (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Default 1000 ms. A run makes only a few requests (robots.txt, file size, one streamed download), so this matters only when a dropped connection is resumed. Minimum 500.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}