{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper: US Federal Contract & Grant Awards",
    "description": "Search USAspending.gov, the official source of US federal spending: contract awards, IDVs, grants and loans. Filter by agency, NAICS, PSC, recipient, state, amount or date and get recipients, amounts and descriptions for competitor and market research. JSON, CSV or Excel. No API key.",
    "version": "0.1",
    "x-build-id": "tkRENLq8taqRJbxh7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexus-scrapers~usaspending-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexus-scrapers-usaspending-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/nexus-scrapers~usaspending-awards/runs": {
      "post": {
        "operationId": "runs-sync-nexus-scrapers-usaspending-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/nexus-scrapers~usaspending-awards/run-sync": {
      "post": {
        "operationId": "run-sync-nexus-scrapers-usaspending-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": {
          "awardCategory": {
            "title": "Award category",
            "enum": [
              "contracts",
              "idvs",
              "grants",
              "direct-payments",
              "other-assistance",
              "loans"
            ],
            "type": "string",
            "description": "Which kind of award to read. The API cannot mix categories in one search, so a run reads one category. Contracts (types A-D) by default.",
            "default": "contracts"
          },
          "awardTypeCodes": {
            "title": "Award type codes (optional)",
            "type": "array",
            "description": "Restrict to some award type codes of the chosen category, e.g. ['C','D'] for delivery orders and definitive contracts. Leave empty for all types of the category. Codes: contracts: A, B, C, D; idvs: IDV_A, IDV_B, IDV_B_A, IDV_B_B, IDV_B_C, IDV_C, IDV_D, IDV_E; grants: 02, 03, 04, 05, F001, F002; direct-payments: 06, 10, F006, F007; other-assistance: 09, 11, -1, F005, F008, F009, F010; loans: 07, 08, F003, F004.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keywords",
            "type": "string",
            "description": "Words or phrases searched in the award description and other text fields. Separate alternatives with a comma: 'solar, photovoltaic' matches awards containing either."
          },
          "daysBack": {
            "title": "Active in the last N days",
            "minimum": 0,
            "maximum": 6000,
            "type": "integer",
            "description": "Only awards with activity (see 'Date type') in the last N days. Ignored if 'Date from' or 'Date to' is set. Use 0 for no date limit. Note: Department of Defense awards typically show up with a delay of about three months.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start of the period, YYYY-MM-DD (not earlier than 2007-10-01). Overrides 'last N days'."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End of the period (inclusive), YYYY-MM-DD."
          },
          "dateType": {
            "title": "Date type",
            "enum": [
              "action_date",
              "new_awards_only",
              "date_signed",
              "last_modified_date"
            ],
            "type": "string",
            "description": "Which date the period applies to: any action on the award (new award or modification), only newly signed awards, the signing date, or the last-modified date of the record.",
            "default": "action_date"
          },
          "awardingAgency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Top-tier awarding agency, exact name as in USAspending, e.g. 'Department of Homeland Security', 'General Services Administration', 'National Aeronautics and Space Administration'."
          },
          "awardingSubAgency": {
            "title": "Awarding sub-agency",
            "type": "string",
            "description": "Sub-tier awarding agency, exact name, e.g. 'Federal Acquisition Service', 'U.S. Coast Guard', 'Department of the Army'."
          },
          "recipient": {
            "title": "Recipient name or UEI",
            "type": "string",
            "description": "Recipient (winner) name or 12-character Unique Entity ID (UEI). Names are matched as text, so 'Lockheed Martin' also finds subsidiaries with that text in their name."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "North American Industry Classification System codes with prefix matching: '5415' matches every 5415xx code (computer systems design). Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes, exact codes such as 'D302' (IT systems development) or 'R425' (engineering and technical services). Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance (states)",
            "type": "array",
            "description": "Only awards performed in one of these US states or territories.",
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "AK",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "DC",
                "FL",
                "GA",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NE",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "ND",
                "OH",
                "OK",
                "OR",
                "PA",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY",
                "AS",
                "GU",
                "MP",
                "PR",
                "VI",
                "UM"
              ]
            }
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum award amount in US dollars (total obligated so far for contracts and grants; loan value for loans)."
          },
          "maxAmount": {
            "title": "Maximum amount (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum award amount in US dollars."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "lastModified",
              "baseDate",
              "amount"
            ],
            "type": "string",
            "description": "Order of the results. Most recently updated first by default.",
            "default": "lastModified"
          },
          "includeDetails": {
            "title": "Include award details",
            "type": "boolean",
            "description": "Fetch the award detail page of every result (one extra request each, slower): competition type, set-aside, pricing type, number of offers, potential total value with options, parent contract, awarding office, recipient business categories. Output goes in 'usaDetails'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of awards to return. You are charged per result, so keep this low while testing. Above 10,000 the Actor splits the date range automatically.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}