{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending — Federal Contracts and Grants Search",
    "description": "Search every prime federal contract, grant, loan and direct payment recorded by the US Treasury on USAspending.gov. Filter by keyword, agency, recipient, date, amount, NAICS, PSC and place of performance. Free government data, no key, no scraping.",
    "version": "0.1",
    "x-build-id": "j5pTvxzG4dfie4kbc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dalbian~usaspending-federal-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dalbian-usaspending-federal-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/dalbian~usaspending-federal-awards/runs": {
      "post": {
        "operationId": "runs-sync-dalbian-usaspending-federal-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/dalbian~usaspending-federal-awards/run-sync": {
      "post": {
        "operationId": "run-sync-dalbian-usaspending-federal-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": {
          "awardType": {
            "title": "Award type",
            "enum": [
              "contracts",
              "idvs",
              "grants",
              "loans",
              "directPayments",
              "other"
            ],
            "type": "string",
            "description": "One award family per run. The API refuses a mixed list — contracts and grants live in different tables with different columns, so a single result set cannot hold both. Run the Actor twice if you need both.",
            "default": "contracts"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text terms, one per line. Several terms are combined with OR, not AND. The search covers the award description, the recipient name, the recipient UEI and the award ID, and it is a fuzzy full-text match rather than a substring match — 'maveris' also returns 'maverick'.",
            "default": [
              "artificial intelligence"
            ],
            "items": {
              "type": "string"
            }
          },
          "agency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Exact agency name as USAspending spells it, for example 'Department of Energy' or 'National Aeronautics and Space Administration'. A name that matches nothing returns zero rows without an error, so the Actor checks yours against the official list and reports near matches in the summary row. Sub-agency names such as 'Department of the Army' also work."
          },
          "recipientName": {
            "title": "Recipient name",
            "type": "string",
            "description": "Company, university, state or other recipient. Partial names work — 'Lockheed' finds 'LOCKHEED MARTIN CORP'."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "YYYY-MM-DD. USAspending holds no search data before 2007-10-01 and rejects earlier dates. Read the date-type setting below before trusting this window."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "YYYY-MM-DD. Leave both dates empty to search the whole archive from 2007 onwards."
          },
          "dateType": {
            "title": "What the dates mean",
            "enum": [
              "action_date",
              "new_awards_only",
              "date_signed",
              "last_modified_date"
            ],
            "type": "string",
            "description": "This is the setting people get wrong. The default returns any award that had a transaction in the window, including a 2020 contract modified in 2026, and the amounts shown are the award's lifetime totals rather than the window's. Choose 'new awards only' when you want awards that actually began in the period.",
            "default": "action_date"
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Floor on the award amount, inclusive. For loans this is the loan value."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Ceiling on the award amount, inclusive."
          },
          "placeOfPerformanceState": {
            "title": "Place of performance state",
            "type": "string",
            "description": "Two-letter US state or territory code, for example TX or PR. Filters on where the work is done, not where the recipient is registered."
          },
          "recipientState": {
            "title": "Recipient state",
            "type": "string",
            "description": "Two-letter code for the recipient's own registered address."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, one per line, for example 541715 for physical and engineering R&D. Contracts and IDVs carry these; assistance awards almost never do.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service codes, one per line, for example R499 or AD94. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum awards",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Awards are fetched 100 at a time. Past 50 000 the API's page counter is refused, so the Actor switches to cursor paging and keeps going; the summary row records which mode was used.",
            "default": 200
          },
          "includeDetail": {
            "title": "Fetch full award detail",
            "type": "boolean",
            "description": "Adds a second request per award to get the contract ceiling (base and all options), the outlay total, the signing date and the subaward count. Slower and billed the same, but this is the only way to see potential value rather than money obligated so far.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}