{
  "openapi": "3.0.1",
  "info": {
    "title": "Expiring Federal Contracts: Recompete Finder (USAspending)",
    "description": "Returns federal contracts whose performance period ends soon (likely recompetes): incumbent, value, agency, end date, days left, NAICS/PSC, place of performance and a USAspending link. Filter by category, NAICS, agency, state, keyword and value.",
    "version": "0.1",
    "x-build-id": "BSH5pItAiMwwmS0zu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fedsignals~federal-recompete-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fedsignals-federal-recompete-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/fedsignals~federal-recompete-finder/runs": {
      "post": {
        "operationId": "runs-sync-fedsignals-federal-recompete-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/fedsignals~federal-recompete-finder/run-sync": {
      "post": {
        "operationId": "run-sync-fedsignals-federal-recompete-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": {
          "endsAfterDays": {
            "title": "Ends at least N days from today",
            "minimum": 0,
            "type": "integer",
            "description": "Returns contracts ending at least this many days from today (start of the window).",
            "default": 180
          },
          "endsWithinDays": {
            "title": "Ends within N days from today",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Returns contracts ending no later than this many days from today (end of the window).",
            "default": 540
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Returns only contracts in these category groups (by PSC code family). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "IT & Cyber",
                "Telecom",
                "Construction",
                "Facilities & Maintenance",
                "Medical & Health",
                "Defense & Aerospace",
                "Research & Development",
                "Professional Services",
                "Architecture & Engineering",
                "Education & Training",
                "Logistics & Transportation",
                "Energy & Environment",
                "Food & Lodging"
              ]
            },
            "default": []
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2-6 digit NAICS codes, e.g. 541512 or 5415.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes, full (D399) or prefixes (D3, R4, 70). Combined with Categories. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Groups: small business, 8(a), hubzone, sdvosb, wosb, veteran-owned, indian; or raw USAspending set-aside codes such as SBA or SDVOSBC. Empty = any, including contracts with no set-aside.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "incumbents": {
            "title": "Incumbents",
            "type": "array",
            "description": "Company names (partial match) or UEIs, to watch specific contractors' expiring contracts. Empty = any company.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier awarding agencies by full name or abbreviation, e.g. Department of Veterans Affairs or VA. Unknown names fail with suggestions, free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Place-of-performance states",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Match award descriptions (any keyword).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum award value ($)",
            "type": "integer",
            "description": "Returns only awards with at least this total value in USD.",
            "default": 1000000
          },
          "activityLookbackYears": {
            "title": "Award activity lookback (years)",
            "type": "integer",
            "description": "Only awards with a transaction in this many past years.",
            "default": 5
          },
          "onlyNew": {
            "title": "Only new since last run (incremental)",
            "type": "boolean",
            "description": "On: returns only contracts not delivered before; a contract whose end date changed is returned again. Turn on for weekly schedules.",
            "default": true
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional. Separate incremental memory per saved task. Defaults to a hash of your filters."
          },
          "maxItems": {
            "title": "Max contracts",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum contracts returned (and charged) per run.",
            "default": 500
          },
          "maxScan": {
            "title": "Max matches to scan",
            "type": "integer",
            "description": "Safety cap on matches collected before sorting.",
            "default": 20000
          },
          "minRequestIntervalSec": {
            "title": "Minimum seconds between API requests",
            "type": "number",
            "description": "Polite delay between API calls.",
            "default": 0.4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}