{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Awards by NAICS, State & Set-Aside",
    "description": "Newly awarded US federal contracts from official USAspending.gov data. Filter by NAICS/PSC, place of performance, agency, small-business set-aside (8(a), SDVOSB, WOSB, HUBZone), amount and keywords. Subcontracting and supplier leads with UEI. $3 per 1,000 awards.",
    "version": "0.1",
    "x-build-id": "MDJowBLwlqQhEs9al"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/queenly_friendship~federal-contract-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-queenly_friendship-federal-contract-awards",
        "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/queenly_friendship~federal-contract-awards/runs": {
      "post": {
        "operationId": "runs-sync-queenly_friendship-federal-contract-awards",
        "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/queenly_friendship~federal-contract-awards/run-sync": {
      "post": {
        "operationId": "run-sync-queenly_friendship-federal-contract-awards",
        "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": {
          "awardedWithinDays": {
            "title": "Awarded within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Ignored if a start date is set.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD (default today)"
          },
          "newAwardsOnly": {
            "title": "New awards only",
            "type": "boolean",
            "description": "Only awards first made in the period (skip modifications to old contracts).",
            "default": true
          },
          "awardKind": {
            "title": "Award kind",
            "enum": [
              "contracts",
              "idvs"
            ],
            "type": "string",
            "description": "Award kind.",
            "default": "contracts"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2, 4 or 6 digits, e.g. 23 (construction), 2382 (building equipment contractors), 541512. The Console and API default to [\"23\"]. Pass an empty list to include all NAICS (nationwide industries).",
            "default": [
              "23"
            ],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (optional)",
            "type": "array",
            "description": "Product/service codes, e.g. Z2AA, J035.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter place-of-performance codes, e.g. OH, PA. The Console and API default to [\"OH\"]. Pass an empty list to include all states.",
            "default": [
              "OH"
            ],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies (optional)",
            "type": "array",
            "description": "Top-tier names exactly as on USAspending, e.g. Department of Veterans Affairs, Department of Defense, General Services Administration.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes (optional)",
            "type": "array",
            "description": "e.g. SBA (small business), 8A, 8AN, HZC (HUBZone), SDVOSBC, WOSB, EDWOSB.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Words that must appear in the award (3+ letters).",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Min award amount ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Min award amount ($)."
          },
          "maxAmount": {
            "title": "Max award amount ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Max award amount ($)."
          },
          "maxResults": {
            "title": "Max awards",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Max awards.",
            "default": 200
          },
          "skipPreviouslyReturned": {
            "title": "Skip records returned in earlier runs",
            "type": "boolean",
            "description": "On by default: records this tool already delivered to you in earlier runs are skipped (and not charged), so scheduled or repeat runs only bring new records.",
            "default": true
          },
          "resetPreviouslyReturned": {
            "title": "Forget earlier runs (start fresh)",
            "type": "boolean",
            "description": "Clear the memory of previously returned records before this run, so everything matching is returned again.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}