{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Scraper",
    "description": "Search official USAspending federal awards by category, recipient, agency, date, location, keyword, amount, and award ID. Export normalized JSON for research and agent workflows.",
    "version": "1.0",
    "x-build-id": "SzzwqHto11xFJZMPN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-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/muhammadafzal~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-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/muhammadafzal~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-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": {
          "startDate": {
            "title": "Action date start",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Use this to set the first award action date included. Enter YYYY-MM-DD, for example 2025-01-01. USAspending Advanced Award Search supports dates from 2007-10-01 onward.",
            "default": "2025-01-01"
          },
          "endDate": {
            "title": "Action date end",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Use this to set the last award action date included. Enter YYYY-MM-DD, for example 2025-12-31. This is not the award's period-of-performance end date.",
            "default": "2025-12-31"
          },
          "awardCategories": {
            "title": "Award categories",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this to select one or more prime-award groups. Accepted values are contracts, grants, loans, directPayments, otherFinancialAssistance, and idvs. Defaults to contracts; this does not return subawards.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "loans",
                "directPayments",
                "otherFinancialAssistance",
                "idvs"
              ],
              "enumTitles": [
                "Contracts",
                "Grants",
                "Loans",
                "Direct payments",
                "Other financial assistance",
                "Indefinite delivery vehicles (IDVs)"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "recipientSearchText": {
            "title": "Recipient name or identifier",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Use this to match one recipient name or identifier, for example BOEING. USAspending accepts one recipient search term; leave blank to include all recipients."
          },
          "awardingAgencies": {
            "title": "Awarding agency names",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this to filter by exact top-tier awarding agency names, for example Department of Defense. These are names, not agency codes or sub-agencies.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "fundingAgencies": {
            "title": "Funding agency names",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this to filter by exact top-tier funding agency names, for example Department of Energy. These are names, not agency codes or awarding agencies.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "placeOfPerformanceStates": {
            "title": "Performance state codes",
            "maxItems": 56,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this for U.S. place-of-performance states or territories. Enter two-letter codes such as CA or VA. This does not filter by recipient address.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "recipientStates": {
            "title": "Recipient state codes",
            "maxItems": 56,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this for recipient-address states or territories. Enter two-letter codes such as NY or TX. This does not filter the place of performance.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "keywords": {
            "title": "Award keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this to search USAspending award descriptions with terms such as cybersecurity. Leave empty for no description-keyword filter.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "awardIds": {
            "title": "Award identifiers",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Use this when specific PIIDs, FAINs, or URI award IDs are known, for example HT940216C0001. This is not USAspending's generated internal ID.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "minAwardAmount": {
            "title": "Minimum award amount",
            "minimum": 0,
            "type": "number",
            "description": "Use this to include awards at or above a dollar amount, for example 1000000. For loans the normalized amount is Loan Value; omit for no lower bound."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount",
            "minimum": 0,
            "type": "number",
            "description": "Use this to include awards at or below a dollar amount, for example 5000000. Omit for no upper bound; it must not be below the minimum."
          },
          "sortBy": {
            "title": "Sort field",
            "enum": [
              "amount",
              "lastModifiedDate",
              "awardId"
            ],
            "type": "string",
            "description": "Use this to order the combined normalized results by amount, lastModifiedDate, or awardId. Amount means Loan Value for loan awards. Defaults to amount.",
            "default": "amount"
          },
          "sortOrder": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Use desc for highest/newest first or asc for lowest/oldest first. Defaults to desc; this applies across all selected categories.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Use this to cap delivered and billable award records. Enter 1–5000; default 100. At $0.001 per result, 100 records cost $0.10 plus the start event.",
            "default": 100
          },
          "pageSize": {
            "title": "USAspending page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Use this to tune API pagination. Enter 1–100; default 100. Smaller pages reduce retry work but make more official API requests.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}