{
  "openapi": "3.0.1",
  "info": {
    "title": "USASpending Federal Awards Scraper",
    "description": "One row per US federal award already made: award id, recipient, amount, awarding agency, period of performance, place of performance and award type. Contracts, grants, loans and direct payments. Filter by agency, state, industry code, amount or date. No key, no login.",
    "version": "0.1",
    "x-build-id": "SN0hZN6BI8IA18THb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-usaspending-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/dami_studio~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-usaspending-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/dami_studio~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-usaspending-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": {
          "searchTerms": {
            "title": "Search terms",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Free-text search across the award record - the description, the recipient, the award id and several fields this Actor does not return. Each term is a separate search and the rows are pooled. Minimum three characters per term, up to 10 terms. Because the search reaches fields you cannot see in the output, a row can be a genuine hit with the word nowhere visible on it.",
            "items": {
              "type": "string"
            }
          },
          "awardTypes": {
            "title": "Kinds of award",
            "minItems": 0,
            "maxItems": 6,
            "type": "array",
            "description": "Which families of award to search. Federal spending is filed in six families and the service will not mix them in one query, so each one you tick is a separate search and the row budget is split between them. Leave it empty and you get contracts plus grants, which is what most people mean by federal awards.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "idvs",
                "loans",
                "direct_payments",
                "other"
              ],
              "enumTitles": [
                "Contracts - the government bought something",
                "Grants and cooperative agreements",
                "Indefinite-delivery vehicles (IDV, IDIQ, BPA, schedules)",
                "Loans - direct and guaranteed",
                "Direct payments to people and organisations",
                "Insurance and other financial assistance"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total awards to return across every kind of award you ticked. The budget is split between them and whatever one family leaves unused is handed to the next. Hard ceiling 10,000. Keep it low while you are testing - you pay per row."
          },
          "agencies": {
            "title": "Awarding agency",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Limit to awards handed out by these departments, written exactly as the source writes them: \"Department of Defense\", \"Department of Energy\", \"National Aeronautics and Space Administration\". This is the cabinet-level department, not the office inside it - the office still comes back on every row. A name the service does not recognise returns nothing rather than everything.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Match the organisation that received the money - a company name, or a UEI. Partial names work. Several entries widen the search rather than narrowing it.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Work performed in (state)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Two-letter US state codes for where the work was actually done, for example TX or CA. This is not the same as where the recipient is registered - a Virginia contractor doing work in Guam is a Guam row. Note that indefinite-delivery vehicles carry only a country for place of performance - no state and no city - so ticking that award family alongside this filter returns nothing for it.",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient registered in (state)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Two-letter US state codes for the recipient's own address, for example VA or MD. Use this when you want the companies in a state rather than the work in a state.",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmountUsd": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop awards below this figure. Useful for cutting out the long tail of small purchase orders, which is most of the row count on a contract search. Leave it empty and nothing is dropped, including the negative rows that record money being taken back off an award."
          },
          "maxAwardAmountUsd": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop awards above this figure. Leave it empty for no upper limit."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Only awards with activity on or after this date, as YYYY-MM-DD. The earliest the service accepts is 2007-10-01 and anything earlier is moved up to it. Read the warning on \"Date meaning\" below - this window is about when money moved, not about the period of performance on the row."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Only awards with activity on or before this date, as YYYY-MM-DD. Leave empty for today."
          },
          "dateType": {
            "title": "Date meaning",
            "enum": [
              "action_date",
              "date_signed",
              "last_modified_date",
              "new_awards_only"
            ],
            "type": "string",
            "description": "What the date window is measured against. \"Action date\" is when money moved, including a modification to an old award - so a 2019 contract amended last month appears in a window covering last month, still showing its 2019 start date. \"New awards only\" restricts it to awards first signed inside the window, which is what you want for a feed of new business."
          },
          "naicsCodes": {
            "title": "Industry codes (NAICS)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Six-digit NAICS codes, such as 541512 for computer systems design. Contracts and IDVs carry these; grants and other assistance mostly do not, so a NAICS filter on a grant search will return very little.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product or service codes (PSC)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Four-character PSC codes such as R425 for engineering support or D310 for IT services. Contracts only - this is how the government classifies what it bought.",
            "items": {
              "type": "string"
            }
          },
          "assistanceListingNumbers": {
            "title": "Assistance Listing (ALN/CFDA) numbers",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Programme numbers such as 93.778 or 20.205, for grants, loans, direct payments and other assistance. This follows one federal programme across every award it has ever made, which is the tightest filter here. Contracts have no assistance listing, so this will return nothing on a contract search.",
            "items": {
              "type": "string"
            }
          },
          "awardIds": {
            "title": "Exact award IDs",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Look up specific awards by the id printed on them, for example W912DQ24C4003. An id that does not exist returns an uncharged row saying so, not a wrong match.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "amount",
              "date"
            ],
            "type": "string",
            "description": "Biggest awards first, or most recent first. Either way you get the top of that ordering, so if you ask for 100 rows on a search that matches 40,000 you get the 100 largest or the 100 newest - not a random hundred."
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Leave this empty. The run brings its own addresses and the cost of them is already inside the price. Fill it in only if you specifically want the traffic to leave through servers you already pay for, as http://user:pass@host:port.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}