{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities from the Public Data Extract",
    "description": "US federal contract opportunity notices from SAM.gov's public data extract, filtered by NAICS, keyword, notice type, set-aside, state, posted date and deadline. Each row links to the notice on SAM.gov; contact, award and free-text description fields are not included.",
    "version": "0.1",
    "x-build-id": "Lbi6bNgoWTTYSLVYc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wx-grid-forecasts~sam-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wx-grid-forecasts-sam-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/wx-grid-forecasts~sam-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-wx-grid-forecasts-sam-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/wx-grid-forecasts~sam-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-wx-grid-forecasts-sam-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": {
          "naics": {
            "title": "NAICS codes (prefix match)",
            "type": "array",
            "description": "Keep notices whose NAICS code starts with any of these. '5415' matches 541511, 541512, 541519 and so on; a full 6-digit code matches exactly that code.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Case-insensitive words or phrases searched in the title and the notice description, for example 'cybersecurity' or 'help desk'. The description is used only for matching; it is not returned (open the notice's link to read it).",
            "items": {
              "type": "string"
            }
          },
          "keyword_match": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a notice must contain any of the keywords or all of them.",
            "default": "any"
          },
          "notice_types": {
            "title": "Notice types",
            "type": "array",
            "description": "Exact notice types as SAM.gov names them: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Award Notice, Justification, Sale of Surplus Property, Consolidate/(Substantially) Bundle. Empty keeps all types.",
            "items": {
              "type": "string"
            }
          },
          "set_aside_codes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "SAM.gov set-aside codes, for example SBA (total small business), SDVOSBC, SDVOSBS, WOSB, 8A, HZC, VSA. 'NONE' keeps notices with no set-aside (the extract writes NONE or leaves the field empty).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter state or territory codes of the place of performance, for example VA, MD, DC. Notices with no place of performance stated are excluded when this is set.",
            "items": {
              "type": "string"
            }
          },
          "posted_days": {
            "title": "Posted in the last N days",
            "minimum": 0,
            "maximum": 3660,
            "type": "integer",
            "description": "Keep notices posted within this many days before today (UTC; the extract states no time zone for posted dates). The extract usually holds notices up to the previous day, so 0 (today only) normally returns nothing. Leave empty to not filter by posted date."
          },
          "posted_since": {
            "title": "Posted since (date)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep notices posted on or after this date (YYYY-MM-DD). When both this and 'Posted in the last N days' are set, the later date applies."
          },
          "deadline_within_days": {
            "title": "Response deadline within N days",
            "minimum": 0,
            "maximum": 3660,
            "type": "integer",
            "description": "Keep only notices whose response deadline falls between today and this many days ahead. Notices without a deadline are excluded when this is set."
          },
          "active_only": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Keep only notices the extract marks Active = Yes.",
            "default": true
          },
          "new_only": {
            "title": "Only new or changed since the last run",
            "type": "boolean",
            "description": "Deliver only notices that were not delivered by an earlier run with the same cursor key, or whose content changed since. Every run updates the cursor, so this can be switched on after a first full run.",
            "default": false
          },
          "cursor_key": {
            "title": "Cursor key",
            "type": "string",
            "description": "Name of the 'seen' cursor kept in the named key-value store sam-opps-cursor in your account. Use a different key for each filter set you schedule, and do not run two runs with the same key at once.",
            "default": "default"
          },
          "max_rows": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many rows have been delivered (and charged). 0 to 20000; 0 delivers no rows.",
            "default": 1000
          },
          "probe_order": {
            "title": "Order probe (diagnostic; returns no rows)",
            "type": "boolean",
            "description": "Reads the whole extract and delivers no rows, so nothing is charged for rows. The run log shows the number of records, how the posted dates are ordered and how long the read took. Filters, the cursor and the row cap are ignored.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}