{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Contracts Feed: SAM.gov & USAspending",
    "description": "Get US federal contract opportunities from the official SAM.gov API with the buyer's last-12-month award history from USAspending. Filter by NAICS, PSC, set-aside, notice type, agency, state and keywords. Works without a key in USAspending-only mode (recent awards).",
    "version": "1.0",
    "x-build-id": "gmu5QrcOQKR9OqqUu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offerastudio~us-federal-contracts-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offerastudio-us-federal-contracts-feed",
        "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/offerastudio~us-federal-contracts-feed/runs": {
      "post": {
        "operationId": "runs-sync-offerastudio-us-federal-contracts-feed",
        "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/offerastudio~us-federal-contracts-feed/run-sync": {
      "post": {
        "operationId": "run-sync-offerastudio-us-federal-contracts-feed",
        "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": {
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "First posting date, for example 2026-10-01, or a relative value like \"7 days\" (7 days ago). Leave both dates empty for yesterday (SAM.gov) or the last 7 days (USAspending-only mode). With only this date set, the range runs to today. At most 365 days."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Last posting date, inclusive."
          },
          "naicsCodes": {
            "title": "NAICS codes or prefixes",
            "type": "array",
            "description": "2 to 6 digits. A prefix such as 5415 matches every code that starts with it (computer systems design). A notice matches if it has any of the codes.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes or prefixes",
            "type": "array",
            "description": "Product and Service Codes, for example D302 or the prefix D3 (IT services).",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Only notices with one of these set-asides.",
            "items": {
              "type": "string",
              "enum": [
                "small-business",
                "8a",
                "wosb",
                "sdvosb",
                "hubzone"
              ],
              "enumTitles": [
                "Small business",
                "8(a)",
                "Women-owned small business (WOSB, EDWOSB)",
                "Service-disabled veteran-owned (SDVOSB)",
                "HUBZone"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "SAM.gov mode only. Leave empty for all types. In USAspending-only mode every row is a contract award.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "presolicitation",
                "sources-sought",
                "award"
              ],
              "enumTitles": [
                "Solicitation",
                "Presolicitation",
                "Sources sought",
                "Award notice"
              ]
            }
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Part of an agency, sub-tier or office name, for example \"Army\" or \"Veterans Affairs\". Case does not matter."
          },
          "state": {
            "title": "Place of performance (state)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter state code such as TX."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "SAM.gov mode: a notice matches if its title or solicitation number contains any keyword. USAspending-only mode: searched in the award description and other award text.",
            "items": {
              "type": "string"
            }
          },
          "responseDeadlineAfter": {
            "title": "Response deadline after",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date (YYYY-MM-DD). SAM.gov mode only. Notices without a deadline are left out."
          },
          "includeBuyerHistory": {
            "title": "Add the buyer's award history",
            "type": "boolean",
            "description": "SAM.gov mode: adds the number and total value of contracts that the same sub-tier agency awarded in the same NAICS code in the last 12 months (from USAspending).",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many rows. You pay $0.002 for each.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}