{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper | Federal Contracts & Grants",
    "description": "Get US federal contracts, grants, loans and IDVs from USAspending.gov: recipient name and UEI, award amount, awarding agency, dates, NAICS/PSC codes and place of performance. Filter by keyword, agency, recipient, date, state. No API key.",
    "version": "0.0",
    "x-build-id": "14b9Vi9skGNAPIgvv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~usaspending-federal-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-usaspending-federal-awards-scraper",
        "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/genial_candlestand~usaspending-federal-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-usaspending-federal-awards-scraper",
        "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/genial_candlestand~usaspending-federal-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-usaspending-federal-awards-scraper",
        "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": {
          "queries": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to look for in award descriptions, recipient names and award IDs, e.g. cybersecurity. Each keyword is a separate search and needs at least 3 characters. Leave empty to filter by the other fields only.",
            "items": {
              "type": "string"
            }
          },
          "awardCategories": {
            "title": "Award categories",
            "type": "array",
            "description": "Which kinds of awards to search: contracts, grants, IDVs, loans, direct payments or other. Each category is searched separately and labelled in the awardCategory column.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "idvs",
                "loans",
                "directPayments",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "Grants",
                "IDVs (GWACs, BPAs, IDIQs)",
                "Loans",
                "Direct payments",
                "Other assistance (insurance etc.)"
              ]
            },
            "default": [
              "contracts",
              "grants"
            ]
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-level agencies by name or abbreviation in any case, e.g. Department of Energy, NASA, DOD. Several agencies mean any of them. Sub-agencies such as Army are not accepted: use the parent department.",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipients (names or UEIs)",
            "type": "array",
            "description": "Vendor or grantee names, or 12-character UEIs, e.g. Lockheed Martin or KDT2YLB34NT6. Each recipient is a separate search, combined with each keyword.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Awards with an action (obligation or modification) on or after this date, YYYY-MM-DD. The earliest supported date is 2007-10-01; earlier dates are raised to it with a warning. Only the end date given: the start is 2007-10-01."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Awards with an action on or before this date, YYYY-MM-DD. Must not be before From date. Only the start date given: the end is today."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter US state or territory codes, e.g. VA, TX, DC, PR. Several codes mean any of them. By default they match the place of performance; set State filter to recipient to match the recipient address. IDVs are always matched by recipient address.",
            "items": {
              "type": "string"
            }
          },
          "stateFilter": {
            "title": "State filter",
            "enum": [
              "placeOfPerformance",
              "recipient"
            ],
            "type": "string",
            "description": "What States matches: where the work is performed (placeOfPerformance) or where the recipient is located (recipient). IDVs always use the recipient address. No effect without States.",
            "default": "placeOfPerformance"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes of 2 to 6 digits, e.g. \"541512\" or \"54\" (prefix). Contracts and IDVs only: other selected categories are skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes of 1 to 4 letters or digits, e.g. \"R425\" or \"D3\". Contracts and IDVs only: other selected categories are skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "type": "number",
            "description": "Only awards worth at least this many US dollars (award amount; loan value for loans)."
          },
          "maxAmount": {
            "title": "Maximum amount (USD)",
            "type": "number",
            "description": "Only awards worth at most this many US dollars (award amount; loan value for loans). Must not be below the minimum."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "newest"
            ],
            "type": "string",
            "description": "Largest awards first (amount; loan value for loans), or newest first by start date (issued date for loans). Newest returns at most 50,000 awards per search.",
            "default": "amount"
          },
          "maxItemsPerSearch": {
            "title": "Max awards per search",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop each search (one keyword × recipient × category) after this many awards.",
            "default": 100
          },
          "maxItems": {
            "title": "Max awards in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many awards across all searches.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: USAspending is an open government API. Turn on only if your network is blocked.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}