{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Contract Awards & Winners (Gov Contracts)",
    "description": "US federal government contract awards and winners from the official USAspending API: recipient, UEI, amount, agency, NAICS, PSC, place of performance and dates. Filter by agency, state, NAICS or amount. No API key.",
    "version": "0.1",
    "x-build-id": "wPWrtDH8zgIMv935Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quarrylane-data~usaspending-federal-contract-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quarrylane-data-usaspending-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/quarrylane-data~usaspending-federal-contract-awards/runs": {
      "post": {
        "operationId": "runs-sync-quarrylane-data-usaspending-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/quarrylane-data~usaspending-federal-contract-awards/run-sync": {
      "post": {
        "operationId": "run-sync-quarrylane-data-usaspending-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": {
          "daysBack": {
            "title": "Look back this many days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Used when startDate is empty. Default 30 days. Combined with dateType (default: new awards only).",
            "default": 30
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "type": "string",
            "description": "Inclusive start of the search window. Earliest supported by this API is 2007-10-01. Defaults to daysBack ago."
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "type": "string",
            "description": "Inclusive end of the search window. Defaults to today."
          },
          "dateType": {
            "title": "Date field to filter on",
            "enum": [
              "new_awards_only",
              "action_date",
              "date_signed",
              "last_modified_date"
            ],
            "type": "string",
            "description": "USASpending date_type. Default new_awards_only so you get newly awarded primes, not modifications of old mega-contracts. Large agencies such as DoD post few brand-new primes in a 30-day window; use last_modified_date for a high-volume daily feed of awards that changed.",
            "default": "new_awards_only"
          },
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Default: prime contracts (A, B, C, D). Add IDVs if you also want indefinite-delivery vehicles. You can also pass official type codes.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "A",
                "B",
                "C",
                "D",
                "IDV_A",
                "IDV_B",
                "IDV_C",
                "IDV_D",
                "IDV_E"
              ]
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Official USASpending toptier names (e.g. 'Department of Defense') or common abbreviations (DoD, VA, HHS, GSA, DHS, NASA, EPA).",
            "items": {
              "type": "string"
            }
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "6-digit NAICS industry codes, e.g. '238220' or '541512'.",
            "items": {
              "type": "string"
            }
          },
          "psc": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product or Service Codes, e.g. 'D399' or 'Z1AZ'.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter US state codes for place of performance, e.g. 'TX', 'VA', 'CA'.",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient HQ states",
            "type": "array",
            "description": "Two-letter US state codes for the recipient's location (where the winner is based).",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "type": "number",
            "description": "Skip awards smaller than this amount in USD. Example: 100000 for awards of $100k or more."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "type": "number",
            "description": "Skip awards larger than this amount in USD. Leave empty for no upper limit."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "USASpending keyword filter (description and related text), e.g. 'cybersecurity' or 'janitorial'."
          },
          "recipient": {
            "title": "Recipient name or UEI",
            "type": "string",
            "description": "Search the official recipient name / UEI field."
          },
          "onlyNew": {
            "title": "Monitor mode: only awards not delivered before",
            "type": "boolean",
            "description": "Remembers every award delivered (and, on the first run, every other current match in the window) under the monitor key. Later scheduled runs return and charge only new awards. A first run over a wide 30-day window can take several minutes while it seeds IDs; narrow filters or raise the run timeout if needed.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label for this saved monitor (plain text, not a password or API key). When \"Only new\" monitor mode is on, the Actor remembers which records it has already delivered under this name and returns only new ones next time. Use a different name per filter set or client, for example \"client-a-weekly\". Older inputs that use monitorKey still work.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit of awards to return (Free Apify plan: 15 per run). Default 25 is a cheap, auto-test-safe sample. A full 30-day national window can contain tens of thousands of new primes.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}