{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Government Contracts and Award Winners",
    "description": "Federal contract opportunities from SAM.gov, searched by keyword, NAICS, set-aside and state: government contracts, public procurement tenders, RFPs, solicitations, sources sought and bids. Each notice shows past award winners for its agency and NAICS code, from USAspending.gov. Unofficial tool.",
    "version": "0.1",
    "x-build-id": "cjWUFPvIPhedi4dMw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainrecordlabs~federal-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainrecordlabs-federal-contract-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/plainrecordlabs~federal-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-plainrecordlabs-federal-contract-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/plainrecordlabs~federal-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-plainrecordlabs-federal-contract-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": "Find notices whose title or description contains any of these words, for example \"janitorial\", \"cybersecurity\" or \"HVAC\". Case does not matter and a keyword matches from the start of a word, so \"roof\" also finds \"roofing\". Leave empty to search by the filters below only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these words, for example \"training\" or \"design\". They match the same way as Keywords.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchDescriptions": {
            "title": "Search descriptions too",
            "type": "boolean",
            "description": "On: keywords and exclude keywords are checked against the title and the full description. Off: the title only, which gives fewer but closer matches. For example, with it off \"roofing\" finds roofing contracts but not a building contract that mentions a roof in its text.",
            "default": true
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Keep notices whose NAICS code starts with any of these, for example 541512 for computer systems design, 5415 or 2362. A shorter code covers every code that starts with it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Keep notices with any of these SAM.gov set-aside codes, for example SBA for a total small business set-aside, SDVOSBC for service-disabled veteran-owned small business or HZC for HUBZone. Other codes are SBP, 8A, 8AN, SDVOSBS, WOSB, WOSBSS, EDWOSB, VSA and ISBEE. NONE keeps notices the agency marked as having no set-aside. Many notices carry no code at all and are left out whenever this filter is used.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter state codes, for example VA or TX. Uses the place of performance, or the contracting office's state when the notice gives no place. Each result's stateSource field says which one was used.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agency or office contains",
            "type": "array",
            "description": "Keep notices whose department, agency or office name contains any of these, for example \"Army\", \"Veterans\" or \"Forest Service\". Case does not matter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Keep only these types, typed exactly as written here: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Award Notice, Justification. For example, Solicitation and Combined Synopsis/Solicitation keep notices you can bid on now, and Sources Sought finds work before the bid opens. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "openOnly": {
            "title": "Open notices only",
            "type": "boolean",
            "description": "Keep only notices whose response deadline is today or later. Turn off to include award notices and notices without a deadline from the last 90 days, for example to see who recently won work in your NAICS code.",
            "default": true
          },
          "deadlineWithinDays": {
            "title": "Response due within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices due from today through the next N days, for example 14 for the next two weeks. 0 = any deadline.",
            "default": 0
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices posted in the last N days, for example 7 for the past week. 0 = any.",
            "default": 0
          },
          "includeMarketHistory": {
            "title": "Include past award winners",
            "type": "boolean",
            "description": "Add the marketHistory block: contracts awarded by the same agency for the same NAICS code over about three fiscal years, and the top 5 recipients by amount (USAspending.gov). For example, a Forest Service road notice shows who won Forest Service road work before. It is null when the notice has no NAICS code or no past awards match.",
            "default": true
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Add the notice description (up to 8,000 characters, emails and phone numbers removed). Turn off for smaller rows, for example when you only need titles and deadlines for an alert.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Return at most this many notices, newest first, for example 50. 0 = no limit, which needs at least one keyword or filter so a run cannot return the whole index.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only notices not seen in my earlier runs",
            "type": "boolean",
            "description": "Remembers notice IDs between your runs (in your own key-value store) and returns only new ones. Pair with an Apify schedule for daily alerts, for example a run every morning that returns only notices posted since the last one. The first run returns everything that matches and records it.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}