{
  "openapi": "3.0.1",
  "info": {
    "title": "USA Government Contract Scraper",
    "description": "USA Government Contract Scraper that finds and extracts government RFPs, RFQs, IFBs, and contract opportunities from major procurement platforms. Get structured data including deadlines, agencies, values, contacts, categories, and bid documents.",
    "version": "0.0",
    "x-build-id": "beoDOJK9FWjWSByNs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sigma-dev~usa-government-contract-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sigma-dev-usa-government-contract-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/sigma-dev~usa-government-contract-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sigma-dev-usa-government-contract-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/sigma-dev~usa-government-contract-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sigma-dev-usa-government-contract-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": {
          "dataSource": {
            "title": "Data source",
            "enum": [
              "opportunities",
              "awards",
              "both"
            ],
            "type": "string",
            "description": "<b>Contract opportunities</b> are open solicitations, pre-solicitations, sources-sought and award notices from SAM.gov. <b>Contract awards</b> are awarded contracts (who won what, for how much) from USASpending.gov.",
            "default": "opportunities"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms matched against title and description, e.g. <code>cybersecurity</code>, <code>janitorial services</code>. Multiple terms are combined according to <b>Keyword mode</b>.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword mode",
            "enum": [
              "any",
              "all",
              "exact"
            ],
            "type": "string",
            "description": "<b>Any</b> – at least one term must match. <b>All</b> – every term must match. <b>Exact</b> – the exact phrase must appear.",
            "default": "any"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, 2 to 6 digits. Shorter codes act as prefixes, e.g. <code>5415</code> matches 541511, 541512, 541519.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product/Service Codes, 1 to 4 characters. Shorter codes act as prefixes, e.g. <code>DA</code> matches all IT and telecom services, <code>70</code> all IT products.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Only include notices/awards set aside for these small-business categories.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "VSA",
                "VSS"
              ],
              "enumTitles": [
                "Total Small Business (SBA)",
                "Partial Small Business (SBP)",
                "8(a) Set-Aside (8A)",
                "8(a) Sole Source (8AN)",
                "HUBZone Set-Aside (HZC)",
                "HUBZone Sole Source (HZS)",
                "SDVOSB Set-Aside (SDVOSBC)",
                "SDVOSB Sole Source (SDVOSBS)",
                "WOSB Set-Aside (WOSB)",
                "WOSB Sole Source (WOSBSS)",
                "EDWOSB Set-Aside (EDWOSB)",
                "EDWOSB Sole Source (EDWOSBSS)",
                "Local Area Set-Aside (LAS)",
                "Indian Economic Enterprise (IEE)",
                "Indian Small Business Economic Enterprise (ISBEE)",
                "Buy Indian (BICiv)",
                "Veteran-Owned Small Business (VSA)",
                "Veteran-Owned SB Sole Source (VSS)"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Department or sub-agency names or common abbreviations, e.g. <code>Department of Defense</code>, <code>VA</code>, <code>Army</code>, <code>NASA</code>, <code>Bureau of Prisons</code>. Any of the listed agencies matches.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state/territory codes (e.g. <code>VA</code>, <code>TX</code>) or full names. Matches the place of performance.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Rolling date window. Opportunities: last modified date; awards: action date. Set <code>0</code> for no date limit (ignored when an absolute date range is given).",
            "default": 7
          },
          "postedFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Absolute start of the date window. Overrides <b>Posted within last N days</b>."
          },
          "postedTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Absolute end of the date window (inclusive). Defaults to today when only <b>Posted from</b> is set."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records across all sources. <code>0</code> = no limit (the SAM.gov search API returns at most 10,000 results per query; use <b>Bulk mode</b> for more).",
            "default": 500
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which SAM.gov notice types to include.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "a",
                "s",
                "u",
                "g",
                "i"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Award Notice",
                "Special Notice",
                "Justification",
                "Sale of Surplus Property",
                "Intent to Bundle Requirements (DoD-Funded)"
              ]
            },
            "default": [
              "o",
              "k",
              "p",
              "r"
            ]
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Skip archived/expired notices.",
            "default": true
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date."
          },
          "includeDetails": {
            "title": "Include notice details",
            "type": "boolean",
            "description": "Fetch each notice's detail page for the full description, points of contact, NAICS, PSC, set-aside and place of performance (one extra request per notice). When off, only the fields available in search results are returned and state/PSC filters cannot be applied.",
            "default": true
          },
          "includeAttachments": {
            "title": "Include attachments",
            "type": "boolean",
            "description": "List each notice's attachments (name, size, type and direct download URL). Adds one request per notice. Files themselves are not downloaded.",
            "default": true
          },
          "awardTypes": {
            "title": "Award types",
            "enum": [
              "contracts",
              "idvs",
              "all"
            ],
            "type": "string",
            "description": "<b>Contracts</b> – definitive contracts, purchase orders, delivery orders and BPA calls. <b>IDVs</b> – indefinite delivery vehicles (IDIQs, GWACs, BPAs, FSS).",
            "default": "contracts"
          },
          "awardAmountMin": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with an obligated amount at or above this value."
          },
          "awardAmountMax": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with an obligated amount at or below this value."
          },
          "recipientSearch": {
            "title": "Recipient",
            "type": "string",
            "description": "Recipient (vendor) name, UEI or DUNS, e.g. <code>Leidos</code>."
          },
          "includeAwardDetails": {
            "title": "Include award details",
            "type": "boolean",
            "description": "Fetch each award's detail record for competition type, pricing type, parent IDV, recipient parent company and officers (one extra request per award).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new records",
            "type": "boolean",
            "description": "Remember which records were already returned by previous runs with the same filters and output only new ones. Combine with a schedule and an integration (email, Slack, webhook) to get alerts for new opportunities.",
            "default": false
          },
          "bulkMode": {
            "title": "Bulk mode (daily CSV extract)",
            "type": "boolean",
            "description": "Read opportunities from SAM.gov's daily public CSV extract (all ~50,000+ active notices, refreshed nightly) instead of the search API. Best for full snapshots or when a query would exceed 10,000 results. All filters are applied locally; details are included automatically.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy is optional; both data sources answer without one. Enable Apify Proxy if you see rate limiting.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}