{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Expiring Contracts Finder",
    "description": "Unofficial tool, not affiliated with U.S. Treasury/USAspending.gov. Find US federal contracts whose period of performance ends within your chosen window, filtered by NAICS, amount and PSC/NAICS code keywords.",
    "version": "0.2",
    "x-build-id": "VZMLAPn1UMuCChy5q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flamelit_constellation~usaspending-expiring-contracts-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flamelit_constellation-usaspending-expiring-contracts-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/flamelit_constellation~usaspending-expiring-contracts-finder/runs": {
      "post": {
        "operationId": "runs-sync-flamelit_constellation-usaspending-expiring-contracts-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/flamelit_constellation~usaspending-expiring-contracts-finder/run-sync": {
      "post": {
        "operationId": "run-sync-flamelit_constellation-usaspending-expiring-contracts-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": {
          "includeDescriptions": {
            "title": "Include free-text descriptions",
            "type": "boolean",
            "description": "Off by default. If on, the award description is included in extra.description (the title is always built from the PSC and NAICS code descriptions, never from free text), trimmed at the first contact detail (role label, initials, name pattern) with \"[contact details removed]\". Descriptions are free text written by buyers and may still contain personal names that the trimming misses; leave off unless you need them.",
            "default": false
          },
          "monthsAhead": {
            "title": "Ending within (months)",
            "type": "integer",
            "description": "Include contracts whose current period-of-performance end date is between today and this many months ahead.",
            "default": 6
          },
          "actionLookbackMonths": {
            "title": "Active within (months)",
            "type": "integer",
            "description": "Only consider contracts with a transaction in this many past months (keeps the download to active awards).",
            "default": 1
          },
          "minAmount": {
            "title": "Minimum award value (USD)",
            "type": "integer",
            "description": "Skip awards below this amount. Lower values make the USAspending download larger and slower.",
            "default": 10000000
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Only include awards with these NAICS codes (prefixes allowed, e.g. 5415).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Title keywords",
            "type": "array",
            "description": "Only include awards whose title (PSC / NAICS description) contains at least one of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPolls": {
            "title": "Max status checks",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many times to check whether USAspending has finished preparing the download before giving up. Checks start 5 s apart and back off by 1.5x up to 30 s apart (5, 7.5, 11.25, 16.9, 25.3, then 30 s). With the default of 60 checks the actor waits up to about 28.6 minutes (1,716 s) in total.",
            "default": 60
          },
          "pollIntervalMs": {
            "title": "Status check interval (ms)",
            "minimum": 5000,
            "type": "integer",
            "description": "Wait before the first status check, in ms (minimum 5000). Later checks back off by 1.5x, up to 30 s apart.",
            "default": 5000
          },
          "maxSpendUsd": {
            "title": "Max spend (USD)",
            "type": "number",
            "description": "Hard spending cap for this run, in US dollars. The actor stops charging and stops adding results once this amount is reached. Unsent items are kept for the next run.",
            "default": 1
          },
          "emitUnchanged": {
            "title": "Include unchanged items",
            "type": "boolean",
            "description": "If on, items already seen in earlier runs (changeType \"same\") are also output. Off by default, so you only get new and amended items. Unchanged items are never charged.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Optional name of the key-value store that remembers what earlier runs saw. Use a different name per saved search so each search tracks its own new/amended items. Leave empty to use the run's default store."
          },
          "fixturePath": {
            "title": "Test fixture path (developers only)",
            "type": "string",
            "description": "Testing only. Path to a local file to replay instead of calling the live source. Leave empty for normal use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}