{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Federal Bid Finder with Past Award Prices",
    "description": "Find new SAM.gov federal contract opportunities by NAICS, PSC, set-aside, state and keywords, with past award prices (median, range, top winners) from USAspending.",
    "version": "1.0",
    "x-build-id": "CbhBieSTsitFHpqIc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/colinsabby~federal-bid-matcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-colinsabby-federal-bid-matcher",
        "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/colinsabby~federal-bid-matcher/runs": {
      "post": {
        "operationId": "runs-sync-colinsabby-federal-bid-matcher",
        "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/colinsabby~federal-bid-matcher/run-sync": {
      "post": {
        "operationId": "run-sync-colinsabby-federal-bid-matcher",
        "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",
        "required": [
          "samApiKey"
        ],
        "properties": {
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Public API key from SAM.gov: sign in, open Account Details, then Public API Key. Required. Stored as a secret. For a local npm start, SAM_API_KEY is used when this is blank. This Actor does not include a key. About 10 requests per day without a role and about 1,000 per day with a role (https://open.gsa.gov/api/entity-api/)."
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "heavy equipment",
              "metal fabrication",
              "janitorial"
            ],
            "type": "string",
            "description": "Matches a notice if its NAICS or its PSC is in the preset. heavy equipment: NAICS 333120, 532412 and PSC 3805, 3810, 3820. metal fabrication: NAICS 332312, 332313, 332710 (no PSC). janitorial: NAICS 561720 and PSC S201. Sources are in the README. Extra naics and psc values are added to the preset."
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2–6 digit NAICS codes. Without a preset, a notice must match one of these and, when psc is also set, one of those PSC codes.",
            "items": {
              "type": "string"
            }
          },
          "psc": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product or Service Codes, 1–4 letters or digits. Sent to SAM as ccode and to USAspending as psc_codes when the notice itself has a classification code.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Title keywords",
            "type": "string",
            "description": "Passed as the SAM title parameter. SAM search does not query the notice description."
          },
          "setAside": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Official typeOfSetAside codes: SBA, SBP, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, LAS, IEE, ISBEE, BICiv, VSA, VSS.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceState": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state codes. A notice must match one of them.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Posted-date window ending today (UTC). SAM allows at most one year.",
            "default": 7
          },
          "onlyNew": {
            "title": "Only new or changed",
            "type": "boolean",
            "description": "When on, a notice is emitted only if its solicitation (or notice id) was not seen last run, or its version changed. Seen notices are stored in the bid-matcher key-value store under SEEN_NOTICES.",
            "default": true
          },
          "includeAwardComps": {
            "title": "Include award comps",
            "type": "boolean",
            "description": "Attach USAspending count, median, min, max, and top 3 winners. Notices with no NAICS get count 0 and null amounts.",
            "default": true
          },
          "lookbackYears": {
            "title": "Award lookback years",
            "minimum": 1,
            "maximum": 18,
            "type": "integer",
            "description": "How many years of contract awards (date signed) to use for comps.",
            "default": 3
          },
          "maxResults": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on notices kept after SAM results are merged, newest posted date first. Each SAM request uses limit 1000, then this cap keeps the newest.",
            "default": 100
          },
          "includePointOfContact": {
            "title": "Include point of contact",
            "type": "boolean",
            "description": "Off by default. When on, each row gains pointOfContact with the primary contact name, email, and phone.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}