{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper: Federal Contract Awards & Recompete Finder",
    "description": "Use this to find US federal contract awards and contracts ending soon (recompete leads) from USAspending.gov. Input: keywords, NAICS, PSC, agency, state or set-aside. Output: one row per contract with incumbent, UEI, amount, agency, end date and link, plus top competitors.",
    "version": "0.1",
    "x-build-id": "mX93NZzi9Bfm9Bw3q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pandadad0214~federal-contract-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pandadad0214-federal-contract-finder",
        "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/pandadad0214~federal-contract-finder/runs": {
      "post": {
        "operationId": "runs-sync-pandadad0214-federal-contract-finder",
        "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/pandadad0214~federal-contract-finder/run-sync": {
      "post": {
        "operationId": "run-sync-pandadad0214-federal-contract-finder",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "awards",
              "recompete"
            ],
            "type": "string",
            "description": "Contract awards = awards that match your filters, sorted as you choose. Recompete radar = only contracts whose period of performance ends between today and the number of months below (incumbent contracts likely to be re-solicited), soonest first.",
            "default": "awards"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to find in the award description, recipient or codes, e.g. cybersecurity, janitorial, drone. Each keyword at least 3 characters; rows matching any keyword are returned. At least one filter (keywords, NAICS, PSC, agency, recipient, state or set-aside) is required.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "You pay per returned contract, so this also caps the cost. Whole number, 1 to 5,000; default 100.",
            "default": 100
          },
          "recompeteMonths": {
            "title": "Recompete window (months)",
            "minimum": 1,
            "maximum": 36,
            "type": "integer",
            "description": "Recompete radar only: keep contracts that end within this many months from today. Whole number, 1 to 36; default 12.",
            "default": 12
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Optional. 2 to 6 digit NAICS industry codes; a prefix covers all codes under it (5415 = computer systems design). Examples: 541512 IT services, 561720 janitorial, 236220 commercial construction.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Optional. Product and Service Codes (what was bought), e.g. D399 other IT, R425 engineering support, S201 custodial.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Optional. Department or sub-agency by name or abbreviation, e.g. DOD, VA, GSA, DHS, Department of the Army, Missile Defense Agency, Forest Service.",
            "items": {
              "type": "string"
            }
          },
          "performanceStates": {
            "title": "Place of performance (states)",
            "type": "array",
            "description": "Optional. 2-letter US state codes where the work is done, e.g. AZ, TX, DC.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Optional. Only awards made under these small-business set-asides.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "NONE"
              ],
              "enumTitles": [
                "Small business set-aside (total)",
                "Small business set-aside (partial)",
                "8(a) competed",
                "8(a) sole source",
                "HUBZone set-aside",
                "HUBZone sole source",
                "Service-disabled veteran-owned set-aside",
                "Service-disabled veteran-owned sole source",
                "Women-owned small business (WOSB)",
                "WOSB sole source",
                "Economically disadvantaged WOSB",
                "EDWOSB sole source",
                "Veteran-owned set-aside",
                "Veteran-owned sole source",
                "Indian small business economic enterprise",
                "Indian economic enterprise",
                "No set-aside used"
              ]
            }
          },
          "recipientNames": {
            "title": "Recipient (company) names",
            "type": "array",
            "description": "Optional. Company names or UEIs to look up a competitor's or partner's contracts, e.g. Booz Allen.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Optional. Default: all four prime contract types.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D"
              ],
              "enumTitles": [
                "BPA call",
                "Purchase order",
                "Delivery order",
                "Definitive contract"
              ]
            }
          },
          "dateFrom": {
            "title": "Activity from date",
            "type": "string",
            "description": "Optional. 2024, 2024-06 or 2024-06-30. Awards with a contract action (signed or modified) on or after this date. Default: 24 months ago (36 months in recompete mode). Earliest 2007-10-01."
          },
          "dateTo": {
            "title": "Activity to date",
            "type": "string",
            "description": "Optional. 2026, 2026-09 or 2026-09-30. Default: today."
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Whole number, 0 or more USD."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Whole number, 0 or more USD."
          },
          "sortBy": {
            "title": "Sort (contract awards mode)",
            "enum": [
              "amount",
              "newest",
              "endingSoon",
              "recentlyModified"
            ],
            "type": "string",
            "description": "Largest awards first, newest start date first, latest end date first, or most recently modified first. Recompete radar always sorts by end date, soonest first.",
            "default": "amount"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}