{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Scraper",
    "description": "Search US federal contract opportunities on SAM.gov by keyword, notice type, set-aside, NAICS code, state and dates. Pay per opportunity.",
    "version": "0.1",
    "x-build-id": "U5dosHtUA7kMYCEnw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nanodata~sam-gov-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nanodata-sam-gov-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/nanodata~sam-gov-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nanodata-sam-gov-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/nanodata~sam-gov-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nanodata-sam-gov-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": {
          "queries": {
            "title": "Search words",
            "type": "array",
            "description": "Words or phrases to search for in notice titles and descriptions (for example 'software' or 'road maintenance'). Each entry is a separate search. Leave empty to list the newest notices that match the filters below. An empty input runs a tiny demo of 5 notices.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum opportunities for the whole run, shared evenly between the search words. Default 100, maximum 10,000.",
            "default": 100
          },
          "isActive": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "On: only notices that are still open or current. Off: only archived and inactive notices.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Filter by notice type. Use the letters p (presolicitation), r (sources sought), o (solicitation), k (combined synopsis and solicitation), s (special notice), i (intent to bundle), a (award notice), g (sale of surplus property), u (justification), or the words solicitation, presolicitation, combined, sources sought, special notice, award.",
            "items": {
              "type": "string"
            }
          },
          "setAside": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Filter by set-aside code as used by SAM.gov, for example SBA (small business), 8A, HZC, SDVOSBC, WOSB.",
            "items": {
              "type": "string"
            }
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Filter by NAICS industry code (2 to 6 digits), for example 541511.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceState": {
            "title": "Place of performance state",
            "type": "array",
            "description": "Filter by the two letter state code of the place of performance, for example VA or CA.",
            "items": {
              "type": "string"
            }
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "First posting date, format YYYY-MM-DD (US Eastern calendar day)."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Last posting date, format YYYY-MM-DD (US Eastern calendar day)."
          },
          "modifiedFrom": {
            "title": "Modified from",
            "type": "string",
            "description": "Only notices changed on or after this date, format YYYY-MM-DD."
          },
          "modifiedTo": {
            "title": "Modified to",
            "type": "string",
            "description": "Only notices changed on or before this date, format YYYY-MM-DD."
          },
          "responseFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices with a response deadline on or after this date, format YYYY-MM-DD."
          },
          "responseTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices with a response deadline on or before this date, format YYYY-MM-DD."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "-modifiedDate",
              "-relevance"
            ],
            "type": "string",
            "description": "Newest change first, or best match first.",
            "default": "-modifiedDate"
          },
          "includeDetails": {
            "title": "Include notice details",
            "type": "boolean",
            "description": "Opens each notice to add NAICS codes, product or service code, set-aside, archive date, place of performance, full description and the published contact persons. Uses one extra request per notice, so runs take longer. The price per result stays the same.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Connection settings",
            "type": "object",
            "description": "Keep the default. The run connects through Apify's standard pool.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}