{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Recompete Finder — Expiring Contracts by NAICS",
    "description": "Federal contracts ending in the next 3–18 months by NAICS, PSC, state or agency: incumbent, agency, value, option runway, recompete signal with reasons, incumbent profile link. First 25 rows free, then $0.02/contract.",
    "version": "0.2",
    "x-build-id": "U7ly0UEhBeDxQhdJT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordfoundry~federal-contract-recompetes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordfoundry-federal-contract-recompetes",
        "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/recordfoundry~federal-contract-recompetes/runs": {
      "post": {
        "operationId": "runs-sync-recordfoundry-federal-contract-recompetes",
        "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/recordfoundry~federal-contract-recompetes/run-sync": {
      "post": {
        "operationId": "run-sync-recordfoundry-federal-contract-recompetes",
        "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": {
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2, 4 or 6-digit NAICS codes. Shorter codes match every code that starts with them (\"5415\" covers 541511-541519). 3- and 5-digit codes are not supported by USAspending.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product/service codes (PSC)",
            "type": "array",
            "description": "1-4 character PSC codes such as \"R425\" or \"DA01\". Shorter codes match every code that starts with them (\"R4\" covers R4xx). If you also give NAICS codes, a contract must match both.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter codes (e.g. \"VA\", \"TX\"; also DC, AS, GU, MP, PR, VI). Leave empty for all locations, including places of performance outside the United States.",
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-level agency names as USAspending lists them (e.g. \"Department of Veterans Affairs\") or their abbreviations (e.g. \"VA\", \"GSA\"). Matched case-insensitively.",
            "items": {
              "type": "string"
            }
          },
          "endsAfterMonths": {
            "title": "Ends at least this many months from today",
            "minimum": 0,
            "maximum": 36,
            "type": "integer",
            "description": "Start of the expiration window, in months from the run date (UTC).",
            "default": 3
          },
          "endsBeforeMonths": {
            "title": "Ends before this many months from today",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "End of the expiration window (exclusive), in months from the run date. The window may span at most 24 months.",
            "default": 18
          },
          "minValue": {
            "title": "Minimum obligated amount (USD)",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Only contracts with at least this much obligated to date (USAspending \"Award Amount\"). Potential value is reported but not used for this filter. Use 0 for no minimum.",
            "default": 100000
          },
          "maxResults": {
            "title": "Maximum contracts to return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Earliest-ending contracts are returned first. If more match, the run says so and reports the end date through which results are complete.",
            "default": 200
          },
          "includeIdvOrders": {
            "title": "Include task/delivery orders under IDVs",
            "type": "boolean",
            "description": "Include BPA calls and delivery/task orders placed under IDIQs, GWACs, schedules and BPAs (flagged isIdvOrder with the parent vehicle ID). Turn off to list only standalone purchase orders and definitive contracts.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}