{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Awards Explorer (USAspending.gov)",
    "description": "Search US federal contract and grant awards by keyword, NAICS, agency, recipient, state, date and amount. Competitor intel from official data.",
    "version": "0.0",
    "x-build-id": "FkAveDceWcGRgcLfj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/utility-belt-labs~contract-awards-explorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-utility-belt-labs-contract-awards-explorer",
        "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/utility-belt-labs~contract-awards-explorer/runs": {
      "post": {
        "operationId": "runs-sync-utility-belt-labs-contract-awards-explorer",
        "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/utility-belt-labs~contract-awards-explorer/run-sync": {
      "post": {
        "operationId": "run-sync-utility-belt-labs-contract-awards-explorer",
        "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": "Output",
            "enum": [
              "awards",
              "topRecipients"
            ],
            "type": "string",
            "description": "'Awards' returns one row per award. 'Top recipients' ranks the recipients (competitors) by the total Award Amount of the awards that match your filters.",
            "default": "awards"
          },
          "awardCategory": {
            "title": "Award category",
            "enum": [
              "contracts",
              "idvs",
              "grants"
            ],
            "type": "string",
            "description": "Contracts (definitive contracts, purchase orders, delivery orders, BPA calls), IDVs (IDIQ/GWAC/BPA/FSS vehicles), or grants (federal assistance grants and cooperative agreements).",
            "default": "contracts"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search award descriptions and related text. Several keywords are OR'd (any match). USAspending ignores keywords shorter than 3 characters.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient search",
            "type": "array",
            "description": "Competitor or company names, UEI numbers or DUNS. Matches recipient name/UEI/DUNS text, e.g. 'Booz Allen'.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2 to 6 digit NAICS codes; a shorter code includes everything beneath it (e.g. 5415 = computer systems design and related). Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product/Service Codes, e.g. R408 or D399. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names or abbreviations, e.g. 'Department of Defense', 'DOD', 'GSA', 'HHS', 'NASA'. If none match, the run stops instead of searching everything.",
            "items": {
              "type": "string"
            }
          },
          "awardingSubAgencies": {
            "title": "Awarding sub-agencies",
            "type": "array",
            "description": "Exact sub-agency names, e.g. 'Department of the Navy', 'Defense Logistics Agency', 'Centers for Disease Control and Prevention'.",
            "items": {
              "type": "string"
            }
          },
          "recipientState": {
            "title": "Recipient state",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "2-letter US state code of the recipient's location, e.g. VA."
          },
          "placeOfPerformanceState": {
            "title": "Place-of-performance state",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "2-letter US state code where the work is performed, e.g. TX."
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start of the time period. Leave empty to use 'Look back N days'. Earliest supported date is 2007-10-01."
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "End of the time period. Leave empty for today."
          },
          "daysBack": {
            "title": "Look back N days",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "Used when the start date is empty.",
            "default": 365
          },
          "dateType": {
            "title": "What the dates apply to",
            "enum": [
              "new_awards_only",
              "action_date",
              "date_signed",
              "last_modified_date"
            ],
            "type": "string",
            "description": "'New awards signed in the period' finds fresh wins (recommended for competitor and pipeline research). The other options match awards by their latest action, signing date or last-modified date, so long-running older awards can appear with their lifetime totals.",
            "default": "new_awards_only"
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with an Award Amount at or above this."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with an Award Amount at or below this."
          },
          "setAsideCodes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Contracts and IDVs only. Include awards with any of the selected set-aside types.",
            "items": {
              "type": "string",
              "enum": [
                "NONE",
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "WOSB",
                "EDWOSB",
                "SDVOSBC",
                "HZC",
                "HZS",
                "VSA"
              ],
              "enumTitles": [
                "No set-aside (full and open)",
                "Small business set-aside (total)",
                "Small business set-aside (partial)",
                "8(a) competed",
                "8(a) sole source",
                "Women-owned small business",
                "Economically disadvantaged WOSB",
                "Service-disabled veteran-owned (competed)",
                "HUBZone set-aside (competed)",
                "HUBZone sole source",
                "Veteran set-aside"
              ]
            }
          },
          "recipientTypes": {
            "title": "Recipient business types",
            "type": "array",
            "description": "Only awards to recipients with at least one of these business-type designations.",
            "items": {
              "type": "string",
              "enum": [
                "small_business",
                "other_than_small_business",
                "woman_owned_business",
                "women_owned_small_business",
                "veteran_owned_business",
                "service_disabled_veteran_owned_business",
                "minority_owned_business",
                "8a_program_participant",
                "tribally_owned_firm",
                "nonprofit",
                "higher_education",
                "government",
                "foreign_owned"
              ],
              "enumTitles": [
                "Small business",
                "Other than small business",
                "Woman-owned business",
                "Women-owned small business",
                "Veteran-owned business",
                "Service-disabled veteran-owned business",
                "Minority-owned business",
                "SBA 8(a) program participant",
                "Tribally owned firm",
                "Nonprofit",
                "Higher education",
                "Government",
                "Foreign owned"
              ]
            }
          },
          "awardIds": {
            "title": "Award IDs (PIID / FAIN)",
            "type": "array",
            "description": "Look up specific awards. When given and no dates are set, the whole 2007-10-01 to today range is searched.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "startDate",
              "endDate",
              "lastModified",
              "recipient"
            ],
            "type": "string",
            "description": "Used in 'Awards' output.",
            "default": "amount"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Descending shows the biggest or newest first.",
            "default": "desc"
          },
          "includeDetails": {
            "title": "Add competition details (contracts and IDVs)",
            "type": "boolean",
            "description": "Adds extent competed, number of offers, set-aside, pricing type, solicitation procedures, base-and-all-options value, potential end date and parent contract. Costs one extra API call per row, so runs are slower.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows to return.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}